EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
Lecture 5 Binomial Distribution.pptx
1. Each slide has its own narration in an audio file.
For the explanation of any slide click on the audio icon to start it.
Professor Friedman's Statistics Course by H & L Friedman is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
2. First a slight digression to review
permutations and combinations.
Permutations. A permutation is a particular
arrangement.
Example: How many ways can you arrange the
letters A, B, and C?
ABC, ACB, BAC, BCA, CAB, CBA.
Answer: 6
Binomial Distribution 2
3. Binomial Distribution 3
How did we get this? Let’s use 3 imaginary slots.
In slot one, we have three letters to choose from, A, B, or C.
In slot two, we only have two letters left. Finally, in slot three,
we only have one unused letter.
Slot #1 Slot #2 Slot #3
Can be: Can be: Can only be: Result:
A
B C ABC
C B ACB
B
A C BAC
C A BCA
C
A B CAB
B A CBA
4. On your scientific calculator, you will use the
nPr key. The P stands for permutations. n is
the number of distinct objects you wish to
arrange and r is the number of slots or spaces.
Thus, in the above example, we have 3 objects
to arrange in three slots, or, 3P3 = 6 .
Binomial Distribution 4
5. The general formula for a permutation is:
When n = r, then nPn = n!
n! is read as n factorial.
In general,
n! = n⋅(n-1)⋅(n-2)⋅ … ⋅(2)⋅(1) = n⋅(n-1)!
So,
10! = 10 x 9 x 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1 = 3,628,800
6! = 6 x 5 x 4 x 3 x 2 x 1 = 720
Note that 0! ≡ 1.
Binomial Distribution 5
)!
(
!
Pr
r
n
n
n
6. Example: How many ways can you assign five workers to five
different tasks?
Answer: 5P5= 5! = 120
Example: How many ways can you arrange 10 different books in
your bookcase which has room for exactly 5 books?
Answer: 10P5= 10 x 9 x 8 x 7 x 6 = 30,240
Example: How many ways can 8 cars line up single file in front of a
toll booth?
Answer: 8P8 = 8! = 40,320
Example: How many ways can you arrange 12 guests around a
table that has 12 chairs?
Answer: 12P12 = 12! = 479,000,600
Follow up question:
How many different potential family feuds can break out?
Binomial Distribution 6
7. Binomial Distribution 7
With permutations, the arrangement of the items is
important. Each unique sequence is another
permutation. Thus, ABC is different from BCA and
both are different from CBA.
With combinations, however, ABC, BCA, and CBA are
all the same. They are all part of the same
combination.
Example: How many different groups of 3 can be
selected from 7 people? Say these people are named
A, B, C, D, E, F, G. Note that once you select, say, B,
D, and E, the six different arrangements you can
make from them are irrelevant.
8. Binomial Distribution 8
The formula for combinations is:
Note that:
You can use the nCr key on your calculator to solve
any combination problem.
To solve the above problem: How many different
groups of 3 can be selected from 7 people?
Answer: 7C3 = 7! / 3! 4! = 35
!
)!
(
!
!
r
n
r
n
nCr
!
Pr
r
n
nCr
9. Binomial Distribution 9
Example: How many different hands can one draw
from a deck of 52 cards in a game of 7-card rummy?
Answer: 52C7 = 52! / 7! 45! = 133,784,560
Example: How many samples of size n = 6 can be
drawn from a population of size N = 50?
Answer: 50C6 = 50! / 6! 44! = 15,890,700
10. The Binomial Distribution is used when the sampling
process works this way:
◦ There are only two possible outcomes for each trial, object,
or observation. These two outcomes are mutually
exclusive. These outcomes are called success and failure.
For example: heads/tails; pass/fail;
defective/non-defective; dead/alive; hit/miss
◦ The outcomes are independent events.
◦ The probability of success (or failure) is constant from trial
to trial. For example, the probability of getting a head on a
coin toss is the same at every toss of the coin.
[This sampling process is called a Bernoulli process.]
Binomial Distribution 10
11. The binomial distribution can be used to compute the
probability of getting a particular number of successes
in a specified number of trials (or observations).
For:
p ≡ the probability of success
(1-p) ≡ the probability of failure
x ≡ number of successes
(n – x) ≡ number of failures
n ≡ number of observations (or trials)
The probability of getting x successes out of n trials (or
observations) is:
P(x) = nCx px (1-p)n-x
Binomial Distribution 11
12. Again, the probability of getting x successes out of
n trials (or observations) is:
P(x) = nCx px (1-p)n-x
The mean (expected value) of a binomial
distribution is:
μ = np
The variance of a binomial distribution is:
σ2 = np(1–p)
Binomial Distribution 12
13. An air conditioner made by a certain company
is made of 20 distinct parts. Each part has a
.004 probability of being defective. What is the
probability that a randomly selected air
conditioner will not work perfectly? [Note that
it will not work perfectly if even one of these
parts is defective.]
Binomial Distribution 13
14. Answer: First, solve the probability that the air conditioner
will work perfectly, i.e., all 20 parts will be good.
P(0 defectives) = P (X=20; n=20) = 20C20 (.004)0 (.996)20 =
.923
The probability that the air conditioner will not work
perfectly (i.e., that it has 1 or more defective parts) is:
1 - .923 = .077.
There is a 7.7% chance that a randomly selected a/c made by
this company will not work perfectly. What should be done
to improve quality at this company? One solution is to
reduce the number of parts. Also, improve quality of each
part. .004 defective rate is not very good.
[You will learn about 6 sigma quality in other courses.]
Binomial Distribution 14
15. A machine produces parts that are very difficult to
make. It turns out that 1 out of 20 are defective
and must be thrown out. What is the probability
that a sample of 10 parts will contain 0 defectives?
Note: If 1 out of 20 parts are defective, this means
that p = .05. (It is strange to call a defective part a
“success”).
Solution: P (x=0; n=10) = 10C0 (.05)0 (.95)10
=.5987
Binomial Distribution 15
16. If you toss a coin 12 times, what is the probability that
you will get 6 heads?
Solution: P (x=6; n=12) = 12C6 (.50)6 (.50)6 =.2256
The mean of the binomial, μ = np. On average, when
you toss a coin 12 times, you expect to get 6 heads.
The most likely outcome in 12 tosses is 6 heads.
In 100 tosses, 50 heads is the most likely outcome, but
the probability of getting 50 heads in 100 tosses is
only .0796. Check for yourself:
P (x=50; n=100) = 100C50 (.50)50 (.50)50
Binomial Distribution 16
17. 60% of the students at CUNY are female. What
is the probability that a randomly selected
group of 25, there will be exactly 15 females?
Solution:
P (x=15; n=25) = 25C15 (.60)15 (.40)10
= .1612.
Binomial Distribution 17