Top Banner
Stat 211 Week Five The Binomial Distribution
43

The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Jul 12, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Stat 211 Week Five The Binomial Distribution

Page 2: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Last Week • 𝐸 𝑥 = ∑ 𝑥 ∙ 𝑝(𝑥) • 𝐸 𝑥 = 𝑛 ∙ 𝑝

• 𝜎𝑥 = ∑ 𝑥 − 𝜇𝑥

2𝑝(𝑥)

• We will see this again soon!!

Page 3: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Binomial Experiment • We have an experiment with the following

qualities : 1. A fixed number of trials. 2. Each trial has a result of either success or failure. 3. P(success) is the same for every trial. 4. Each trial is independent of all others. 5. X = # of successes

So X count the successes.

Page 4: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Is it Binomial! • Flip a coin 30 times, the side that lands upward is

observed (we want to flip heads). 1. 30 trials 2. Success = Heads, Failure = Tails 3. P(Success) = 0.5 on every trial. 4. Trials are independent, flips don’t affect each

other. 5. X = Side that lands up (can equal an H or a T)

Does not count number of successes.

Page 5: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Is it Binomial! • Flip a coin 30 times, the side that lands upward is

observed (we want to flip heads). ▫ This is NOT a Binomial Experiment!!!

Page 6: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Is it Binomial! • Roll a die 24 times, the number of 6’s is observed.

1. 24 trials 2. Success = 6, Failure = Anything else 3. P(Success) = 1

6 on every trial.

4. Trials are independent, rolls don’t affect each other.

5. X = # of 6’s = Number of successes

Page 7: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Is it Binomial! • Roll a die 24 times, the number of 6’s is observed.

▫ This is a Binomial Experiment!!! ▫ We meet all of the criteria!

Page 8: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Binomial Distribution • We let X = # successes in a binomial experiment. • From this we say :

X ~ Binomial(n, p) X ~ B (n, p) p = P(success per trial)

Page 9: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Mean and St. Dev. for Binomial • Our mean for Binomial

▫ 𝐸 𝑥 = 𝜇𝑥 = 𝑛 ∙ 𝑝

• Our standard deviation for Binomial ▫ 𝑆𝑆 𝑥 = 𝜎𝑥 = 𝑛 ∙ 𝑝 ∙ (1 − 𝑝)

Page 10: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Example of Mean/St. Deviation • X ~ Binomial(n = 4, p = ½)

▫ 𝐸 𝑥 = 𝜇𝑥 = 𝑛 ∙ 𝑝 ▫ 𝐸 𝑥 = 𝜇𝑥 = 4 ∙ 1

2= 2

▫ 𝑆𝑆 𝑥 = 𝜎𝑥 = 𝑛 ∙ 𝑝 ∙ (1 − 𝑝)

▫ 𝑆𝑆 𝑥 = 𝜎𝑥 = 4 ∙ 12

∙ (1 − 12) = 1 = 1

Page 11: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Ideas from last week • 𝐸 𝑥 = 𝜇𝑥 = ∑ 𝑥 ∙ 𝑝(𝑥)

• 𝐸 𝑥 = 0 116

+ 1 416

+ 2 616

+ 3 416

+ 4 116

=3216

= 2

𝑥 𝑝(𝑥)

0 1 2 1

16

3 4 4

16

616

4

16

116

Page 12: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

More Ideas from Last Week • 𝑆𝑆 𝑥 = 𝜎𝑥 = ∑ 𝑥 − 𝜇𝑥

2𝑝(𝑥)

• 𝑉 𝑥 = 0 − 2 2 116

+ 1 − 2 2 416

+ 2 − 2 2 616

+ 3 − 2 2 416

+ 4 − 2 2 116

• 𝑉 𝑥 = 416

+ 416

+ 016

+ 416

+ 416

= 1616

= 1

• 𝑆𝑆 𝑥 = 𝑉(𝑥) = 1 = 1

𝑥 𝑝(𝑥)

0 1 2 1

16

3 4 4

16

616

