Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments &...

18
Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments & Examples j l

Transcript of Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments &...

Page 1: Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments & Examples jl.

Thermo & Stat Mech - Spring 2006 Class 16

More Discussion of the Binomial Distribution: Comments & Examples

jl

Page 2: Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments & Examples jl.

The Binomial Distribution applies ONLY to cases where there are only 2 possible outcomes: heads or tails, success or failure, defective or good item, etc.

The requirements justifying the use of the Binomial Distribution are:

1. The experiment must consist of n identical trials.2. Each trial must result in only one of 2 possible

outcomes. 3. The outcomes of the trials must be statistically

independent.4. All trials must have the same probability for a

particular outcome.

Page 3: Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments & Examples jl.

Binomial DistributionThe Probability of n Successes

out of N Attempts is:

p = Probability of a Successq = Probability of a Failure

q = 1 – p(p + q)N = 1

nNnqpnNn

NnP

)!(!!

)(

Page 4: Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments & Examples jl.

Thermo & Stat Mech - Spring 2006 Class 16

Mean of the Binomial Distribution

l

Page 5: Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments & Examples jl.

5

Standard Deviation () of the Binomial Distribution

pNqpNppNpNn

qpNpNqpNpn

qppNp

pqpp

pp

pn

nPp

pnnPn

NN

NN

nn

1

))(1()(

)()(

)()(

2

212

12

222

Npq

NpqpNpNNpq

pNpNqpN

nn

222

22

222

)()(

)(

1 2

3

Page 6: Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments & Examples jl.

For The Binomial Distribution

Npq

n

Npq

pNn

Page 7: Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments & Examples jl.

Common Notation for the Binomial Distributionr items of one type & (n – r) of a second type can be arranged in nCr ways. Here:

r)!(nr!

n!Crn

nCr is called the binomial coefficientIn this notation, the probability distribution can be written:

Wn(r) = nCrpr(1-p)n-r

≡ probability of finding r items of one type & n – r items of the other type. p = probability of a given item being of one type .

Page 8: Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments & Examples jl.

Binomial Distribution: ExampleProblem: A sample of n = 11 electric bulbs is drawn every day from those manufactured at a plant. The probabilities of getting defective bulbs are random and independent of previous results. The probability that a given bulb is defective is p = 0.04.

1. What is the probability of finding exactly three defective bulbs in a sample?

(Probability that r = 3?)2. What is the probability of finding three or more defective bulbs in a sample?

(Probability that r ≥ 3?)

Page 9: Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments & Examples jl.

Thermo & Stat Mech - Spring 2006 Class 16

9

Binomial Distribution, n = 11

Number of Defective Bulbs, r

Probability

11Crpr(1-p)n-r

p = 0.04

0 11C0 (0.04)0(0.96)11 = 0.6382

1 11C1 (0.04)1(0.96)10 = 0.2925

2 11C2 (0.04)2(0.96)9 = 0.0609

3 11C3 (0.04)3(0.96)8 = 0.0076

l

Page 10: Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments & Examples jl.

Thermo & Stat Mech - Spring 2006 Class 16

10

Question 1: Probability of finding exactly three defective bulbs in a sample?

P(r = 3 defective bulbs) = W11(r = 3) = 0.0076

Question 2: Probability of finding three or more defective bulbs in a sample?

P(r ≥ 3 defective bulbs) =

1- W11(r = 0) – W11(r = 1) – W11(r = 2) =

1 – 0.6382 - 0.2925 – 0.0609 = 0.0084l

Page 11: Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments & Examples jl.

Thermo & Stat Mech - Spring 2006 Class 16

11

Binomial Distribution, Same Problem, Larger r

Number of Defective Bulbs, r

Probability

11Crpr(1-p)n-r

0 11C0(0.04)0(0.96)11 = 0.638239

1 11C1 (0.04)1(0.96)10 = 0.292526

2 11C2 (0.04)2(0.96)9 = 0.060943

3 11C3 (0.04)3(0.96)8 = 0.007618

4 11C4 (0.04)4(0.96)7 = 0.000635

5 11C5 (0.04)5(0.96)6 = 0.000037

l

Page 12: Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments & Examples jl.

Thermo & Stat Mech - Spring 2006 Class 16

12

BinomialDistribution

n = 11, p = 0.04

l

Distribution ofDefective Items

Distribution ofGood Items

Page 13: Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments & Examples jl.

Thermo & Stat Mech - Spring 2006 Class 16

13

• Consider a perfect coin. There are only 2 sides, so the probability associated with coin flipping is

The Binomial Distribution.• Problem: 6 perfect coins are flipped. What is the

probability that they land with n heads & 1 – n tails? Of course, this only makes sense if 0 ≤ n ≤ 6! For this case, the Binomial Distribution has the form:

l

The Coin Flipping Problem

Page 14: Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments & Examples jl.

Thermo & Stat Mech - Spring 2006 Class 16

14

Binomial Distribution for Flipping 1000 Coins

l

Note: The distribution peaks around n = 500 successes (heads), as we would expect ( = 500)

Page 15: Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments & Examples jl.

Thermo & Stat Mech - Spring 2006 Class 16

15

Binomial Distribution for Selected Values of n & p

l

n = 20, p = 0.5n = 10, p = 0.1 &

n =10, p = 0.9

Page 16: Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments & Examples jl.

Thermo & Stat Mech - Spring 2006 Class 16

Binomial Distribution for Selected Values of n & p

l

.0

.2

.4

.6

0 1 2 3 4 5

X

P(X)

.0

.2

.4

.6

0 1 2 3 4 5

X

P(X)

n = 5, p = 0.1 n = 5, p = 0.5

.0

.2

.4

.6

0 1 2 3 4 5

X

P(X)

.0

.2

.4

.6

0 1 2 3 4 5

X

P(X)

n = 10, p = 0.5

Page 17: Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments & Examples jl.

Thermo & Stat Mech - Spring 2006 Class 16

Binomial Distribution for Selected Values of n & p

l

n = 5, p = 0.5

n = 20, p = 0.5

n = 100, p = 0.5

Page 18: Thermo & Stat Mech - Spring 2006 Class 16 More Discussion of the Binomial Distribution: Comments & Examples jl.

Binomial Distribution for Selected Values of n & p