permutations - mathematicalminds.net

advertisement
Statistics
Probabilities
Chapter 4
Example Problems
Probability Rules
• Probabilities must be between 0 and 1
– Where 0 is impossible
– Where 1 is certain
– No negative probabilities
• All probabilities must add to 1
Finding Probabilities
• What is the probability of
exactly 0 girls out of the 3?
– I see only 1 way for this to
happen out of a total of 8
outcomes or 1/8
1st
2nd
3rd
boy
boy
boy
boy
boy
girl
boy
girl
boy
boy
girl
girl
girl
boy
boy
girl
boy
girl
girl
girl
boy
girl
girl
girl
Finding Probabilities
• What is the probability of
exactly 3 girls out of the 3?
– I see only 1 way for this to
happen out of a total of 8
outcomes or 1/8
1st
2nd
3rd
boy
boy
boy
boy
boy
girl
boy
girl
boy
boy
girl
girl
girl
boy
boy
girl
boy
girl
girl
girl
boy
girl
girl
girl
Finding Probabilities
• What is the probability of
exactly 2 girls out of the 3?
– I see 3 ways for this to happen
out of a total of 8 outcomes or
3/8
1st
2nd
3rd
boy
boy
boy
boy
boy
girl
boy
girl
boy
boy
girl
girl
girl
boy
boy
girl
boy
girl
girl
girl
boy
girl
girl
girl
Acceptance Sampling
• With one method of a procedure called acceptance
sampling a sample of items is randomly selected
without replacement and the entire batch is
accepted if every item in the sample is okay.
• A company has just manufactured 1561 CDs, and
209 are defective. If 10 of these CDs are randomly
selected for testing, what is the probability that the
entire batch will be accepted?
Acceptance Sampling
• A company has just manufactured 1561 CDs, and
209 are defective. If 10 of these CDs are randomly
selected for testing, what is the probability that
the entire batch will be accepted?
• P(entire batch accepted) = # of good CDs / total number of selecting CDs
• If there are 1561 CDs and 209 are defective this means
1561 – 209 = 1352 are the number of good CDs.
• In the denominator we have 1561 total CDs to chose from. This gives the
probability that if we chose one CD it would be accepted.
• P(choose one and it was good) = 1352/1561
– But we want to choose 10, not one.
Acceptance Sampling
• Multiply
• (1352/1561) (1352/1561) (1352/1561) (1352/1561)
(1352/1561) (1352/1561) (1352/1561) (1352/1561)
(1352/1561) (1352/1561)
• Or
• (1352/1561)10 = 0.238 (rounded to nearest thousandth)
• (1352/1561)^10 in calculator (find the ^ key)
Conditional Probabilities
• The data represents the results for a test for a
certain disease. Assume one individual from
the group is randomly selected.
– Find the probability of getting someone who tests
positive, given that he or she did not have the
disease.
Yes
No
Positive
120
18
Negative
21
141
Conditional Probabilities
• Find the probability of getting someone who
tests positive, given that he or she did not
have the disease.
• So you are looking for P(test positive | did not have the
disease)
= P (test positive AND did not have the disease) / P(did
not have the disease) = 18/(18+141) = 18/159 = 0.113
Yes
No
Positive
120
18
Negative
21
141
Factorials
• The ! means factorial and to multiply from the
value shown down to 1. For example,
• 6! = 6*5*4*3*2*1
• But what if you had 100!
– Do you want to multiply 100*99*98…down to 1?
• Calculator Time!
Factorials
• To find 6!
– Type 6
– Press the MATH button
– Arrow over to PRB
– Arrow down to !
– Press Enter
– You should see 720
Permutations / Combinations
• Permutations may be written as
P3
• Which means 46 objects taken 3 at a time where
ORDER MATTERS
• 46
• Combinations may be written as
C3
• Which means 46 objects taken 3 at a time where
ORDER DOES NOT MATTER
• 46
Combinations
• Find the probability of winning a lottery with the
following rule.
– Select the five winning numbers from
1, 2, …, 31 (in any order, no repeats)
• Remember to find probabilities you find the number of
ways the outcome you are looking for can occur /
number of events. So in other words this would be the
number of ways you can win the lottery / the number
of combinations of numbers you can pick. I know this
is a combinations versus permutations because in the
question it says “any order”
Combinations
•
•
•
•
Thus, I use the formula nCr = n! / (n-r)! r!
This will give me the number of combinations you can pick,
where n = 31 numbers, r = 5 winning numbers
So with your calculator you want 31C5 or 31! / (31-5)! 5!. With the
TI calculator the steps would be
–
–
–
–
–
–
•
Type 31
Press Math
Arrow over to PRB
Arrow down to nCr and press enter
Type 5
Press Enter
You should get 169,911 which is the number of combinations of
selecting 5 numbers, which is the denominator in our definition =
the number of ways you can win the lottery / the number of
combinations of numbers you can pick.
– Then, there is only ONE way to win the lottery, thus our final
answer would be 1/169,911
Permutations
• A certain lottery is won by selecting the
correct four numbers from 1, 2, …, 37. The
probability of winning that game is 1/66,045.
What is the probability of winning if the rules
changed so that in addition to selecting the
correct four numbers you must now select
them in the same order as they are drawn?
Permutations
• Ok, the key is that you are trying to find the number of
ways you can win, that is, select the four numbers in
order / number of total ways to select any numbers.
Because order matters this makes it permutations. We
have 37 total numbers and we want to take 4 at a time.
• So on your calculator this is
•
•
•
•
•
•
37
Math
Arrow over to PRB
Down to nPr
4
Enter
Permutations
• And you should get 1585080 and you can only
win one way, so the probability is 1/1585080.
• Long way would be
• P(37,4) = 37! / (37-4)! = 37! / 33! =
37*36*35*34*33!/33! = 37*36*35*34 = 1585080.
Permutations
• Given: 20 babies were born and 18 were boys.
• Find the number of different possible sequences of
genders that are possible when 20 babies are born.
– Ok, there can only be two things (we hope) that can
occur. A boy or A girl. So the possible sequences then
would be
2 ways for the 1st child AND 2 ways for the 2nd
child......*2 ways for the 20th child or 2^20 = 1048576
Permutations
• How many ways can 18 boys and 2 girls be arranged in sequence.
– The key word is arranged. Does order matter? It didn't say so this is the
use of Combinations.
• On the TI-83 (or 84) type 20 and then press the MATH button, arrow to the
PRB and down to nCR and ENTER and then type 18 and ENTER.
• If 20 babies are randomly selected, what is the probability that they consist
of 18 boys and 2 girls?
– P(18 boys and 2 girls) = # of ways to get 18 boys and 2 girls / # ways to get 20
kids which we just found 190 / 1048576 = 0.0001812
• Does the gender-selection method appear to yield results that is significantly
different from a result that might be expected by random change?
– Certainly because this is a very small probability.
Download