<< Chapter < Page Chapter >> Page >

oddsdf.m Sets up calibrating frequencies for calculating posterior odds.

% ODDSDF file oddsdf.m Frequencies for calculating odds % Version of 12/4/93% Sets up calibrating frequencies % for calculating posterior oddsA = input('Enter matrix A of frequencies for calibration group 1 '); B = input('Enter matrix B of frequencies for calibration group 2 ');n = length(A(:,1)); % Number of questions (rows of A) m = length(A(1,:)); % Number of answers to each questionp1 = sum(A(1,:)); % Number in calibration group 1 p2 = sum(B(1,:)); % Number in calibration group 2a = A/p1; b = B/p2;disp(' ') % Blank line in presentation disp(['Number of questions = ',num2str(n),]) % Size of profile disp(['Answers per question = ',num2str(m),]) % Usually 3: yes, no, uncertain disp(' Enter code for answers and call for procedure "odds" ')disp(' ')
Got questions? Get instant answers now!

oddsdp.m Sets up conditional probabilities for odds calculations.

% ODDSDP file oddsdp.m Conditional probs for calculating posterior odds % Version of 12/4/93% Sets up conditional probabilities % for odds calculationsa = input('Enter matrix A of conditional probabilities for Group 1 '); b = input('Enter matrix B of conditional probabilities for Group 2 ');p1 = input('Probability p1 an individual is from Group 1 '); n = length(a(:,1));m = length(a(1,:)); p2 = 1 - p1;disp(' ') % Blank line in presentation disp(['Number of questions = ',num2str(n),]) % Size of profile disp(['Answers per question = ',num2str(m),]) % Usually 3: yes, no, uncertain disp(' Enter code for answers and call for procedure "odds" ')disp(' ')
Got questions? Get instant answers now!

Bernoulli and multinomial trials

btdata.m Sets parameter p and number n of trials for generating Bernoulli sequences. Prompts for bt to generate the trials.

% BTDATA file btdata.m Parameters for Bernoulli trials % Version of 11/28/92% Sets parameters for generating Bernoulli trials % Prompts for bt to generate the trialsn = input('Enter n, the number of trials '); p = input('Enter p, the probability of success on each trial ');disp(' ') disp(' Call for bt')disp(' ')
Got questions? Get instant answers now!

bt.m Generates Bernoulli sequence for parameters set by btdata. Calculates relative frequency of “successes.”

% BT file bt.m Generates Bernoulli sequence % version of 8/11/95 Revised 7/31/97 for version 4.2 and 5.1, 5.2% Generates Bernoulli sequence for parameters set by btdata % Calculates relative frequency of 'successes'clear SEQ; B = rand(n,1)<= p; % ones for random numbers<= p F = sum(B)/n; % relative frequency of onesN = [1:n]'; % display detailsdisp(['n = ',num2str(n),' p = ',num2str(p),])disp(['Relative frequency = ',num2str(F),])SEQ = [N B];clear N; clear B;disp('To view the sequence, call for SEQ') disp(' ')
Got questions? Get instant answers now!

binomial.m Uses ibinom and cbinom to generate tables of the individual and cumulative binomial probabilities for specified parameters. Note that for calculation in MATLAB it is usually much more convenient and efficient to use ibinom and/or cbinom .

