Chapter 7 Special Discrete Distributions. Binomial Distribution B(n,p) Each trial results in one of...

44
Chapter 7 Special Discrete Distributions

Transcript of Chapter 7 Special Discrete Distributions. Binomial Distribution B(n,p) Each trial results in one of...

Chapter 7Special Discrete

Distributions

Binomial Distribution B(n,p)• Each trial results in one of two

mutually exclusive outcomes. (success/failure)

• There are a fixed number of trials• Outcomes of different trials are

independent• The probability that a trial results

in success is the same for all trials• The binomial random variable x is

defined as the number of successes out of the fixed number

Are these binomial distributions?1) Toss a coin 10 times and count

the number of headsYes

2) Deal 10 cards from a shuffled deck and count the number of red cards

No, probability does not remain constant

3) Two parents with genes for O and A blood types and count the number of children with blood type O

No, no fixed number

Binomial example

Take the example of 5 coin tosses. What’s the probability that you flip exactly 3 heads in 5 coin tosses?

Binomial distributionSolution:One way to get exactly 3 heads: HHHTT

What’s the probability of this exact arrangement?

P(heads)xP(heads) xP(heads)xP(tails)xP(tails) =(1/2)3 x (1/2)2

Another way to get exactly 3 heads: THHHT

Probability of this exact outcome = (1/2)1 x (1/2)3 x (1/2)1 = (1/2)3 x (1/2)2

Binomial distributionIn fact, (1/2)3 x (1/2)2 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:(1/2)3 x (1/2)2 + (1/2)3 x (1/2)2 + (1/2)3 x (1/2)2 + ….. for as many unique arrangements as there are—but how many are there??

 

Outcome Probability THHHT (1/2)3 x (1/2)2

HHHTT (1/2)3 x (1/2)2

TTHHH (1/2)3 x (1/2)2

HTTHH (1/2)3 x (1/2)2

HHTTH (1/2)3 x (1/2)2

THTHH (1/2)3 x (1/2)2

HTHTH (1/2)3 x (1/2)2

HHTHT (1/2)3 x (1/2)2

THHTH (1/2)3 x (1/2)2

HTHHT (1/2)3 x (1/2)2

10 arrangements x (1/2)3 x (1/2)2

 

The probability of each unique outcome (note: they are all equal)

ways to arrange 3 heads in 5 trials

5

3

5C3 = 5!/3!2! = 10

 P(3 heads and 2 tails) = x P(heads)3 x P(tails)2 =

10 x (½)5=31.25%

5

3

x

p(x)

0 3 4 51 2

Binomial distribution function:X= the number of heads tossed in 5 coin tosses

number of heads

p(x)

number of heads

11 1

1 2 11 3 3 1

1 4 6 4 11 5 10 10 5 1

1 6 15 20 15 6 11 7 21 35 35 21 7 1

1 8 28 56 70 56 28 8 11 9 36 84 126 126 84 36 9 1

Pascal’s Triangle!

!

! !n r

n nC

r r n r

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?

 

Solution:Outcome Probability YYNNNN = (.551)2 x (.449)4

NYYNNN (.449)1 x (.551)2 x (.449)3 = (.551)2 x (.449)4

NNYYNN (.449)2 x (.551)2 x (.449)2 = (.551)2 x (.449)4

NNNYYN (.449)3 x (.551)2 x (.449)1 = (.551)2 x (.449)4

NNNNYY (.449)4 x (.551)2 = (.551)2 x (.449)4

.

.

ways to arrange 2 Obama votes among 6 voters

6

2

15 arrangements x (.551)2 x (.449)4  

6

2

P(2 yes votes exactly) = x (.551)2 x (.449)4 = 18.5%

Binomial Formula:

knk ppk

nkxP

