Introduction We are often more interested in experiments in which there are two outcomes of interest (success/failure, make/miss, yes/no, etc.). In this chapter we study two types of probability distributions that are used in this case, namely the geometric and binomial distributions. 8.1 The Binomial Distributions A binomial setting has the following characteristics: 1. Each observation can be a success or a failure 2. The variable of interest is the number of successes in a fixed number of observations 3. The n observations are all independent 4. The probability of success, typically named p, is the same for each observation If data are produced in a binomial setting, then the random variable = number of successes is called a binomial random variable, and its probability distribution is called the binomial distribution with parameters n and p. 1. The parameter n is the number of observations 2. The parameter p is the probability of a success on any one observation (remember that this is the same for each of the observations) 3. The possible values of are the whole numbers from 0 to n. ~ B n, p. 4. We typically denote a binomial random variable with ( ) Note on success and failure this is somewhat unfortunate nomenclature. You should look at a success as observing what you were counting, and a failure as not observing what you were counting. For example, if is the number of light bulbs out of a bin of 20 bulbs that fail after 100 hours of use, we would consider each light bulb that fails a success as far as our binomial distribution is concerned. Make sure you understand that success and failure do not have the typical connotations. Binomial Probabilities The actual probability that P ( k ) the formula n P k p p n n! where = and n! = 1 2 3 n. k! ( n k )! = for any k in the range {0, 1, 2,, n} is given by k ( = ) = ( 1 ) This formula makes sense in order to have k successes, we must have n k failures. The probability of each success is p, and so the probability of each failure is 1 p. Since each trial is independent and we want the probability of all these successes and failures happening at the same time, we multiply these probabilities, so we have k factors of p and n k, Page 1 of 6
n k factors of 1 p. Finally, we must account for the number of arrangements of each n of the successes and failures, and the binomial coefficient, or, takes care of this. We derived this in class look in your class notes for further explanation. Note that the probability formula only gives the probability that equals a given value. If we want the probability that is less than, less than or equal to, greater than, or greater than or equal to a given value, we must use the formula to find individual probabilities and then add those together. The following table shows some examples of this for the = 0,1, 2,3,4. binomial distribution of the variable that has the possible values { } Desired Probability 2 Calculation P = 0 + P = 1 P ( < ) ( ) ( ) P ( 2) P ( = 0) + P ( = 1) + P( = 2) P ( > 2) P ( = 3) + P ( = 4) P ( 2) P ( = 2) + P ( = 3) + P ( = 4) If could take on more values, such as = { 0,1, 2,...,50}, then we might find ourselves calculating probabilities such as P ( > 40) = P( = 41) + P( = 42) + + P( = 50), n k each term of which requires the unwieldy formula P ( = k ) = p ( 1 p) n k. Yikes! Thankfully, our calculators can help us out with this. They have two built-in functions that are quite useful binompdf( ) and binomcdf( ). These are found under the 2ND VARS (DISTR) menu on the TI-83 and TI-84. The former, binompdf( ), stands for binomial probability distribution function and is used when we want the probability that equals a given value. The latter, binomcdf( ), stands for cumulative probability distribution function and is used when we want the probability that is less than or equal to a given value. The table on the following page gives an example of how these work: Page 2 of 6
Suppose we are given a binomial distribution with n = 5 and p = 0.25. Then: Desired Probability Formula 3 2 = 3 =.25.75 = 0.0879 3 P 1 = P = 0 + P = 1 P ( = 3) P ( ) ( ) ( ) P ( 1) ( ) ( ) ( ) = + 0 1 5! 5! = + 0!5! 1!4! =.6328 (.25) (.75) (.25) (.75) 0 5 1 4 ( 1 )(.75) (.25)(.75) 5 4 Calculator binompdf(5, 0.25, 3) = 0.0879 binomcdf(5, 0.25, 1) = 0.6328 Clearly the calculator version is much easier, especially in the second case. However, you will be expected to know how to calculate binomial probabilities without your calculators so be sure you know the formulas and understand the binomial coefficient notation. What do we do for the cases where we want <, >, or? The formula versions are much the same we just add up the appropriate probabilities. However, we have to trick our calculators to do these calculations correctly. In the context of the above example, think P > 2. Our calculator doesn t have a function that calculates this probability about ( ) directly. However, isn t this the same as P ( 3) P ( 4) P( 5) this probability be the same as 1 ( P( 0) P( 1) P( 2) ) probability being subtracted here just P ( 2)? This last probability is one our calculators can do, i.e., P ( > 2) = 1 P( 2) = 1 binomcdf(5, 0.25, 2). = + = + =? Wouldn t = + = + =? But isn t the Now consider P ( 2). Isn t this just P ( 2) P ( 3) P ( 4) P( 5) Isn t this probability just 1 ( P( = 0) + P( = 1) )? And finally, isn t this just 1 P( 1) = 1 binomcdf(5, 0.25, 1). = + = + = + =? Finally, consider P ( < 2). This is the same as P ( 2) also the same as P ( 1)? So here we can just take binomcdf(5, 0.25, 1)., but without the 2. Isn t this Adding these to the previous table gives us Page 3 of 6
Desired Probability Formula 3 2 = 3 =.25.75 = 0.0879 3 P 1 = P = 0 + P = 1 P ( = 3) P ( ) ( ) ( ) P ( 1) ( ) ( ) ( ) Calculator binompdf(5, 0.25, 3) = 0.0879 0 5 1 4 = (.25) (.75) + (.25) (.75) 0 1 binomcdf(5, 0.25, 1) = 0.6328 5! 5 5! 4 = ( 1 )(.75) + (.25)(.75) 0!5! 1!4! =.6328 > 2 = 1 P 2 1 binomcdf(5, 0.25, 2) = 0.1035 P ( > 2) P ( ) ( ) P ( 2) = 1 P ( < 2) P ( 2) = 1 P ( 1) P ( < 2) P ( 2) P ( 1) 1 binomcdf(5, 0.25, 1) = 0.3672 < = binomcdf(5, 0.25, 1) = 0.6328 Make sure you understand all of the above uses of the binompdf and binomcdf commands on your calculator, as well as how to write out the appropriate formulas for calculating these without your calculator. Binomial mean and standard deviation We derived these in class get someone s notes if you re interested in how it is done. The mean and standard deviation of a binomial random variable are given by µ = np and ( 1 ) σ = np p, where n is the number of trials and p is the probability of success on each trial. Because calculating probabilities with the binomial probability formula is quite cumbersome, it is nice to know we have alternatives. One such alternative was the use of the binomcdf( ) and binompdf( ) functions on your calculator. One other alternative is to use a normal approximation to the binomial distribution. It turns out that if the number of trials is large enough, we can approximate a binomial distribution with an appropriate normal distribution. One general rule of thumb is that n np 10 and n 1 p 10. If the binomial distribution meets these is large enough if ( ) conditions, we can then approximate ~ (, ) ~ N ( np, np( 1 p) ) B n p with the normal distribution. This is just the normal curve with the same mean and standard deviation as the binomial variable. Study and understand Example 8.13. Page 4 of 6
8.2 The Geometric Distributions A binomial distribution has a fixed number of trials, and the variable of interest is the number of successes in n trials. A geometric distribution, on the other hand, does not have a fixed number of trials, and the variable of interest is the number of trials until the first success is obtained. The possible values of a binomial random variable are = 0,1, 2,3,..., n, whereas the possible values for a geometric random variable are { } = { 1,2,3,... }. In other words, there are an infinite (albeit countable) number of possible outcomes for a geometric distribution. A geometric setting has the following characteristics: 1. Each observation can be a success or a failure 2. The n observations are all independent 3. The probability of success, typically named p, is the same for each observation 4. The variable of interest is the number of trials required to obtain the first success The above list is very similar to the list given for the binomial setting. The only difference is that in the binomial setting we are interested in the number of successes while in the geometric setting we are interested in the number of trials required to obtain the first success. Theoretically, in a geometric setting, the number of trials could range anywhere from 1 to infinity! If data are produced in a geometric setting, then the random variable = number of trials required to obtain the first success is called a geometric random variable and its probability distribution is called the geometric distribution. Geometric Probabilities If has a geometric distribution with probability p of success and ( 1 p) of failure on each observation, the possible values of are 1, 2, 3,... If n is any one of these values, the probability that the first success occurs on the nth trial is n ( ) ( 1 ) 1 P = n = p p. Again, this probability formula makes sense. If we want our first success to occur on the nth trial, we need the first n 1 trials to be failures. Each of the failures occurs 1 p, so we multiply these n 1 probabilities independently with probability of ( ) n together to get ( 1 p) 1. Finally, we want the last trial to be a success, and this success occurs independently of the trials preceding it with probability p, and so we multiply by p to get the above formula. By the way, there is a formula that may come in handy when calculating geometric probabilities without a calculator, and it involves finding the probability that it takes more than a given number of trials before we obtain our first success. That formula, which is derived in the textbook, is P(it takes more than n trials to obtain first success) = P ( n) ( 1 p) > =. n Page 5 of 6
Again, our calculator has built-in functions that help us calculate these probabilities. They are much like the binompdf and binomcdf commands. However, we no longer have P = k = P(first a fixed number of trials, so the syntax of the geometric commands are ( ) success occurs on kth trial) = geometpdf(p, k) and P ( k ) or before kth trial) = geometcdf(p, k). = P(first success occurs on The table above for binomial probabilities and the use of binomcdf or binompdf would also apply to geometric distributions and the use of geometcdf and geometpdf. Geometric mean and standard deviation You can look in your textbook to see how the mean is derived. The derivation of the standard deviation involves second derivatives (from calculus) and so we won t study it in our class. The mean (expected value) and standard deviation of the geometric random variable are given by 1 µ = p and 1 p σ =, 2 p where p is the probability of a success on any one trial. Note that the above formulas do not involve n like they did for the binomial random variable. The reason should be obvious we do not know what n will be ahead of time! Helpful hints 1. When confronted with a probability question involving a random variable, be sure to take the time to define what represents. It often makes the problem a whole lot easier! Similarly, make sure you clearly understand which probability applies to a success. 2. Make sure you check all four conditions: success/failure, independent trials, equal probabilities, and either looking for the trial on which we have our first success (geometric) or for the number of successes in n trials (binomial). 3. Remember the rule of thumb for using a normal approximation to a binomial distribution, namely that n and p have to satisfy both of the following: np 10 and n 1 p 10. ( ) Plots of probability and cumulative distribution functions (pdf and cdf) Make sure you work through and understand the Technology Toolboxes on pages 455-457 and 471-472 regarding how to plot binomial and geometric probability and cumulative distribution functions, and review the difference between them. Page 6 of 6