Chapter 3 part b Notes (Word)

advertisement
Chapter 3 Addendum:
Counting Example:
There are 15 members in a club, 9 are males and 6 are females.
1. How many ways can 4 be selected to be President, Vice-president, Secretary and
Treasurer?
2. How many ways can 4 be selected to be on an executive committee?
3. What is the probability that the executive committee in (2) will have exactly 1 Female?
4. What is the probability that the executive committee in (2) will have at least 1 Female?
Answers:
1.
2.
3.
4.
15 P 4 = 15 * 14 * 13 * 12 = 32760
15 C 4 = 15 P 4 / 4! = 1365
P(1F) = 6C1 * 9C3/ 15C4 = 6 * 84 / 1365 = 504/1365 = 0.369
P(1F or 2F or3F or 4F) = 1 – P(0F) = 1 – P(4M) = 1 – 6C0 * 9C4/15C4 = 126/1365 = 0.092
The Partitions Rule: an advanced counting technique:
There are N distinct items. You wish to partition them into k sets.
The ith set will contain ni items as i =1,2, …, k.
For example the 1st set will contain n1 items. The number of distinct partitions is:
N!
n1!n2!...nk !
Note that n1 + n2 + … nk = N
Ex.
I have 15 students. How many ways can I break them up into 3 groups of 4, 5, and 6 students each?
Unknown to me 2 of the students are sick, what is the probability that both sick students are in group of
6, assuming the students are randomly selected to the groups..
Ways: 15! /(4! 5! 6!) = 630630
(๐‘๐‘ข๐‘š๐‘๐‘’๐‘Ÿ ๐‘œ๐‘“ ๐‘ค๐‘Ž๐‘ฆ๐‘  ๐‘๐‘œ๐‘กโ„Ž ๐‘–๐‘› ๐‘”๐‘Ÿ๐‘œ๐‘ข๐‘ ๐‘œ๐‘“ 6) =
๐‘ƒ(๐‘๐‘œ๐‘กโ„Ž ๐‘–๐‘› ๐‘”๐‘Ÿ๐‘œ๐‘ข๐‘ ๐‘œ๐‘“ 6) =
13!
2!
∗ = 90090
4! 5! 4! 2!
90090
= 0.143
630630
Ex: There are 20 TV’s in a shipment to go to dealers A, B and C. A gets 10 TV’s, B gets 6 TV’s and C gets 4
TV’s. a) How many ways can the 20 TV’s be divided among the dealers? b) If there are 3 defective TV’s
and the TV’s are selected randomly, what is probability that A gets all 3 defective TV’s? c) If there are 3
defective TV’s and the TV’s are selected randomly, what is probability that A gets 2 defective TV’s and B
gets 1 defective TV?
a. 20! / (10! * 6! * 4!) = 38798760
b. 17!/(7! 6! 4!) / 38798760 = 4084080/38798760 = .105
c. [17!/(8! 5! 4!)] *[3!/(2! 1! 0!)] = .237
Ex. How many ways can arrange the letters of the word LOOK?
What makes this problem different is that the items are not distinct.
However you can think of this as a partitions rule problem.
You are partitioning the N letters into L’s O’s and K’s.
The answer is 4! /( 1! 2! 1!) = 12
Ex. How many ways can arrange the letters of the word MISSISSIPPI?
11!/(1! 4! 4! 2!) = 34650
Bayes’ rule
Let A be any set. Then A = (A ∩ B) U (A ∩ B´).
P(A) = P[(A ∩ B) U (A ∩ B´)] = P(A ∩ B) + P (A ∩ B´) – 0
P(A) = P(A | B) P(B) + P(A | B´) P(B´) (from Multiplicative Rule)
P(B | A) = P(A ∩ B)/ P(A)
and P(A ∩ B) = P(A |B) P(B)
so
P( B | A) ๏€ฝ
P( A | B) P( B)
P( A | B) P( B) ๏€ซ P( A | B' ) P( B' )
It gives you a way to reverse the order of the conditional.
Ex: A small brewery has 2 bottling machines. Machine A produces 75% of the bottles and machine B
produces 25%. One out of every 20 bottles filled by machine A is rejected. One out of every 30 bottles
filled by machine B is rejected. a) What proportion of bottles are rejected? b) What is the probability
that a randomly selected bottle comes from machine A given it was accepted? c) What is the probability
that a randomly selected bottle comes from machine B, given that it was rejected?
P(A) = .75
P(A´) = .25
C ={bottle is accepted} C´ = {bottle rejected}
P(C´|A ) = .05 = 1/20
P(C|A) = .95
P(C´|A´) = .033 = 1/30 P(C | A´) = .967
Need to find: P(C ‘), P(A|C), P(A´|C´)
P(C´) = P(A ∩ C´) + P(A´ ∩ C´)
P(C´) = P(C´|A)P(A) + P(C´|A´)P(A´)
P(C´) = .05 *.75 + .033 * .25 = .0458
P(A | C) = .95 * .75 /(.95 * .75 + .967 * .25) = .7125/.95425 = .7467
P(A´|C´) = P(C´|A´)/ P(C´|A´)P(A´) + P(C´|A)P(A)
P(A´|C´) = .033 *.25 / [. 00825 + .0375] = .00825/.04575 = .180
Diagnostic testing.
Let S = {condition or disease is present}
Then S´ = {condition or disease is NOT present}
Let T = { test for S is positive}
Then T´ = { test for S is negative}
Sensitivity = P(T | S )
Sensitivity = probability that the test is + given we know the subject has the condition
Specificity = P(T´ | S´)
Specificity = probability that the test is - given we know the subject does not have the condition
P(False Positive) = P(T | S´)
P(False Negative) = P(T´ | S)
Note that
P(False Positive) = P(T | S´) = 1 – P(T´ | S´)
and
P(False Negative) = P(T´ | S) = 1 – P(T | S)
Prevalence of a condition or disease is the percent or probability of the population that has it.
Prevalence = P(S)
What is usually of interest is the probability the subject actually has the condition given the test is + or
the probability the subject actually does not have the condition given the test -.
Ex. It is known that about 1% of women who get a mammogram have breast cancer. The sensitivity of a
mammogram is 0.86 and the specificity is 0.88.
Real Questions:
Given that the mammogram is +, what is the probability the woman has breast cancer?
Given that the mammogram is -, what is the probability the woman does not have breast cancer?
Using Bayes’ Rule:
P(S) = .01
P(T | S) = .86
we want P(S | T) and P(S´ |T´)
P( S | T ) ๏€ฝ
P(T´ | S´) = .88
P(T | S ) P( S )
.86 * .01
.0086
๏€ฝ
๏€ฝ
P(T | S ) P( S ) ๏€ซ P(T | S ' ) P( S ' ) .86 * .01 ๏€ซ .12 * .99 .1274
P(S | T) = .0675
by the same reasoning
P(S´|T´) = .9984
Another Bayes’ Rule Example
A new test is developed for detecting the flu. If the subject has the flu, the test is positive 92% of the
time. If the subject does not have the flu, the test is negative 84% of the time. Assume that 20% of the
population has the flu. A subject is randomly selected, find the probability that:
a.
the subject has the flu, given the test is positive.
b.
the subject does not have the flu, given the test is negative.
c.
the subject both has the flu and tests positive.
d.
the subject both does not have the flu and tests negative.
Answers:
T = {test is positive} D = {subject has the flu}
T’ = {test is negative} D = {subject does not have the flu}
P(T | D) = .92 P(T’|D) = .08 P(T’|D’) = .84 P(T|D’) = .16 P(D) = .20
P(D|T) = P(T|D)P(D) / [P(T|D)P(D) + P(T|D’)P(D’)] =
P(D|T) = .92 * .20 /[.92 * .20 + .16*.80] = .184/.312 = .590
P(D’|T’) = .84 * .80 / [.84*.80 + .08 * .20] = .672/.688 = .977
P(T ∩ D) = .184
P(T’ ∩ D’) = .672
P(D’) = .80
Download