1)(

Where:

knCk

n

n = number of trials

K = # successes out of n trials

p = probability of success

1-p = probability of failure

Toss a 3 coins and count the number of heads

Find the discrete probability distributionX 0 1 2 3

P(x) .125 .375 .375 .125

Out of 3 coins that are tossed, what is the probability of getting exactly 2 heads?

Out of 3 coins that are tossed, what is the probability of getting exactly 2 heads?

375.5.05.02

3)2( 12

xP

Binomial distribution: example

If I toss a coin 20 times, what’s the probability of getting exactly 10 heads?

176.)5(.)5(. 101020

10

The number of inaccurate gauges in a group of four is a binomial random variable. If the probability of a defect is 0.1, what is the probability that only 1 is defective?

More than 1 is defective?

2916.9.01.01

4)1( 31

xP

0523.))1()0((1)1( PPxP

Practice problems

If the probability of being a smoker among a group of cases with lung cancer is .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

X P(X) 0 1(.4)8=.00065 1 8(.6)1 (.4) 7 =.008 2 28(.6)2 (.4) 6 =.04 3 56(.6)3 (.4) 5 =.12 4 70(.6)4 (.4) 4 =.23 5 56(.6)5 (.4) 3 =.28 6 28(.6)6 (.4) 2 =.21 7 8(.6)7 (.4) 1=.090 8 1(.6)8 =.0168

11 1

1 2 11 3 3 1

1 4 6 4 11 5 10 10 5 1

1 6 15 20 15 6 11 7 21 35 35 21 7 1

1 8 28 56 70 56 28 8 1

Answer, continued

1 4 52 3 6 7 80

Answer, continued

1 4 52 3 6 7 80

E(X) = 8 (.6) = 4.8Var(X) = 8 (.6) (.4) =1.92StdDev(X) = 1.38

P(<2)=.00065 + .008 = .00865 P(>5)=.21+.09+.0168 = .3168

Calculator

• Binomialpdf(n,p,x) – this calculates the probability of a single binomial P(x = k)

• Binomialcdf(n,p,x) – this calculates the cumulative probabilities from P(0) to P(k)

OR P(X < k)

A genetic trait of one family manifests itself in 25% of the offspring. If eight offspring are randomly selected, find the probability that the trait will appear in exactly three of them.

Less than half?

At least 5?

( 3) (8,.25,3) .2076P X binomialpdf

0273.)4,25,.8(1)5( fbinomialcdXP

( 4) (8,.25,3) .8862P X binomialcdf

In a certain county, 30% of the voters are Republicans. If ten voters are selected at random, find the probability that no more than six of them will be Republicans.

P(x < 6) = binomcdf(10,.3,6) = .9894What is the probability that at least 7 are not Republicans?

P(x > 7) = 1 - binomcdf(10,.7,6) = .6496

Binomial formulas for mean and standard

deviation

pnp

np

x

x

1

In a certain county, 30% of the voters are Republicans. How many Republicans would you expect in ten randomly selected voters?

What is the standard deviation for this distribution?

sRepublican45.1)7)(.3(.10

sRepublican3)3(.10

x

x

expect

What happens to the shape of the distribution as the probability of success increased?

•In L1 – seq(x,x,0,10)

•In L2 – binompdf(10, .1 ,L1)

•Sketch histogram on board

What happened to the shape of the distribution as the probability of success increased?As the probability of success

increases, the shape changes from being skewed right to symmetrical at p =.5 to skewed left.

•Calculate the mean and standard deviations for each of the probabilities

What do you notice?As the probability of success increases,

• the means increase.

• the standard deviations increase to p = .5, then decrease. Their values are also symmetrical.

Geometric Distributions:

• There are two mutually exclusive outcomes

• Each trial is independent of the others

• The probability of success remains constant for each trial.

• The random variable x is the number of trials UNTIL the FIRST success occurs.

So what are the possible values of X

X 1 2 3 4

How far will this go?

. . .

To infinity

• The difference between binomial and geometric properties is that there is NOT a fixed number of trials in geometric distributions!

Differences between binomial & geometric

distributions

•Binomial random variables start with 0 while geometric random variables start with 1

Other differences:

•Binomial distributions are finite, while geometric distributions are infinite

Geometric Formulas:

2

1

1

1

1)(

pp

p

ppxP

x

x

x

Not on formula sheet – they will be given on quiz

or test

Count the number of boys in a family of four children.Binomial:

X 0 1 2 3 4

Count children until first son is born

Geometric:

X 1 2 3 4 . . .

What are the values for

these random variables?

Calculator• geometpdf(p,x) – finds the

geometric probability for P(X = k)

• Geometcdf(p,x) – finds the cumulative probability for P(X < k)

No “n” because there

is no fixed number!

What is the probability that the first son is the fourth child born?

What is the probability that the first son born is at most the fourth child?

0625.)4,5(.)4( dfgeometricpXP

9375.)4,5(.)4( dfgeometriccXP

What is the probability that the first son born is at least the third child? 25.)2,5(.1)3( dfgeometriccXP

A real estate agent shows a house to prospective buyers. The probability that the house will be sold to the person is 35%. What is the probability that the agent will sell the house to the third person she shows it to?How many prospective buyers does she expect to show the house to before someone buys the house? SD?

1479.)3,35(.)3( dfgeometricpxP

buyers86.235.1

x buyers304.235.

35.12

x

•In L1 – input the x-values

•In L2 – geometpdf(.1 ,L1)

•Sketch histogram on board

What happened to the shape of the distribution as the probability of success increased?

As the probability of success increases, the shape becomes more & more strongly skewed right

•Calculate the mean and standard deviations for each of the probabilities

What do you notice?As the probability of success increase,

• the means decrease

• the standard deviations decrease.