% BINOMIAL file binomial.m Generates binomial tables % Version of 12/10/92 (Display modified 4/28/96)% Calculates a TABLE of binomial probabilities % for specified n, p, and row vector k,% Uses the m-functions ibinom and cbinom.n = input('Enter n, the number of trials '); p = input('Enter p, the probability of success ');k = input('Enter k, a row vector of success numbers '); y = ibinom(n,p,k);z = cbinom(n,p,k); disp([' n = ',int2str(n),' p = ' num2str(p)]) H = [' k P(X = k) P(X>= k)'];disp(H) disp([k;y;z]')
Got questions? Get instant answers now!

Questions & Answers

show that the set of all natural number form semi group under the composition of addition
Nikhil Reply
explain and give four Example hyperbolic function
Lukman Reply
_3_2_1
felecia
⅗ ⅔½
felecia
_½+⅔-¾
felecia
The denominator of a certain fraction is 9 more than the numerator. If 6 is added to both terms of the fraction, the value of the fraction becomes 2/3. Find the original fraction. 2. The sum of the least and greatest of 3 consecutive integers is 60. What are the valu
SABAL Reply
1. x + 6 2 -------------- = _ x + 9 + 6 3 x + 6 3 ----------- x -- (cross multiply) x + 15 2 3(x + 6) = 2(x + 15) 3x + 18 = 2x + 30 (-2x from both) x + 18 = 30 (-18 from both) x = 12 Test: 12 + 6 18 2 -------------- = --- = --- 12 + 9 + 6 27 3
Pawel
2. (x) + (x + 2) = 60 2x + 2 = 60 2x = 58 x = 29 29, 30, & 31
Pawel
ok
Ifeanyi
on number 2 question How did you got 2x +2
Ifeanyi
combine like terms. x + x + 2 is same as 2x + 2
Pawel
x*x=2
felecia
2+2x=
felecia
Mark and Don are planning to sell each of their marble collections at a garage sale. If Don has 1 more than 3 times the number of marbles Mark has, how many does each boy have to sell if the total number of marbles is 113?
mariel Reply
Mark = x,. Don = 3x + 1 x + 3x + 1 = 113 4x = 112, x = 28 Mark = 28, Don = 85, 28 + 85 = 113
Pawel
how do I set up the problem?
Harshika Reply
what is a solution set?
Harshika
find the subring of gaussian integers?
Rofiqul
hello, I am happy to help!
Shirley Reply
please can go further on polynomials quadratic
Abdullahi
hi mam
Mark
I need quadratic equation link to Alpa Beta
Abdullahi Reply
find the value of 2x=32
Felix Reply
divide by 2 on each side of the equal sign to solve for x
corri
X=16
Michael
Want to review on complex number 1.What are complex number 2.How to solve complex number problems.
Beyan
yes i wantt to review
Mark
use the y -intercept and slope to sketch the graph of the equation y=6x
Only Reply
how do we prove the quadratic formular
Seidu Reply
please help me prove quadratic formula
Darius
hello, if you have a question about Algebra 2. I may be able to help. I am an Algebra 2 Teacher
Shirley Reply
thank you help me with how to prove the quadratic equation
Seidu
may God blessed u for that. Please I want u to help me in sets.
Opoku
what is math number
Tric Reply
4
Trista
x-2y+3z=-3 2x-y+z=7 -x+3y-z=6
Sidiki Reply
can you teacch how to solve that🙏
Mark
Solve for the first variable in one of the equations, then substitute the result into the other equation. Point For: (6111,4111,−411)(6111,4111,-411) Equation Form: x=6111,y=4111,z=−411x=6111,y=4111,z=-411
Brenna
(61/11,41/11,−4/11)
Brenna
x=61/11 y=41/11 z=−4/11 x=61/11 y=41/11 z=-4/11
Brenna
Need help solving this problem (2/7)^-2
Simone Reply
x+2y-z=7
Sidiki
what is the coefficient of -4×
Mehri Reply
-1
Shedrak
A soccer field is a rectangle 130 meters wide and 110 meters long. The coach asks players to run from one corner to the other corner diagonally across. What is that distance, to the nearest tenths place.
Kimberly Reply
Jeannette has $5 and $10 bills in her wallet. The number of fives is three more than six times the number of tens. Let t represent the number of tens. Write an expression for the number of fives.
August Reply
What is the expressiin for seven less than four times the number of nickels
Leonardo Reply
How do i figure this problem out.
how do you translate this in Algebraic Expressions
linda Reply
why surface tension is zero at critical temperature
Shanjida
I think if critical temperature denote high temperature then a liquid stats boils that time the water stats to evaporate so some moles of h2o to up and due to high temp the bonding break they have low density so it can be a reason
s.
Need to simplify the expresin. 3/7 (x+y)-1/7 (x-1)=
Crystal Reply
. After 3 months on a diet, Lisa had lost 12% of her original weight. She lost 21 pounds. What was Lisa's original weight?
Chris Reply
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Good
A fair die is tossed 180 times. Find the probability P that the face 6 will appear between 29 and 32 times inclusive
Samson Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play




Source:  OpenStax, Applied probability. OpenStax CNX. Aug 31, 2009 Download for free at http://cnx.org/content/col10708/1.6
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Applied probability' conversation and receive update notifications?

Ask
Yacoub Jayoghli
Start Quiz
Savannah Parrish
Start Exam