The Binomial Distribution ► Arrangements ► Remember the binomial theorem?

18
The Binomial Distribution Arrangements Remember the binomial theorem?

Transcript of The Binomial Distribution ► Arrangements ► Remember the binomial theorem?

Page 1: The Binomial Distribution ► Arrangements ► Remember the binomial theorem?

The Binomial Distribution

►Arrangements ►Remember the binomial

theorem?

Page 2: The Binomial Distribution ► Arrangements ► Remember the binomial theorem?

Expanding using arrangements

(a+b)4 =

aaaa

+ aaab + aaba + abaa + baaa

+ aabb + abab + abba + baab + baba + bbaa+ abbb + babb + bbab + bbba

+ bbbb

Arrangements of 4 As

Arrangements of 3 As and 1 B

Arrangements of 2 As and 2 Bs

Arrangements of 1 A and 3 BsArrangements of 4

Bs

The 2nd line contains terms corresponding to a3b so coefficient isThe 3rd line contains terms corresponding to a2b2 so coefficient isThe 4th line contains terms corresponding to ab3 so coefficient is

The 1st line contains terms corresponding to a4 so coefficient is

The 5th line contains terms corresponding to b4 so coefficient is

10

4

41

4

62

4

43

4

14

4

Page 3: The Binomial Distribution ► Arrangements ► Remember the binomial theorem?

Arrangements

How many ways are there of arranging these?

)123)(123456(

123456789

!3!6

!9

A A A B B B B B B

84123

789

)!(!

!

rnr

n

r

n

n = 9

r = 3

)!39(!3

!9

3

9

Page 4: The Binomial Distribution ► Arrangements ► Remember the binomial theorem?

Example – using a calculator

How many ways are there of arranging these?

A A A B B B B B B

n = 9

r = 3

3

9

To calculate this, type “9” followed by “nCr” followed by “3” and press equals?

Use your calculator to work out

Explain your answer.

6

9

Page 5: The Binomial Distribution ► Arrangements ► Remember the binomial theorem?

Binomial Theorem

nnnnnn bban

ban

ban

aba

33221

321)(

nn xxn

xn

xn

x

32

3211)1(

A general rule for any expansion is…

A special case occurs when a=1 and b=x …

Page 6: The Binomial Distribution ► Arrangements ► Remember the binomial theorem?

The Binomial Distribution•The binomial distribution is a discrete distribution defined by 2 parameters

•the number of trials - n•the probability of a success - p

),(~ pnBXWRITTEN :

… which means the discrete random variable X is binomially distributed

Page 7: The Binomial Distribution ► Arrangements ► Remember the binomial theorem?

Binomial distribution - example

►Testing for defects “with replacement” Have many light bulbs Pick one at random, test for defect, put it

back Pick one at random, test for defect, put it

back If there are many light bulbs, do not have

to replace

Page 8: The Binomial Distribution ► Arrangements ► Remember the binomial theorem?

Binomial distribution►Consider 3 trials

n=3

►p is the probability of picking a good bulb so (1-p) is the probability of picking a defect bulb

►the random variable X is the measure of the number of good bulbs

►If we want P(X=0): Can happen one way: defect-defect-defect (1-p)(1-p)(1-p) (1-p)3

),(~ pnBX

Page 9: The Binomial Distribution ► Arrangements ► Remember the binomial theorem?

Binomial distribution

►If we want P(X=1): Can happen three ways: 100, 010, 001 p(1-p)(1-p)+(1-p)p(1-p)+(1-p)(1-p)p 3p(1-p)2

For simplicity:1 - good bulb0 - defect bulb

Page 10: The Binomial Distribution ► Arrangements ► Remember the binomial theorem?

Binomial distribution

►If we want P(X=2): Can happen three ways: 110, 011, 101 pp(1-p)+(1-p)pp+p(1-p)p 3p2(1-p)

1 - good bulb0 - defect bulb

Page 11: The Binomial Distribution ► Arrangements ► Remember the binomial theorem?

Binomial distribution

►We want P(X=3): Can happen one way: 111 ppp p3

1 - good bulb0 - defect bulb

Page 12: The Binomial Distribution ► Arrangements ► Remember the binomial theorem?

Binomial distributionP(X=0): (1-p)3

P(X=3): p3

P(X=1): 3p(1-p)2

P(X=2): 3p2(1-p)

rr pprXP 31 waysof #

r is the number of good bulbs

Page 13: The Binomial Distribution ► Arrangements ► Remember the binomial theorem?

Binomial distribution function

In general, the binomial distribution function is given by:

rnr pprXP 1 waysof #

!!

!

rnr

nC rn

rnrr

n ppCrXP 1

rnrr

n qpCrXP or

q = 1 -p

Page 14: The Binomial Distribution ► Arrangements ► Remember the binomial theorem?

Binomial distribution - example

►Testing for defects “with replacement” Suppose 10 bulbs were tested

The probability of a good bulb is 0.7

What is the probability of there being 8 good bulbs in the test?

rnrr

n ppCrXP 1

n = 10

p = 0.7

r = 8

Page 15: The Binomial Distribution ► Arrangements ► Remember the binomial theorem?

Binomial distribution - example

rnrr

n ppCrXP 1

n = 10 p = 0.9 r = 8

81088

10 7.017.08 CXP

45!2!8

!10

!!

!8

10

rnr

nC

28 3.07.0458 XP

= 0.233 (3 d.p.)

Page 16: The Binomial Distribution ► Arrangements ► Remember the binomial theorem?

Binomial distribution

►Typical shape of binomial: Symmetric Mean and Mode approx = p*n

r

P

Page 17: The Binomial Distribution ► Arrangements ► Remember the binomial theorem?

Binomial distribution - expected value

►For the binomial distribution

),(~ pnBX

The mean value of X is given by np

… this is also the expected value of X - E(X)

Page 18: The Binomial Distribution ► Arrangements ► Remember the binomial theorem?

Binomial distribution - example

►Testing for defects “with replacement” Suppose 10 bulbs were tested The probability of a good bulb is 0.7 What is the probability of there being 8

good bulbs in the test?

The mean (expected value)?

= 0.233 (3 d.p.)

The mean value of X is given by np= 10 x 0.7 = 7