Binomial Random Variables Dr Tom Ilvento Department of Food and Resource Economics Overview A special case of a Discrete Random Variable is the Binomial This happens when the result of the eperiment is a dichotomy Success or Failure Yes or No Cured or not Cured If the discrete random variable is a binomial, we have some easier ways to solve for probabilities Formula Probability Table And the solution for the Mean and Variance is much easier to solve Binomial Random Variable In many cases the responses to an eperiment are dichotomous Sucess/Failure Yes/No Alive/Dead Support/Don t Support When our focus is conducting an eperiment n times independently and observing the number of times that one of the two outcomes occurs (Success) And the probability of success, p, remains the same from trial to trial This X is a Binomial Random Variable We can eploit this by using known formulas for a Binomial Probability Distribution Conduct an eperiment n times and observe the number of times that Success occurs 3 Characteristics of a Binomial Distribution The eperiment consists of n identical trials There are only two outcomes on each trial. Outcomes can be denoted as S for Success F for Failure The probability of S (success) remains the same from trial to trail Denoted as p the proportion The probability of F (failure) Denoted as q q=(1-p) The trials are independent of each other The binomial random variable is the number of Successes in n trials 4
Eample of a Binomial Random Variable: Marketing Survey Marketing survey of 100 randomly chosen consumers Record their preferences for a new and an old diet soda ask them to choose their preference Let be number of 100 who choose the new brand This is a binomial random variable Eample of a Binomial Random Variable: Fitness Eample Heart Association says only 10% of adults over 30 can pass the fitness test Suppose 4 people over 30 are selected at random Let X be the number who pass the minimum requirements Find the probability distribution for X Conduct an eperiment 100 times and observe the number of times that the subject chooses the new brand Conduct an eperiment 4 times and observe the number of times that pass occurs 5 6 How to solve this using the strategy of a Discrete Random Variable Can you solve it the probability that eactly 1 person passes the test? 1. List the events. List the sample points that refer to that event 3. Calculate the probabilities p =.1 and q = (1.0 -.1) =.9 Event X Sample Points Probability All Fail FFFF (.9)(.9)(.9)(.9) =.6561 I multiply through on the probabilities because each trial is independent of the others 7 Count the ways we could have only one pass, and three failures Assign probabilities to this event SFFF FSFF FFSF FFFS For each combination, the probabilities are:.1*.9*.9*.9 And there are four ways to get one pass 4[.1*.9*.9*.9] =.916 Another way to write it is 4[.1*.9 3 ] =.916 8
Let s finish solving for the whole table The number of times that an adult passes in a sample of four Probability Distribution Event X Sample Points Probability 0 All Fail 1 One passes Two Pass FFFF (.9)(.9)(.9)(.9) =.6561 SFFF FSFF FFSF FFFS 4[(.1)(.9) 3 ] =.916 SSFF SFSF SFFS FSSF FSFS FFSS 6[(.1)(.9) ] =.0486 When = 0 All Fail P =.6561 When = 1 One Pass P =.916 When = Two pass P =.0486 When =3 Three pass P =.0036 When =4 Four pass P =.0001 X) 0.700 0.55 0.350 0.175 3 Three Pass SSSF FSSS SFSS SSFS 4[(.1)3(.9)] =.0036 0 0 1 3 4 4 Four Pass SSSS (.1)(.1)(.1)(.1) =.0001 9 X 0 1 3 4 X) 0.6561 0.916 0.0486 0.0036 0.0001 10 Fitness Eample X 0 1 3 4 Binomial Probability Distribution Formula X) 0.6561 0.916 0.0486 0.0036 0.0001 Find the probability that none of the adults pass the test =0) =.6561 Find the probability that 3 of 4 adults pass the test =3) =.0036 What is the probability that or more adults pass the test? =) + =3) + =4) =.0486 +.0036 +.0001 =.053 11 Sometimes the number of trials gets large We can also use the binomial probability distribution formula to generate the probabilities It uses factorial notation = n(n-1)(n-) (n-(n-1)) 5! = 5431 = 10 0! = 1, 1!=1,!=1=, The formula for any in n trials is:!( n!! 1
What defines the Binomial Distribution? p = Probability of a success on a single trial q = (1-p) probability of failure n = number of trials = number of successes in n trials Note: it uses the Combinatorial Rule as the first part of the formula!( n!! This part reflects the probabilities with each combination 13 For =3 in the fitness eample, n=4, p=.1 4! 3) = (.1) 3!(4! 3)! 3) = 4! 3!!1 3!!1 3 (.9) 4! 3 ( )( 1) (.1)3 (.9) 4"3 3) = 4 6 (.1)3 (.9) 4!3 3) = 4(.1) 3 (.9) 4!3!( n!! 3) = 4(.001)(.9) 3) = 4(.0009) =.0036 The four is how many combinations of 3 success in 4 The last part of the formula is the probability associated with each of these combinations The probability,.0036, is the eact same one we calculated earlier 14! Your Try it: For = in the fitness eample, n=4, p=.1 I will get you started ) = 4!!(4 " )! (.1) (.9) 4" ) = 6(.0081) =.0486!( n!! 15 Mean and Variance for a Binomial Random Variable Since a binomial is only a dichotomy, the formulas for the mean and the standard deviation will simplify From µ =!(!) To µ = p Our fitness eample: µ = 4*.1 =.4 The Variance changes from From To " =![(-µ)!)]! = n*p*q Our fitness eample:! = 4*.1*.9 =.36 and! =.60 16
I could have solved for the mean using the formula for discrete random variables To solve for the mean I would use this formula from the discrete random variable lecture: E( = (0)(.6561) + (1)(.916) + () (.0486) + (3)(.0036) + (4)(.0001) E( =.4 Binomial approach E( = n p = 4 (.1) =.4 The Binomial approach is much easier n E( = " i= 1! i i ) = µ If I know my Discrete Random Variable is distributed as a binomial random variable, it will make things much easier 17 I could have solved for the variance using the formula for discrete random variables To solve for the variance I would have: E(-µ) = (0 -.4) (.6561) + (1-.4) (.916) + (-.4) (.0486) + (3-.4) (.0036) + (4-.4) (.0001)! =.36 Binomial approach E( = n p q = 4 (.1)(.9) =.36 The Binomial approach is much easier E n [( " µ ) ] = #( i " µ ) i ) =! i= 1 If I know my Discrete Random Variable is distributed as a binomial random variable, it will make things much easier 18 Return to the Nitrous Oide Eample Nitrous Oide Eample Suppose we were recording the number of dentists that use nitrous oide (laughing gas) in their practice We know that 60% of dentists use the gas. p =.6 and q =.4 Let X = number of dentists in a random sample of five dentists use use laughing gas. n = 5 This is a Binomial Random Variable! Conduct an eperiment 5 times and observe the number of times that use Nitrous Oide 19 How to solve for these probabilities? X 0 1 3 4 5 X) 0.010 0.0768 0.304 0.3456 0.59 0.0778!( n!! 0
Probability Distribution for the Nitrous Oide Eample X 0 1 3 4 5 X) 0.010 0.0768 0.304 0.3456 0.59 0.0778 µ = 3.00! = 1.0! = 1.01 µ = 5*.6 = 3.00! = 5*.6*.4 = 1.0! = SQRT(1.0) = 1.01 X) 0.4 0.3 0. 0.1 0 Probability Distribution of X 0 1 3 4 5 1 Nitrous Oide Eample using Ecel Open up the file, BINOM.ls Click on the Worksheet Problem This worksheet is designed to solve problems up to n=50, for any value of p You enter in: p =.6 n = 5 The spreadsheet will do the rest! Reverse p = 0.6000 X p(x) Cum p(x) Cum p(>=x) q = 0.4000 0 0.010 0.010 1.0000 n = 5 1 0.0768 0.0870 0.9898 0.304 0.3174 0.9130 Mean 3.0000 3 0.3456 0.6630 0.686 Variance 1.000 4 0.59 0.9 0.3370 Std Dev 1.0954 5 0.0778 1.0000 0.0778 Binomial Formula using Ecel In Ecel, the formula for the Binomial Distribution function is: BINOMDIST(X,N,P,cumulative) X is the number of successes N is the number of independent trials P is the probability of success on each trial Cumulative is an argument - you enter TRUE or FALSE Entering TRUE gives a cumulative probability up to and including X successes (or 1) Entering FALSE gives the eact probability of X successes in N trials (or 0) Binomial Formula using Ecel For our eample of dentists BINOMDIST(,5,.6,TRUE) cumulative probability up to and including successes =.3174 BINOMDIST(,5,.6,FALSE) the eact probability of X successes in N trials =.304 BINOMDIST(3,5,.6,TRUE) 3 4
Binomial Table Binomial Table for n = 5 The table is arranged cumulatively For each probability, the value in the cell is the cumulative probability up to and including X The last row (in this case for = 5), the cumulative probability is 1.000 Another way to get probabilities form Binomial Random Variables is via a table In eams, I will give you a table which contains cumulative probabilities for n= 5, 6, 7, 8, 9, 10, 15, 0, and 5 Each table lists values of P across the top P =.01,.05,.1,.,.3,,.95,.99 = # of successes as the rows It is a Cumulative Table The values shown are cumulative probabilities for the probability of (denoted as k in the table) PROBABILITIES (p) 0.01 0.05 0.10 0.0 0.30 0.40 0.50 0.60 0.70 0.80 0.90 0.95 0.99 0 0.951 0.774 0.590 0.38 0.168 0.078 0.031 0.010 0.00 0.000 0.000 0.000 0.000 1 0.999 0.977 0.919 0.737 0.58 0.337 0.188 0.087 0.031 0.007 0.000 0.000 0.000 1.000 0.999 0.991 0.94 0.837 0.683 0.500 0.317 0.163 0.058 0.009 0.001 0.000 3 1.000 1.000 1.000 0.993 0.969 0.913 0.813 0.663 0.47 0.63 0.081 0.03 0.001 4 1.000 1.000 1.000 1.000 0.998 0.990 0.969 0.9 0.83 0.67 0.410 0.6 0.049 5 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 The probability associated with p=.3 and = 4 is.998 This means that the cumulative probability, or " 4) =.998 The actual probability of = 4) =.998 -.969 =.09 You must subtract two values to get the actual probability of 5 6 Nitrous Oide Eample The values shown are cumulative probabilities for the probability of (denoted as k in the table) PROBABILITIES (p) 0.01 0.05 0.10 0.0 0.30 0.40 0.50 0.60 0.70 0.80 0.90 0.95 0.99 0 0.951 0.774 0.590 0.38 0.168 0.078 0.031 0.010 0.00 0.000 0.000 0.000 0.000 1 0.999 0.977 0.919 0.737 0.58 0.337 0.188 0.087 0.031 0.007 0.000 0.000 0.000 1.000 0.999 0.991 0.94 0.837 0.683 0.500 0.317 0.163 0.058 0.009 0.001 0.000 3 1.000 1.000 1.000 0.993 0.969 0.913 0.813 0.663 0.47 0.63 0.081 0.03 0.001 4 1.000 1.000 1.000 1.000 0.998 0.990 0.969 0.9 0.83 0.67 0.410 0.6 0.049 5 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 Nitrous Oide Eample The values shown are cumulative probabilities for the probability of (denoted as k in the table) PROBABILITIES (p) 0.01 0.05 0.10 0.0 0.30 0.40 0.50 0.60 0.70 0.80 0.90 0.95 0.99 0 0.951 0.774 0.590 0.38 0.168 0.078 0.031 0.010 0.00 0.000 0.000 0.000 0.000 1 0.999 0.977 0.919 0.737 0.58 0.337 0.188 0.087 0.031 0.007 0.000 0.000 0.000 1.000 0.999 0.991 0.94 0.837 0.683 0.500 0.317 0.163 0.058 0.009 0.001 0.000 3 1.000 1.000 1.000 0.993 0.969 0.913 0.813 0.663 0.47 0.63 0.081 0.03 0.001 4 1.000 1.000 1.000 1.000 0.998 0.990 0.969 0.9 0.83 0.67 0.410 0.6 0.049 5 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 Use the n = 5 Table for p =.6 Solve the probability for = 3 " 3) =.663 " ) =.317 =3) =.663 -.317 =.346 This is the same value (with some rounding error) that we calculated using the formula (.3456) 7 Use the n = 5 Table for p =.6 Solve the probability for > 3 " 3) =.663 >3) = 1 -.663 =.337 Solve the probability for " " ) =.317 8
The Rare Event Approach Summary What if we had 5 dentists selected randomly and none of them used nitrous oide? Given p=.6, this would be a very rare event =0) =.010 This is possible, but not probable Was this just by chance???? Or was the assumption wrong that p =.6? The Binomial is a special form of the discrete random variable There are other discrete random variables - poisson If you know it is a Binomial Random Variable it makes it easy to solve for probabilities, the mean and the variance For probabilities you can use: The Binomial Formula The Binomial Tables Ecel also has functions to solve for binomials 9 30