4

16

116

Page 13: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Notice

• We get the same results both way!!!

• But, using the Binomial equations is way way way easier!!!!

• It is a shortcut.

Page 14: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Another Example • X Binomial(n = 480, p = 1 6⁄ )

• 𝜇𝑥 = 𝐸 𝑥 = 𝑛 ∙ 𝑝 = 480 ∙ 1

6 = 80

• 𝜎𝑥 = 𝑛 ∙ 𝑝 ∙ (1 − 𝑝) = 480 16

56

= 66.7

𝜎𝑥 = 8.2

Page 15: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Binomial Probabilities • What if we have a Binomial experiment and we want

to calculate the probability of a certain number of successes (counted as X) of occurring?

• There’s a formula for that!!!

• 𝑃 𝑋 = 𝑥 = 𝑛𝑥 𝑝𝑥 1 − 𝑝 𝑛−𝑥

• 𝑋 = # successes • 𝑥 = # of successes of interest

Page 16: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Binomial Formula Explained

• 𝑃 𝑋 = 𝑥 = 𝑛𝑥 𝑝𝑥 1 − 𝑝 𝑛−𝑥

𝐶𝐶𝐶𝐶𝐶𝑛𝐶𝐶𝐶𝐶𝑛, ℎ𝐶𝑜 𝐶𝐶𝑛𝑚 𝑜𝐶𝑚𝑤 𝑐𝐶𝑛 𝑜𝑤 ℎ𝐶𝑎𝑤 𝑥 𝐶𝐶𝑛𝑚 𝑤𝑠𝑐𝑐𝑤𝑤𝑤𝑤𝑤

𝑝𝑝𝐶𝐶𝐶𝐶𝐶𝑝𝐶𝐶𝑚 𝐶𝑜 𝑤𝑠𝑐𝑐𝑤𝑤𝑤 𝐶𝑠𝑝𝐶𝐶𝑝𝑝𝐶𝑤𝑚 𝑥 𝐶𝐶𝐶𝑤𝑤

𝑝𝑝𝐶𝐶𝐶𝐶𝐶𝑝𝐶𝐶𝑚 𝐶𝑜 𝑜𝐶𝐶𝑝𝑠𝑝𝑤 𝐶𝑠𝑝𝐶𝐶𝑝𝑝𝐶𝑤𝑚 𝑛 − 𝑥 𝐶𝐶𝐶𝑤𝑤

Page 17: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Example of the Formula #1 • A coin is tossed 3 times, find P(2 Heads). ▫ Sample space :

{HHH, HHT, HTH, THH, TTH, THT, HTT, TTT} what we want!

• 𝑃 2 𝐻𝑤𝐶𝑚𝑤 = # 𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑝𝑝𝑠𝑠𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑠𝑠

# 𝑝𝑝𝑝𝑡𝑝 𝑝𝑝𝑠𝑠𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑠𝑠 = 3

8

Page 18: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Example #1 Continues • We want P(2 Heads), this is P(Successes = 2)

or P(X = 2). • The experiment is Binomial! (Use the formula!) • X ~ B(n = 3, p = ½ )

• 𝑃 𝑋 = 2 = 32

12

2 12

1= 3 1

212

12

= 38

• The same as we saw with the other method.

Page 19: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Formula Example #2 • X ~ Binomial(n = 10, p = 1 5⁄ )

• Find P(X = 3)

• 𝑃 𝑋 = 3 = 103

15

3 45

7= 120 1

1251638478125

= 0.201

Page 20: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Something a Little Different • What if we aren’t interested in an exact number of successes,

but in a range of successes. • For instance seven or fewer sucesses. • We want P(X ≤ 7).

• One way is to add up all of the probabilities in this grouping.

• 𝑃 𝑋 ≤ 7

= 𝑃(0 ∪ 1 ∪ 2 ∪ 3 ∪ 4 ∪ 5 ∪ 6 ∪ 7)

= 𝑃 0 + 𝑃 1 + 𝑃 2 + 𝑃 3 + 𝑃 4 + 𝑃 5 + 𝑃 6 + 𝑃 7

