Chapter : Random Variables Ch. -3: Binomial and Geometric Random Variables
X 0 2 3 4 5 7 8 9 0 0 P(X) 3???????? 4 4 When the same chance process is repeated several times, we are often interested in whether a particular outcome does or doesn t happen on each repetition. 0 Chance Process: Randomly select a Starburst Outcome of Interest: Picking cherry flavor Random Variable: X = number of candies that are cherry flavored
A binomial setting arises when we perform several independent trials of the same chance process and record the number of times that a particular outcome occurs. There are four conditions that need to be met in order to have a binomial setting: successes failures **Success does not always mean good (depends on outcome of interest) Binary doesn t necessarily mean only two possible outcomes. Ex: getting a cherry flavor (success) getting a lemon, orange, etc (failure = not cherry) knowing the outcome of one trial does not affect the probabilities of the next 2 trials or observations the same remember BINS
binomial distribution n p number of trials probability of success for each trial whole numbers 0 to n B(n, p) Check BINS! B: I: N: S: Success: girl Failure: not girl Independent, the sex of one child doesn t affect the sex of the next Fixed number of trials 20 p is 0.5 for each trial Yes, X has a binomial distribution
No, not a fixed number of trials No, not independent. p changes. example of success being bad YES! Not independent but the probability changes so slightly that we can approximate using a binomial setting. Almost all real-world sampling, such as taking an SRS, is done without replacement. P X = 0 = 9000 0000 8999 9999 8998 9998 =.4303 P X = 0 =.90 8 =.4305
combination Ex: nc k = n k = n! where n! = n n n 2 2 k! n k! 5 3 = 5! 3! 5 3! = 5! 3! 2! = 5 4 3 2 (3 2 )(2 ) = 5 4 2 = 0 With calculator: math PROB n C r 5 5 5 2 5 5 5 5 5 5 = 5 5 4 5 2 3 5 = 0 = 0.402 = 0.
5 0.8 5 5 2 0.8 0.2 0.2 0.2 0.2 = 5 0.8 0.2 4 =.004 0.8 2 0.2 3 = 0.052 n n (p) p p = n p p n p n 2 (p) (p) p p = n 2 p 2 p n 2 n k p k p n k # successes # failures Probability of getting k successes from n independent trials
For each of the following situations, determine whether the given random variable has a binomial distribution. Justify your answer. ) Shuffle a deck of cards. Turn over the top card. Put the card back in the deck, and shuffle again. Repeat this process 0 times. Let X = the number of aces you observe. 2) Choose three students at random from your class. Let Y = the number who are over feet tall. 3) Flip a coin. If it s heads, roll a -sided die. If it s tails, roll an 8-sided die. Repeat this process 5 times. Let W = the number of 5s you roll.
) Shuffle a deck of cards. Turn over the top card. Put the card back in the deck, and shuffle again. Repeat this process 0 times. Let X = the number of aces you observe. B: I: N: S: Success: get an ace Failure: don t get an ace Independent, with replacement so the outcome of one trial does not affect the outcome of any other trial. Fixed number of trials 0 p is 4 52 for each trial This is a binomial setting.
2) Choose three students at random from your class. Let Y = the number who are over feet tall. B: I: N: S: Success: over feet Failure: not over feet Without replacement, so observations are not independent This is not a binomial setting.
3) Flip a coin. If it s heads, roll a -sided die. If it s tails, roll an 8-sided die. Repeat this process 5 times. Let W = the number of 5s you roll. B: I: N: S: Success: roll a 5 Failure: don t roll a 5 Independent, the outcome of any one trial does not affect the outcome of any other trial. Fixed number of trials 5 The probability of success will change depending on whether a -sided or 8-sided die is used. This is not a binomial setting.
To introduce her class to binomial distributions, Mrs. Desai gives a 0- item, multiple-choice quiz. The catch is, students must simply guess an answer (A through E) for each question. Mrs. Desai uses her computer s random number generator to produce the answer key, so that each possible answer has an equal chance to be chosen. Patti is one of the students in this class. Let X = the number of Patti s correct guesses. ) Show that X is a binomial random variable. 2) Find P(X = 3). Explain what this result means. 3) To get a passing score on the quiz, a student must guess correctly at least times. Would you be surprised if Patti earned a passing score? Compute an appropriate probability to support your answer.
) Show that X is a binomial random variable. B: I: N: S: Success: question answer correctly Failure: question not answered correctly Independent, the computer randomly assigned correct answers to the questions, so one trial should not affect any other trial. Fixed number of trials 0 p is 5 = 0.2 for each trial This is a binomial setting. 2) Find P(X = 3). Explain what this result means. Use: n p k k p n k n = 0 p = 0.2 k = 3 P X = 3 = 0 0.2 3 3 0.2 0 3 = (20)(0.008)(0.209752) 0.203 There is a 20% chance that Patti will answer exactly 3 questions correctly.
3) To get a passing score on the quiz, a student must guess correctly at least times. Would you be surprised if Patti earned a passing score? Compute an appropriate probability to support your answer. P(X ) = P X = + P X = 7 + P X = 8 + P X = 9 + P X = 0 P X = = 0 0.2 0.2 0 = 0.0055 P X = 7 = 0 7 0.2 7 0.2 0 7 = 0.0008 P X = 8 = 0 8 0.2 8 0.2 0 8 = 0.00007 P X = 9 = 0 9 0.2 9 0.2 0 9 = 0.000004 P X = 0 = 0 0 0.2 0 0.2 0 0 0 P X = 0.0055 + 0.0008 + 0.00007 + 0.000004 + 0 0.004 Since there is only a 0.4% chance that a student will pass, we would be quite surprised if Patti was able to pass.
TIP: A lot of times, students don t recognize that using a binomial distribution is appropriate. You want to be able to identify one if it comes up. When you aren t sure how to answer a probability question, check if it is a binomial setting. P X = k = n C k p k p n k X P(X) n = 5 p = 0.8 p = 0.2 0 2 3 4 5 5C 0 (.8) 0.2 5 5 C (.8).2 4 5 C 2 (.8) 2.2 3.00032.004.052.2048.409.3277
stat plot window graph Shape: Skewed left. Since p =.8, it makes sense that the player is likely to make more shots Center: median = 4 50 th %ile E(X) = 0.00032 +.004 + = 4
each pdf binompdf(n, p, x) probability distribution function 2 nd vars "A" binompdf( **Computes P(X = k)** For the probability of making 4 out of 5 shots: binompdf(5,.8, 4) =.409
X n = 5 p = 0.8 p = 0.2 makes 0 makes 0 or makes 0,, or 2 0 2 3 4 5 P(X #).00032.0072.05792.2272.7232 does a cumulative probability distribution always end at? YES cumulative distribution function cdf at most ( ) 2 nd vars "B" binomcdf( **Computes P(X k)** binomcdf(n, p, x) For the probability of making at most 4 shots: binomcdf(5,.8, 4) =.7232
75) n = 7 p =.44 P X = 4 = binompdf 7,.44, 4 = 0.2304 77) n = 7 p =.44 P X > 4 = binomcdf 7,.44, 4 = 0.402 Can you use these calculator commands on the AP Exam? YES but Writing binompdf 7, 0.44, 4 = 0.2304 will not earn you full credit. At the very least, you must indicate what each of those calculator inputs represents. For example, I used binompdf(7, 0.44, 4) on my calculator with n = 7, p = 0.44, and k = 4.
μ X = 5 μ X = 7 μ X = np σ X = np p These formulas are on the formula sheet for the AP Exam. μ X P(failure)
Check BINS! Success: getting a cherry flavor Failure: not getting a cherry flavor This is a binomial setting. independent Fixed number of trials 200 Yes, by the 0% condition. p =.25 for each trial 200 (all starburst) 0 n 0 N Doesn t mean we want small samples! We just should not use a binomial distribution if the sample is more than 0% of the population.
σ X = 200 0.25 np p 50 On average, we expect to get around 50 cherry flavors..2 On average, the number of cherry cadies in a bag is.2 candies away from the expected value of 50. P(X = 0) P(X 0) = P(X < 0) = P(X 59) binompdf 200,. 25,0 = 0.07 binomcdf 200,. 25,59 = 0.024
Normal larger binomial μ X = 50 σ X =.2 0.9484 50 0 N(50,.2) 200.25 = 50 200.75 = 50 z = x μ X 0 50 = σ X.2 =.3 area =.9484 =.05 normalcdf 0, 99999, 50,.2 =.05 These values are pretty close to the answer we got in # (0.024)!
number of trials, 2, 3, 4, one success failure number of coin tosses to get heads number of die rolls to get a 5 number of free throws until a miss 2 knowing the outcome of one trial does not affect the probability of the next Remember BITS! the same first success There is not a fixed number of trials. Condition #3 is different.
B: I: T: S: Success: roll a 3 Failure: don t roll a 3 Check BITS Independent, the outcome of any one trial does not affect the outcome of any other trial. We re counting the number of trials needed to roll a 3. The probability of success is always /. = success on st roll = = 0.7 = fail st, then success = 5 = fail, fail, then success = 5 n = 0.38 5 = 0.5 YES = 5
p k (p)
We re trying to answer the question: On average, how many tosses do we need to get heads? On average, how many rolls do we need to get a 2? 2 2 The expected number of trials required to get the first success. p p p 2 p Not in our book
B: I: T: S: Check BITS. Success: get a cherry flavor Yes, this is a geometric setting. Failure: don t get a cherry flavor Independent, selecting Starburst candies is independent. We re counting the number of trials needed to get a cherry flavor. The probability of success is always 4 = 0.25. NO p = 4 4 On average, we will need to select 4 candies to get a cherry.
σ X = p p 2 = 3 4 2 = 4 4 = 2 3.4 On average, the number of trials needed until the st cherry will occur will be 3.4 away from the mean of 4. P(X = k) = p k (p) P(X = 5) = 4 fails, success = 3 4 5 4 = 0.079 OR we can use geometpdf p, x, which computes P(X = k) 2 nd vars "F" geometpdf( geometpdf 4, 5 = 0.079
P(X 5) = P(X < 5) = P(X 4) = geometcdf = 0.34 P(X = ) + P(X = 2) + P(X = 3) + P(X = 4) 4, 4 Computes P(X k) 2 nd vars "G" geometcdf( There s another way of solving this Think about it: To get cherry on at least 5 th try, how many fails do you HAVE to have? P(4 fails) = 3 = 0.34 4 4
Suppose you roll a pair of fair, six-sided dice until you get doubles. Let T = the number of rolls it takes. ) Show that T is a geometric random variable (check the BITS). 2) Find P(T = 3). Interpret this result in context. 3) In the game of Monopoly, a player can get out of jail free by rolling doubles within 3 turns. Find the probability that this happens.
) Show that T is a geometric random variable (check the BITS). Binary? Success = roll doubles Failure = don t roll doubles. Independent? Rolling dice is an independent process. Trials? We are counting trials up to and including the first success. Success? The probability of success is for each roll (there are ways to get doubles out of a total of 3 possible rolls). This is a geometric setting. Since T is measuring the number of trials to get the first success, it is a geometric random variable with p =.
2) Find P(T = 3). Interpret this result in context. P(T = 3) = 2 fails, success = 5 geometpdf, 3 = 0.57 3 = 0.57 There is about a 2% chance that you will get the first set of doubles on the third roll of the dice. 3) In the game of Monopoly, a player can get out of jail free by rolling doubles within 3 turns. Find the probability that this happens. P(T 3) = P(T = ) + P(T = 2) + P(T = 3) = + 5 geometcdf 2 + 5, 3 = 0.423 3 = 0.423