0% found this document useful (0 votes)
10 views30 pages

MTH204 - Week 11 - CH 5 Binomial Distribution

Uploaded by

skillzooahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views30 pages

MTH204 - Week 11 - CH 5 Binomial Distribution

Uploaded by

skillzooahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 30

Chapter 5: Discrete PDFs

Binomial and Poisson distributions


• Dr. Mai Hassan
Binomial Probability Distribution

• A fixed number of observations (trials), n


• E.g., 15 tosses of a coin; 20 patients; 1000 people surveyed
• A binary random variable
• E.g., head or tail in each toss of a coin; defective or not defective light bulb
• Generally called “success” and “failure”
• Probability of success is p, probability of failure is 1-p
• Constant probability for each observation
• E.g., Probability of getting a tail is the same each time we toss the coin
Binomial Example

• Take the example of 5 coin tosses.


• What’s the probability that you flip exactly 3 heads in 5 coin tosses?

• Solution:
• One way to get exactly 3 heads: HHHTT
• What’s the probability of this exact arrangement?

=
• Another way to get exactly 3 heads: THHHT
• Probability of this exact outcome =
Binomial Distribution

• In fact, is the probability of each unique outcome that has exactly 3 heads
and 2 tails.

• So, the overall probability of 3 heads and 2 tails is:

• +

• for as many unique arrangements as there are but how many are there??
Binomial Distribution

Outcome Probability
THHHT
HHHTT
TTHHH
HTTHH The probability of
HHTTH each unique
ways to arrange THTHH outcome
3 heads in 5 trials HTHTH
HHTHT (note: they are all
THHTH equal)
HTHHT
10 arrangements
Binomial Distribution Function

• X= the number of heads tossed in 5 coin tosses


Example 2

• As voters exit the polls, you ask a representative random sample of 6


voters if they voted for proposition 100.

• If the true percentage of voters who vote for the proposition is 55.1%,

• What is the probability that, in your sample, exactly 2 voted for the
proposition and 4 did not?
Answer 2
Outcome Probability
YYNNNN
NYYNNN
NNYYNN
ways to arrange
2 Obama votes NNNYYN
among 6 voters NNNNYY
.
.
15 arrangements

6
() 2 4
∴ 𝑃 ( 2 𝑦𝑒𝑠𝑣𝑜𝑡𝑒𝑠 𝑒𝑥𝑎𝑐𝑡𝑙𝑦 )= × ( 0.551 ) × ( 0 .449 ) =18.5 %
2
Binomial Distribution, Generally

• Note the general pattern emerging


• → if you have only two possible outcomes (call them 1/0 or yes/no or
success/failure) in n independent trials
• Then the probability of exactly X “successes”

Where,
• = number of trials
• X = # successes out of trials
• p = probability of success
• 1-p = probability of failure
Definitions: Binomial

• Binomial: Suppose that n independent experiments, or trials, are performed,


• where is a fixed number, and
• that each experiment results in a “success” with probability
• and a “failure” with probability .
• The total number of successes, is a binomial random variable with parameters and
• We write:
• Reads: “ is distributed binomially with parameters and
• And the probability that (i.e., that there are exactly successes) is:

𝑃 ( 𝑋 =𝑟 ) = 𝑛
𝑟
𝑟
( )
𝑝 (1 −𝑝 )
𝑛− 𝑟
Definitions: Bernoulli

• Bernoulli trial: If there is only 1 trial with a probability of success and a


probability of failure , this is called a Bernoulli distribution.
• Special case of the binomial with
• Probability of success:

𝑃 ( 𝑋 =1 )= 1
1
1
( )
𝑝 (1 −𝑝 )
1− 1
=𝑝

• Probability of failure:

𝑃 ( 𝑋 =0 )= 1
0
0
()
𝑝 ( 1− 𝑝 )
1−0
=1 − 𝑝
Binomial Distribution: Example

