Math of Binomial Distribution

advertisement
Math of Binomial Distributions
This section will introduce you to the formulae for calculating the probabilities of the outcomes
of a binomial distribution. The binomial expansion formula is very useful but it is also tedious to
use. Fortunately calculators and statistical packages will do the number crunching.
Example:
Jose is a buyer for a large electronic firm. He buys micro-switches in lots of 20. In each batch of
20 there is a 5% probability that a switch is defective. What is the probability that more than one
switch is defective? This is a discrete probability function, i.e., switches will be defective in
whole numbers, there is no way a switch can be partially defective. There is also a probability
associated with each outcome. There would be an assigned probability for 0, 1, 2, 3, ....20. Based
on the the probability of .05 and n being 20 you would expect that 1 would be the most common
occurrence. Intuition tells us that 0,1, and 2 would be most probable outcomes. Is it possible that
a batch of micro-switches could have all 20 defective though extremely improbable. The
following graph was obtained using a graphing calculator. The x-axis represents the number of
defective switches and the y-axis represents the probability for each value on the x-axis.
The distribution is strongly skewed right with the bulk of the probabilities centering above the
value of 1. The probabilities above 5 are so small that they don't show up on this graph.
Following is the probabilities for the first 7 values in the distribution, 0 to 6. Notice the value for
6, its magnitude is so small, 0.0003, that it would be highly improbable to have a batch with 6
defective switches. The same would hold for the probabilities of 7 through 20.
L1 represents the number of defective switches and L2 lists the probabilities associated with each
discrete probability. The remainder of the list includes all of the probabilities. According to the
rules of probabilities the sum of L2 is 1.
The assignment of probabilities for each value in the distribution is known as the probability
distribution function. This function is defined on most graphing calculators, on the TI 83/84
family of calculators it is know as binompdf found under the DISTR menu. Following is a
screen shot using Catalog Help. The input is number of trials, probability, x-value of interest (if
you do not input an x value all of the probabilities are displayed). For example if binompdf (20,
.05, 1) is the input, the output would be
Which means that the assigned probability for 1 in the binomial distribution is .37735. You could
continue this process for every X value. The original question posed is what is the probability
that more than one switch is defective. In other words what is the combined probability of every
event except 0 and 1. We could add all of the probabilities of interest in this problem and arrive
at the answer or we could do 1 minus the probabilities of 0 and 1. Either way would work but
there is another way. The TI 83/84 calculator has another built in function called binomcdf. The
cdf stands for cumulative distribution function. This function will sum all of the probabilities
up to and including the x-value you indicate. For example, binomcdf (20, .05, 1) would sum the
probabilities of 0 and 1.
This value corresponds to the sum of the assigned probabilities for 0 and 1 in the list above. With
this function we are now ready to answer the question posed in the problem, What is the
probability that more than one switch is defective? Using the rules of probabilities it would be
easiest to answer the question by using 1 - P(0 and 1).
There is a 26.4% chance that Jose will find batches with more than 1 defective switch.
_________________________________________________________________________
What would be the shape of the histogram for a binomial distribution that had a .90 probability?
Left skewed would be the answer. What would the shape be for a binomial distribution with a
probability of .50? It would reason that it it would be symmetric.
P(20, .9, x)
P(20, .50, x)
Click here to view a detailed tutorial on the binomial distribution using the TI-83.
Binomial mean and standard deviation
Just as the mean and standard deviations were used to describe frequency distributions and
probability distributions, the mean and standard deviation are also used to describe a binomial
distribution. The mean, µ, and standard deviation, s, for the binomial distribution are easily
determined by the following formulas.
Mean and Standard Deviation for a Binomial Distribution
Mean, µ = np
Standard Deviation,
Example - Gender in a particular college
In a particular college 60% of students are men and 40% are women. For samples of size 50
what is the mean and standard deviation of men in this binomial distribution?
Let the random variable X = number of men in the sample.
Assume X has the binomial distribution with
n = 50 and p = 0.4.
Then µ = np = 50 x 0.6 = 30
=
The probability that a random variable X with binomial distribution B(n,p) is equal to the
value k, where k = 0, 1,....,n , is given by
where
The latter expression is known as the binomial coefficient, stated as "n choose k," or the
number of possible ways to choose k "successes" from n observations. For example, the
number of ways to achieve 2 heads in a set of four tosses is "4 choose 2", or 4!/2!2! =
(4*3*2*1)/(2*1)(2*1) = 6. The possibilities are {HHTT, HTHT, HTTH, TTHH, THHT,
THTH}, where "H" represents a head and "T" represents a tail. The binomial coefficient
multiplies the probability of one of these possibilities (which is (1/2)²(1/2)² = 1/16 for a
fair coin) by the number of ways the outcome may be achieved, for a total probability of
6/16.
Binomial expansion
What does a binomial expansion actually look like? Here is an example.
Separately calculate using the binomial formula the probabilities of getting 0, 1, 2, 3, or 4
left- handed students in a class of 25, given that 10% of the population is left-handed.
n
 
 k  pk (1-p)n-k
x
P(x=k)
0
0.07179
 25 
 
 0  • 0.10 • 0.925
1
0.19942
 25 
 
 1  • 0.11 • 0.924
2
0.26589
 25 
 
 2  • 0.12 • 0.923
3
0.22650
 25 
 
 3  • 0.13 • 0.922
4
0.13842
 25 
 
 4  • 0.14 • 0.921
As you can see these type of calculations can be tedious. You should understand the
concept of combinations but using a computer or calculator to actually do the calculations
is suggested.
Now that you have seen the mathematics behind the expansion of the binomial
distribution let's look at some examples using the calculator.
Example:
You have a 8-sided die with the faces 1, 2, 3, 4, 5, 6, 7, and 8. It is a fair die in that each
face is just as likely to appear as another. You roll the die 50 times.
a.) What is the probability of getting exactly 9 1's?
b.) What's the probability of getting at least 7 1's but less than 12 1's?
c.) What is the probability of getting at least 12 1's?
Solution
a.) For P(X = 9), solve using n =50, p = .125 (1/8), x = 9
 50 
 
P(X = 9) =  9  (.125)9(1 - .125) 41 = .0782
Using the TI-83 calculator, binompdf(50,.125,9) = .0782
It would a tedious process to calculate this probability by hand. It is much easier to use
the calculator.
b.) The probability in question is the sum of the probabilities P(X = 7), P(X = 8), P(X =
9), P(X = 10), and P(X = 11). Why not P(X = 12)? The question just mentions 12 but it
also states less than. Be careful when reading probability problems that have intervals.
Check for less than, greater than, less than and equal to, and greater than and equal to.
P(7 = X < 12) = B(50, .125, 7) + B(50, .125, 8) + ...... + B(50, .125, 11)
On the calculator this would be
binomcdf(50, .125, 11) - binomcdf(50, .125, 6) = .418
c.) This solution requires a different approach with the calculator. Since the binomcdf
function on the calculator returns probabilities up to and including the inputted x value
we must use a rule of probability to solve this problem. Since the sum of all of the
probabilities in a binomial distribution is 1 and the input for the calculator would be:
1 - binomcdf (50, .125, 11) = .018
Basically this problem illustrates how to use the calculator to do the different types of
binomial probabilities. The main caution is to carefully read the question.
Download