Binomial Random Variables and Repeated Trials: Scott Sheffield
Binomial Random Variables and Repeated Trials: Scott Sheffield
600: Lecture 11
Binomial random variables and repeated
trials
Scott Sheffield
MIT
Outline
More problems
Outline
More problems
Bernoulli random variables
More problems
Outline
More problems
Expectation
n
n(n1)...(ni+1)
I Recall that i = i(i1)...(1) . This implies a simple
n n1
but important identity: i i = n i1 .
Useful Pascals triangle identity
n
n(n1)...(ni+1)
I Recall that i = i(i1)...(1) . This implies a simple
n n1
but important identity: i i = n i1 .
I Using this identity (and q = 1 p), we can write
n n
X n i ni X n 1 i ni
E [X ] = i pq = n pq .
i i 1
i=0 i=1
Useful Pascals triangle identity
n
n(n1)...(ni+1)
I Recall that i = i(i1)...(1) . This implies a simple
n n1
but important identity: i i = n i1 .
I Using this identity (and q = 1 p), we can write
n n
X n i ni X n 1 i ni
E [X ] = i pq = n pq .
i i 1
i=0 i=1
Pn n1
p (i1) q (n1)(i1) .
I Rewrite this as E [X ] = np i=1 i1
Useful Pascals triangle identity
n
n(n1)...(ni+1)
I Recall that i = i(i1)...(1) . This implies a simple
n n1
but important identity: i i = n i1 .
I Using this identity (and q = 1 p), we can write
n n
X n i ni X n 1 i ni
E [X ] = i pq = n pq .
i i 1
i=0 i=1
Pn n1
p (i1) q (n1)(i1) .
I Rewrite this as E [X ] = np i=1 i1
I Substitute j = i 1 to get
n1
X n1
E [X ] = np p j q (n1)j = np(p + q)n1 = np.
j
j=0
Decomposition approach to computing expectation
I Identity gives
n
k
X n 1 i1
E [X ] = np p (1 p)ni i k1 =
i 1
i=1
n1
X n1 j
np p (1 p)n1j (j + 1)k1 .
j
j=0
Interesting moment computation
I Let X be binomial (n, p) and fix k 1. What is E [X k ]?
Recall identity: i ni = n n1
i1 .
I
I Identity gives
n
k
X n 1 i1
E [X ] = np p (1 p)ni i k1 =
i 1
i=1
n1
X n1 j
np p (1 p)n1j (j + 1)k1 .
j
j=0
I Thus E [X k ]
= npE [(Y + 1)k1 ] where Y is binomial with
parameters (n 1, p).
Computing the variance
X = nj=1 Xj , so
P
I
X = nj=1 Xj , so
P
I
I E [Xi Xj ] is p if i = j, p 2 otherwise.
Compute variance with decomposition trick
X = nj=1 Xj , so
P
I
I E [Xi Xj ] is p if i = j, p 2 otherwise.
Pn Pn
j=1 E [Xi Xj ] has n terms equal to p and (n 1)n
I
i=1
terms equal to p 2 .
Compute variance with decomposition trick
X = nj=1 Xj , so
P
I
I E [Xi Xj ] is p if i = j, p 2 otherwise.
Pn Pn
j=1 E [Xi Xj ] has n terms equal to p and (n 1)n
I
i=1
terms equal to p 2 .
I So E [X 2 ] = np + (n 1)np 2 = np + (np)2 np 2 .
Compute variance with decomposition trick
X = nj=1 Xj , so
P
I
I E [Xi Xj ] is p if i = j, p 2 otherwise.
Pn Pn
j=1 E [Xi Xj ] has n terms equal to p and (n 1)n
I
i=1
terms equal to p 2 .
I So E [X 2 ] = np + (n 1)np 2 = np + (np)2 np 2 .
I Thus
Var[X ] = E [X 2 ] E [X ]2 = np np 2 = np(1 p) = npq.
Outline
More problems
Outline
More problems
More examples
I An airplane seats 200, but the airline has sold 205 tickets.
Each person, independently, has a .05 chance of not showing
up for the flight. What is the probability that more than 200
people will show up for the flight?
More examples
I An airplane seats 200, but the airline has sold 205 tickets.
Each person, independently, has a .05 chance of not showing
up for the flight. What is the probability that more than 200
people will show up for the flight?
P205 205
j 205j
j .95 .05
I
j=201
More examples
I An airplane seats 200, but the airline has sold 205 tickets.
Each person, independently, has a .05 chance of not showing
up for the flight. What is the probability that more than 200
people will show up for the flight?
P205 205
j 205j
j .95 .05
I
j=201
I In a 100 person senate, forty people always vote for the
Republicans position, forty people always for the Democrats
position and 20 people just toss a coin to decide which way to
vote. What is the probability that a given vote is tied?
More examples
I An airplane seats 200, but the airline has sold 205 tickets.
Each person, independently, has a .05 chance of not showing
up for the flight. What is the probability that more than 200
people will show up for the flight?
P205 205
j 205j
j .95 .05
I
j=201
I In a 100 person senate, forty people always vote for the
Republicans position, forty people always for the Democrats
position and 20 people just toss a coin to decide which way to
vote. What is the probability that a given vote is tied?
20
20
10 /2
I
More examples
I An airplane seats 200, but the airline has sold 205 tickets.
Each person, independently, has a .05 chance of not showing
up for the flight. What is the probability that more than 200
people will show up for the flight?
P205 205
j 205j
j .95 .05
I
j=201
I In a 100 person senate, forty people always vote for the
Republicans position, forty people always for the Democrats
position and 20 people just toss a coin to decide which way to
vote. What is the probability that a given vote is tied?
20
20
10 /2
I
I An airplane seats 200, but the airline has sold 205 tickets.
Each person, independently, has a .05 chance of not showing
up for the flight. What is the probability that more than 200
people will show up for the flight?
P205 205
j 205j
j .95 .05
I
j=201
I In a 100 person senate, forty people always vote for the
Republicans position, forty people always for the Democrats
position and 20 people just toss a coin to decide which way to
vote. What is the probability that a given vote is tied?
20
20
10 /2
I