• If I toss a coin 20 times


• What’s the probability of getting exactly 10 heads?
Binomial Distribution: Example

• If I toss a coin 20 times


• What’s the probability of getting 2 or fewer heads?
Characteristics of Binomial Distribution

• All probability distributions are characterized by an expected value and a


variance

• If follows a binomial distribution with parameters and :

• Then:
Characteristics of Bernoulli Distribution

• For Bernoulli

• Then:
Variance Proof (optional!)

• For , Y =1 if yes and Y = 0 if No

• For X
Recall Coin Toss Example

• number of heads in 100 tosses of a coin


Practice problems

1. You are performing a cohort study.


• If the probability of developing disease in the exposed group is 0.05 for
the study duration
• Then if you sample (randomly) 500 exposed people
• How many do you expect to develop the disease?
• Give a margin of error (+/ 1 standard deviation) for your estimate.

2. What’s the probability that at most 10 exposed people develop the


disease?
Answer

1. This is asking for a CUMULATIVE PROBABILITY: the probability of 0


getting the disease or 1 or 2 or 3 or 4 or up to 10.
Pascal’s Triangle Trick

• You’ll rarely calculate the binomial by hand.


• However, it is good to know how to …
Pascal’s Triangle Trick for calculating binomial coefficients
• Recall from math in your past that Pascal’s Triangle is used to get the
coefficients for binomial expansion …

• For example, to expand:


• The powers follow a set pattern:
• But what are the coefficients?
• Use Pascal’s Magic Triangle…
Pascal’s Triangle
Edges are all 1’s

1
To get the coefficient 1 1
for expanding to the 1 2 1
power, use the row Add the two numbers in
1 3 3 1
that starts with 5. the row above to get the
1 4 6 4 1
number below, e.g.:
1 5
10 10 5 1 3+1=4; 5+10=15
1 6 15 20 15 6 1
1 7 21 35 35 21 7 1

( 𝑝+𝑞 )5 =𝟏𝑝 5 +𝟓𝑝 4 𝑞1 +𝟏𝟎𝑝 3 𝑞2 +𝟏𝟎𝑝 2 𝑞3 +𝟓𝑝 1 𝑞 4 +𝟏𝑞 5


Pascal’s Triangle

• Same coefficients for


• For example, X=# heads in 5coin tosses:
X P(X)
0 X P(X)
0
1
1 From line 5
2 2 of Pascal’s
triangle!
3
3
4
4 5

5
Relationship between binomial pdf & binomial expansion

• If p + q = 1 (which is the case if they are binomial probabilities)

• Then: or, equivalently:

• (the probabilities sum to 1, making it a probability distribution!)


Practice Problems

• If the probability of being a smoker among a group of cases with lung


cancer is 0.6

• What’s the probability that in a group of 8 cases, you have less than 2
smokers?

• More than 5?

• What are the expected value and variance of the number of smokers?
Answer 1
1 1
1 2 1
1 3 3 1
X P(X) 1 4 6 4 1
0 1 5 10 10 5 1
1 6 15 20 15 6 1
1
1 7 21 35 35 21 7 1
2
3 12 1 8 28 56 70 56 28 8 1

4
5
6
7
8
Answer, Cont’d
Practice Problem

• If Stanford tickets in the medical center ‘A’ lot approximately twice a week
(2/5 weekdays)

• If you want to park in the ‘A’ lot twice a week for the year

• Are you financially better off buying a parking sticker (which costs $726
for the year) or parking illegally (tickets are $35)
Answer

• Use Binomial
• Let X be a random variable that is the number of tickets you receive in a
year.
• Assuming 2 weeks vacation, there are days (twice a week for 50 weeks)
you’ll be parking illegally.
• is the chance of receiving a ticket on a given day:

• tickets expected (with std dev of about 5)


• 40 x $35 = $1400 in tickets (+/- $200); better to buy the sticker!

You might also like