Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
TTT 1 1 1 1
HTT IP{Y = 0} = . . =
2 2 2 8
THT 1 1 1
3
TTH IP{Y = 1} = 3 . . =
2 2 2 8
HHT
HTH 1 1 1 3
IP{Y = 2} = 3 . . ) =
THH 2 2 2 8
HHH 1 1 1 1
IP{Y = 3} = . . =
2 2 2 8
Tossing a Biased Coin
n! = (4)(3)(2)(1) = 24.
Note. 0! = 1.
Background: Binomial Coefficients
n Cj
n!
n Cj =
j!(n − j)!
n Cjcounts all of the ways that j successes can appear in n
total trials.
Example n = 5, j = 3.
5! (5)(4)
= = 10.
3!2! 2
cf. Table 2 p.674 for the n Cj numbers.
Chalkboard
Y ∼ B(n, p)
Can we “guess” the answer:
IP{Y = j} =?
Binomial Distribution Formula
IP{Y = j} = n Cj pj (1 − p)n−j
IP{Y = j} = n Cj pj (1 − p)n−j
n!
= pj (1 − p)n−j
j!(n − j)!
Example
n!
IP{Y = j} = pj (1 − p)n−j
j!(n − j)!
Question:
You toss a fair coin 3 times, what is the probability of getting 2
heads.
Answer:
p = .5 (fair coin), n = 3 tosses, j = 2 Heads. We get
3! 3.2.1
IP{Y = 2} = (.5)2 (.5)1 = (.5)3 = 3/8
2! 1! 2.1 1
Example
n!
IP{Y = j} = pj (1 − p)n−j
j!(n − j)!
Question:
Y ∼ B(7, .6). Compute IP{Y = 2}.
Answer:
p = .6, n = 7 tosses, j = 2 Heads. We get
7! 7.6 5!
IP{Y = 2} = (.6)2 (.4)5 = (.6)2 (.4)5
2! 5! 1.2 5!
= 21(.6)2 (.4)5 = .0774
Example
n!
IP{Y = j} = pj (1 − p)n−j
j!(n − j)!
y 0 1 2 3 4 5 6
IP{Y = y } 0.335 0.402 0.200 0.054 0.008 0.0006 0.00002
Mean, Variance, and Standard Deviation for Binomial
Random Variables
Recall the Formula for Mean,Variance for a General
Discrete Random Variable
X
E(Y ) = yi IP{Y = yi } ,
X
Var(Y ) = (yi − µY )2 IP{Y = yi } ,
where the yi ’s are the values that the variable takes on and the
sum is taken over all possible values.
What if Y ∼ Bin(100, .5)
Do I have to sum over 101 different values?!?
Mean, Variance, and Standard deviation
If Y ∼ B(n, p) then
µ = IEY = np,
σ 2 = np(1 − p),
and
p
σ= np(1 − p)
Example
µY = np = 50
√
σY = 25 = 5.
The assumptions for the binomial model
Underlying assumptions
n!
IP{Y = j} = pj (1 − p)n−j
j!(n − j)!