Probability Mechanics. Laws of probability: Addition The question of Or p(A or B) = p(A) + p(B)...
-
Upload
nelson-elliott -
Category
Documents
-
view
217 -
download
1
Transcript of Probability Mechanics. Laws of probability: Addition The question of Or p(A or B) = p(A) + p(B)...
Probability Mechanics
Laws of probability: Addition
• The question of Or
• p(A or B) = p(A) + p(B)– Probability of getting a grape or lemon skittle in a bag
of 60 pieces where there are 15 strawberry, 13 grape, 12 orange, 8 lemon, 12 lime?
– p(G) = 13/60 p(L) = 8/60– 13/60 + 8/60 = 21/60 = .35 or a 35% chance we’ll get
one of those two flavors when we open the bag and pick one out
Laws of probability: Multiplication
• The question of And• If A & B are independent• p(A and B) = p(A)p(B)
• p(A and B and C) = p(A)p(B)p(C)– Probability of getting a grape and a lemon (after
putting the grape back) after two draws from the bag– p(Grape)*p(Lemon) = 13/60*8/60 = ~.0288
Conditional Probabilities and Joint Events
• Conditional probability – One where you are looking for the probability of some event with
some sort of information in hand– e.g. the odds of having a boy given that you had a girl already.1
• Joint probability– Probability of the co-occurrence of events– E.g. Would be the probability that you have a boy and a girl for
children i.e. a combination of events• In this case the conditional would be higher b/c if we
knew there was already a girl that means they’re of child-rearing age, able to have kids, possibly interested in having more etc.
Conditional probabilities
• If events are not independent then:
• p(X|Y) = probability that X happens given that Y happens– The probability of X “conditional on” Y
• p(A and B) = p(A)*p(B|A)
Conditional probability Example
• Example: once we grab one skittle we aren’t going to put it back (sampling without replacement) so:
– p(A and B and C) = p(A)*p(B|A)*p(C|A,B)
– Probability of getting grape and lemon = p(G)*p(L|G)
– (13/60)(8/59) = .0293
– Note: p(G)*p(L|G) = p(L)*p(G|L)
Joint Probability Example
• What is the probability of obtaining a Female who is Independent from this sample?
• In this case we’re looking for the joint condition of someone who is Female and Independent out of all possible outcomes:2/17 = 11.8
Lib Mod Cons Totals
M 4 4 2 10
F 12 9 3 24
Totals 16 13 5 34
Lib Mod Cons Totals
M 11.8 11.8 5.9 29.4
F 35.3 26.5 8.8 70.6
Totals 47.1 38.2 14.7 100%
Example: Political Party and Gender
Conditional probabilities
• Let’s do a conditional probability: If I have a male, what is the probability of him being in the ‘other’ category? Formally:
• p(A|B) = p(A,B)/p(B)= [p(A)*p(B|A)]/p(B)
• p(O|M) = p(O,M)/p(M)= [p(O)* p(M|O)]/p(M) =
(.412*.714)/.588= ~.5
Conditional probabilities
• Easier way by looking at table- there are 10 males and of those 10 (i.e. given that we are dealing with males) how many are “Other”?
• p(O|M) = 5/10 or 50%.
Permutations
• Permutation is a sequence or ordering of events.
• Basic Question: if I have N objects, how many different orderings of them are there?
• Factorial: N!• Formula: N(N-1)(N-2)…(1)• Example: 5(5-1)(5-2)(5-3)(5-4)
– 5*4*3*2*1 = 120
Permutations
• General formula for finding the number of permutations of size k taken from n objects
PkN
N!
(N k)!
Example: 10 songs on the iPod and we only have time to hear 6. What is the number 6 song orderings that we can make?:
10! = 10! = 10 x 9 x 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1
(10 - 6)! 4! 4 x 3 x 2 x 1
= 10 x 9 x 8 x 7 x 6 x 5 = 151200
PkN
N!
(N k)!
Example
Combinations
• General formula for finding the number of combinations of k objects you can choose from a set of n objects
CkN
N!
k!(N k)!
CkN
N!
k!(N k)!
e.g. How many sets of 6 song groupings (where their order is unimportant) can we make from 10 total (without repeating the same combinations)?
10! = 10! = 10 x 9 x 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1 6!(10 - 6)! 6!(4!) (6 x 5 x 4 x 3 x 2 x 1)( 4 x 3 x 2 x 1)
= 10 x 9 x 8 x 7 = 5040 = 210(4 x 3 x 2 x 1) 24
Example
Binomial in action: Sign test
• Decision: bigger (+) or smaller (-) = binomial
• Makes no assumption about the distribution of means– Might be useful when data is highly skewed
Sign test example
• Memory span for digits and letters 13 subjects
• Digits:7.2, 6.2, 5.9, 8.1, 6.7, 7.0, 7.6, 8.0, 5.8, 6.5, 7.0, 6.9, 6.2
• Letters:6.8, 6.1, 5.9, 6.9, 6.0, 6.5, 7.2, 7.4, 6.0, 6.6, 7.4, 6.8, 6.5
• Sign+, +, =, +, +, +, +, +, -, -, -, +, -8 out of 12 [ignore the =]
Add probabilities
• What is the probability of at least 8 with more digit recall assuming .5 success rate typically, i.e. digit span = letter span?
• p(8) + p(9) + p (10) + p(11) + p(12)
Enter values
• Input the values into the equation
• Check your answer with:BINOMDIST(success,total N, prob., FALSE)
p(X )N!
X!(N X )!pXq(N X )
Equation with values
• End up with:
p(8) 12!
8!(12 8)!0.580.5(12 8)
Decision
• p(8) = .12
• Without even calculating p(9) & p(10) & p(11) & p(12), we can say that the probability of getting at least 8 people with more digit recall than letter recall >.05
• Thus by conventional standards we would fail to reject the null hypothesis– “There is no statistically significant difference found in
the recall span for digits versus letters”