• Each of the smaller components can be found with the formula.

Page 21: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Why That is Possible • Finding the probabilities of each piece of the

group comes from our probability laws.

• P(A ∪ B) = P(A) + P(B) – P(A ∩ B)

• In our case the pieces are all mutually exclusive, so we can just add the probabilities of each component without worrying about any overlap.

Page 22: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Too Much Effort • Doing a problem that way is possible but not

feasible.

• There is an easier way!!!

• The table.

Page 23: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Using the Table Example #1 • X ~ Binomial(n=10, p=0.5) • 𝑃 𝑋 ≤ 3 = 𝑃 0 + 𝑃 1 + 𝑃 2 + 𝑃 3

𝑃 0 = 100

12

0 12

10

= 112

0 12

10

= 0.0009

𝑃 1 = 101

12

1 12

9

= 1012

1 12

9

= 0.0097

𝑃 2 = 102

12

2 12

8

= 4512

2 12

8

= 0.0439

𝑃 3 = 103

12

3 12

7

= 12012

3 12

7

= 0.117

• P(X ≤3) = 0.0009 + 0.0097 + 0.0439 + 0.117 = 0.1715

Page 24: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Example #1 Continued • Look in the table.

• P(X ≤ 3) = 0.1719.

• These are really close, but not perfect which is OK! • Usually they will be close but not perfectly

matched, this mainly happens due to rounding error in the first approach or due to any rounding in the table itself.

Page 25: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Using the Table Example #2 • X ~ Binomial(n=10, p= ½ )

• Find P(X ≤ 2)

• From the table we get 0.9730

• The tables are important, we will being using

several different tables throughout the remainder of the semester.

Page 26: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Forgoing the Formula • X ~ Binomial(n=10, p= ½ )

• Find P(X = 3) • Suppose I don’t want to use the formula, I can use

the table instead. • How? • P(X=3) = P(0) + P(1) + P(2) + P(3)

- P(0) - P(1) - P(2)

Page 27: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Forgoing the Formula • X ~ Binomial(n=10, p= ½ )

• Find P(X = 3) • Suppose I don’t want to use the formula, I can use

the table instead. • How? • P(X=3) = P(0) + P(1) + P(2) + P(3)

- P(0) - P(1) - P(2)

• This is the same as : P(X ≤ 3) – P(X ≤ 2)

Page 28: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Forgoing the Formula • Using the formula :

𝑃 𝑋 = 3 = 103

12

3 12

7

= 0.117

• Using the table : • P(X ≤ 3) = 0.1719 • P(X ≤ 2) = 0.0547

• P(X = 3) = 0.1719 – 0.0547 = 0.1172

• They are super duper close, YAY!!!

Page 29: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

What about > ? • P(X > 2) (where n = 5)

• P(X > 2) = P(3 ∪ 4 ∪ 5) = P(3) + P(4) + P(5)

• We could do this in pieces, but that is a pain. (>.<)

• We need another way!!!

Page 30: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

A better way for > • Remember the sample space, in this case it is :

{0, 1, 2, 3, 4, 5} • P(Sample Space) = 1

= P(0) + P(1) + P(2) + P(3) + P(4) + P(5) • Remember compliment. • If we want P(not E) we use 1 – P(E), we can use

that here. • P(X > 2) = 1 – P(X ≤ 2)

Page 31: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Proof that it works!!! • 1 – P(X ≤ 2) • P(Sample Space) – P(X ≤ 2) = P(0) + P(1) + P(2) + P(3) + P(4) + P(5) - P(0) - P(1) - P(2) = P(0) + P(1) + P(2) + P(3) + P(4) + P(5) - P(0) - P(1) - P(2) = P(3) + P(4) + P(5) = P(X > 2)

Page 32: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Example for > (or even ≥ *gasp*) • X ~ Binomial(n = 5, p = 0.3) • P(X ≥ 3) = P(X > 2) = P(3) + P(4) + P(5)

