proportions. first, some more probability! why were there so many birthday pairs? 14 people 91 pairs
Post on 21-Dec-2015
212 views
TRANSCRIPT
If we have a total of N events, the number of permutations
that give k successes and
N - k failures is
€
Nk ⎛ ⎝ ⎜
⎞ ⎠ ⎟= N!k!N−k( )!.
Permutations - Example
• If you have five children, three boys and two girls, how many possible birth orders are there?
• Example: BGBGB
Checking...
BBBGG BBGBG BBGGB BGBBG BGBGB
BGGBB GBBBG GBBGB GBGBB GGBBB
Answer = 10 permutationsOne combination (three boys, two girls)
Permutations and probabilities
• The multiplication rule also holds for permutations
• As long as the events are independent!
Probability of a combination
• Consider the previous example:
• What is the probability of the combination three boys, two girls?
Probability of a combination
= (Number of permutations giving that combination)
(Probability of one of those permutations)
* Assumes that events are independent
Binomial distribution
• The probability distribution for the number of “successes” in a fixed number of independent trials, when the probability of success is the same in each trial
The binomial distribution:
P(x) = probability of a total of x successesp = probability of success in each trialn = total number of trials
€
P(x) =n
x
⎛
⎝ ⎜
⎞
⎠ ⎟px 1− p( )
n−x
0
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Number of correct choices
Frequency
Sheep null distribution from computer simulation
0
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Number of correct choices
Frequency
Binomial distribution, n = 20, p = 0.5
Example: Paradise flycatchers
QuickTime™ and aTIFF (Uncompressed) decompressor
are needed to see this picture.
QuickTime™ and aTIFF (Uncompressed) decompressor
are needed to see this picture.
Example: Paradise flycatchers
QuickTime™ and aTIFF (Uncompressed) decompressor
are needed to see this picture.
QuickTime™ and aTIFF (Uncompressed) decompressor
are needed to see this picture.
A population of paradise flycatchers has 80% brown males And 20% white. You capture 5 male flycatchers at random. What is the probability that 3 of these are brown and 2 are white?
Example: Paradise flycatchers
A population of paradise flycatchers has 80% brown males And 20% white. You capture 5 male flycatchers at random. What is the probability that 3 of these are brown and 2 are white?
€
P(x) =n
x
⎛
⎝ ⎜
⎞
⎠ ⎟px 1− p( )
n−x
n = 5 x = 3 p = 0.8
Example: Paradise flycatchers
A population of paradise flycatchers has 80% brown males And 20% white. You capture 5 male flycatchers at random. What is the probability that 3 of these are brown and 2 are white?
€
P(x) =5
3
⎛
⎝ ⎜
⎞
⎠ ⎟0.83 1− 0.8( )
5−3
n = 5 x = 3 p = 0.8
Example: Paradise flycatchers
A population of paradise flycatchers has 80% brown males And 20% white. You capture 5 male flycatchers at random. What is the probability that 3 of these are brown and 2 are white?
€
P(x) = 0.205
n = 5 x = 3 p = 0.8
Binomial distribution, n=5, p=0.8
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
0 1 2 3 4 5
Number of successes (x)
P(x)
The law of large numbers
The greater the sample size, the closer an estimate of a proportion is likely to be to its true value.
Sample size
€
ˆ p
Confidence interval for a proportion*
€
′ p =X + 2
n + 4
€
′ p − Z′ p 1− ′ p ( )
n + 4
⎛
⎝ ⎜ ⎜
⎞
⎠ ⎟ ⎟≤ p ≤ ′ p + Z
′ p 1− ′ p ( )
n + 4
⎛
⎝ ⎜ ⎜
⎞
⎠ ⎟ ⎟
where Z = 1.96 for a 95% confidence interval
* The Agresti-Couli method
Example: The daughters of radiologists
30 out of 87 offspring of radiologists are males, and the rest female. What is the best estimate of the proportion of sons among radiologists?
Binomial test
The binomial test uses data to test whether a population
proportion p matches a null expectation for the proportion.
Example
An example: Imagine a student takes a mul tipl e choice test before
starting a statistics class. Each of the 10 questions on the test have
5 possible answers, only one of which is correct. This student gets 4
answers right. Can we deduce from this that this student knows
anything at all about statistics?
Hypotheses
H0: Student got correct answers randomly.
HA: Student got more answers correct than random.
H0: p=0.2.
HA: p>0.2
N =10, p0 =0.2
€
P = Pr[4] + Pr[5] + Pr[6] + ...+ Pr[10]
=10
4
⎛
⎝ ⎜
⎞
⎠ ⎟ 0.2( )
40.8( )
6+
10
5
⎛
⎝ ⎜
⎞
⎠ ⎟ 0.2( )
50.8( )
5+
10
6
⎛
⎝ ⎜
⎞
⎠ ⎟ 0.2( )
60.8( )
4+ ...
= 0.12