• 𝑃 3 = 53 0.3 3 0.7 2 = 0.132

• 𝑃 4 = 54 0.3 4 0.7 1 = 0.028

• 𝑃 5 = 55 0.3 5 0.7 0 = 0.002

• P(X ≥ 3) = 0.132 + 0.028 + 0.002 = 0.162 • P(X ≥ 3) = 1 - P(X ≤ 2) = 1 – 0.8369 = 0.1613

close

Page 33: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

What about in between? • P 2 ≤ X ≤ 4

= P(X = 2) + P(X = 3) + P(X = 4)

• We could do this by hand but this would be difficult with larger numbers.

• We can also use the table. Let’s think!

• P(X ≤ 4) = P(0) + P(1) + P(2) + P(3) + P(4) This contains all of what we want plus some extra.

• Subtract out what we don’t want. P(0) + P(1) we don’t want. This is the same as P(X ≤ 1).

Page 34: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Flipping Success and Failure • The Binomial table has a maximum p of 0.5. • Males have a 0.7 chance of marrying. • We take a sample of 25 males. • What is the probability that 20 or more males

marry? • P(X ≥ 20) = ?

• X = # males that marry. • Let Y = # males that do not marry.

Page 35: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Flipping Continued • We want P(X ≥ 20), put it in terms of Y.

• P(X ≥ 20) = P(Y ≤ 5)

• X ~ Binomial(n = 25, p = 0.7) • Y ~ Binomial(n = 25, p = 0.3)

• Use the table!

• P(Y ≤ 5) = 0.1935 = P(X ≥ 20)

Page 36: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Weird Words • Probability questions are often word questions.

• More than > • Less than < • ____ or more ≥ • ____ or less ≤

• At most ≤ • At least ≥

Page 37: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Be Careful When Flipping • P(X > 3) = 1 – P(X ≤ 3)

• P(X ≥ 3) = 1 – P(X ≤ 2)

• Think before you flip!!!!!

Page 38: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Extra Example • A student is taking a multiple choice exam with 16

questions, and guessing at the answers. Each question has 4 possible answers, A, B, C, D. Each question is independent. Is this a binomial distribution?

• Fixed number of trials, n = 16 • Either the answer is right or wrong. (success/failure) • p = probability of success = ¼ • Trials are independent. • Let X = # of correct answers.

• Yes, this is binomial.

Page 39: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Extra Example • A student is taking a 16 question multiple choice

exam, and guessing at the answers. There are four choices per question, A, B, C,D. What is the expected number that he/she will get right?

• 16 questions – 16 trials

• Probability of success per question = ¼

• E(x) = n ∙ p = 16(¼) = 4 correct answers

Page 40: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Extra Example • A student is taking a multiple choice exam with 16

questions, and guessing at the answers. Each question has 4 possible answers, A, B, C, D. Each question is independent. Is this a binomial distribution?

• What is the standard deviation?

• 𝜎𝑥 = 𝑛 ∙ 𝑝 ∙ (1 − 𝑝) = 16 ∙ 14

∙ 34

= 3

• 𝜎𝑥 ≈ 1.732

Page 41: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Extra Example • What is the probability that the student will get 8 questions

correct?

• P(x= 8) = P(x ≤ 8) – P(x ≤ 7)

= 168

14

8

1 −14

16−8

= 1287014

8 34

8

= 0.0197

Page 42: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

Extra Example • What is the probability that the student will get

less than 8 correct?

• P(x < 8) = P(x ≤ 7) = P(0) + P(1) + P(2) + … + P(7)

• From the table we can find that P(x ≤ 7) = 0.9729

Page 43: The Binomial Distributionrchidester/Stat 211 Week Five Display Version.pdf · Binomial Experiment • We have an experiment with the following qualities : 1. A fixed number of trials.

• What is the probability that the student will get less than 8 correct?

• P(x < 8) = P(x ≤ 7) = P(0) + P (1) + P (2) + … + P (7)

• From the table we can find that P(x ≤ 7) = 0.9729