Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
6.1: Discrete and Continuous Random Variables Random Variables and Probability Distributions A probability model describes the possible outcomes of a chance process and the likelihood that those outcomes will occur. Consider tossing a fair coin 3 times. Define X = the number of heads obtained X = 0: TTT X = 1: HTT THT TTH X = 2: HHT HTH THH X = 3: HHH What’s the probability that we get at least one head in three tosses of the coin? In symbols, we want to find P(X ≥ 1). We could add probabilities to get the answer: 3 3 1 7 𝑃(𝑋 ≥ 1) = 𝑃(𝑋 = 1) + 𝑃(𝑋 = 2) + 𝑃(𝑋 = 3) = + + = 8 8 8 8 Or we could use the complement rule from Chapter 5: 1 7 𝑃(𝑋 ≥ 1) = 1 − 𝑃(𝑋 < 1) = 1 − 𝑃(𝑋 = 0) = 1 − = 8 8 A random variable takes numerical values that describe the outcomes of some chance process. Ex: X in the coin-tossing scenario The probability distribution of a random variable gives its possible values and their probabilities. Ex: The table above There are two main types of random variables: discrete and continuous. Discrete Random Variables If we can find a way to list all possible outcomes for a random variable and assign probabilities to each one, we have a discrete random variable. The variable X in the coin-tossing example is a discrete random variable. We can list the possible values of X as 0, 1, 2, 3. Note that there are gaps between these values on a number line. The corresponding probabilities are all between 0 and 1, and their sum is 1/8 + 3/8 + 3/8 + 1/8 = 1. Ex: In 1952, Dr. Virginia Apgar suggested five criteria for measuring a baby’s health at birth: skin color, heart rate, muscle tone, breathing, and response when stimulated. She developed a 0-1-2 scale to rate a newborn on each of the five criteria. A baby’s Apgar score is the sum of the ratings on each of the five scales, which gives a whole-number value from 0 to 10. Apgar scores are still used today to evaluate the health of newborns. What Apgar scores are typical? To find out, researchers recorded the Apgar scores of over 2 million newborn babies in a single year. Imagine selecting one of these newborns at random. (That’s our chance process.) Define the random variable X = Apgar score of a randomly selected baby one minute after birth. The table below gives the probability distribution for X. PROBLEM a. Show that the probability distribution for X is legitimate. b. Make a histogram of the probability distribution. Describe what you see. c. Doctors decided that Apgar scores of 7 or higher indicate a healthy baby. What’s the probability that a randomly selected baby is healthy? On Your Own: North Carolina State University posts the grade distributions for its courses online. Students in Statistics 101 in a recent semester received 26% A’s, 42% B’s, 20% C’s, 10% D’s, and 2% F’s. Choose a Statistics 101 student at random. The student’s grade on a four-point scale (with A = 4) is a discrete random variable X with this probability distribution: 1. Say in words what the meaning of P(X ≥ 3) is. What is this probability? 2. Write the event “the student got a grade worse than C” in terms of values of the random variable X. What is the probability of this event? 3. Sketch a graph of the probability distribution. Describe what you see. Mean (Expected Value) of a Discrete Random Variable When analyzing discrete random variables, we follow the same strategy we used with quantitative data – describe the shape, center, and spread, and identify any outliers. We’ve already discussed shape in the coin-tossing and Apgar score examples. Center: The mean of any discrete random variable is an average of the possible outcomes, with each outcome weighted by its probability. Important: Not all outcomes may be equally likely! Ex: On an American roulette wheel, there are 38 slots numbered 1 through 36, plus 0 and 00. Half of the slots from 1 to 36 are red; the other half are black. Both the 0 and 00 slots are green. Suppose that a player places a simple $1 bet on red. If the ball lands in a red slot, the player gets the original dollar back, plus an additional dollar for winning the bet. If the ball lands in a different-colored slot, the player loses the dollar bet to the casino. Let’s define the random variable X = net gain from a single $1 bet on red. The possible values of X are —$1 and $1. (The player either gains a dollar or loses a dollar.) What are the corresponding probabilities? The chance that the ball lands in a red slot is 18/38. The chance that the ball lands in a different-colored slot is 20/38. Here is the probability distribution of X: What is the player’s average gain? The ordinary average of the two possible outcomes —$1 and $1 is $0. But $0 isn’t the average winnings because the player is less likely to win $1 than to lose $1. In the long run, the player gains a dollar 18 times in every 38 games played and loses a dollar on the remaining 20 of 38 bets. The player’s long-run average gain for this simple bet is You see that the player loses (and the casino gains) an average of five cents per $1 bet in many, many plays of the game. If someone played several games of roulette, we would call the mean amount the person gained 𝑥̅ . The mean in the previous example is a different quantity—it is the long-run average gain we’d expect if someone played roulette a very large number of times. For this reason, the mean of a random variable is often referred to as its expected value. Just as probabilities describe the proportion of times that an outcome occurs in many repetitions of a chance process, the mean of a discrete random variable describes the long-run average outcome. Suppose that X is a discrete random variable whose probability distribution is Value: x1 x2 x3 … Probability: p1 p2 p3 … To find the mean (expected value) of X, multiply each possible value by its probability, then add all the products: x E ( X ) x1 p1 x2 p2 x3 p3 ... xi p i Ex: A baby’s Apgar score is the sum of the ratings on each of five scales, which gives a whole-number value from 0 to 10. Let X = Apgar score of a randomly selected newborn. Compute the mean of the random variable X. Interpret this value in context. We see that 1 in every 1000 babies would have an Apgar score of 0; 6 in every 1000 babies would have an Apgar score of 1; and so on. So the mean (expected value) of X is: The mean Apgar score of a randomly selected newborn is 8.128. This is the average Apgar score of many, many randomly chosen babies. Note: Notice that the mean Apgar score, 8.128, is not a possible value of the random variable X. It’s also not an integer. If you think of the mean as a long-run average over many repetitions, these facts shouldn’t bother you. Standard Deviation of a Discrete Random Variable Since we use the mean as the measure of center for a discrete random variable, we use the standard deviation as our measure of spread. Suppose that X is a discrete random variable whose probability distribution is Value: x1 x2 x3 … Probability: p1 p2 p3 … and that µX is the mean of X. The variance of X is Var ( X ) X2 ( x1 X ) 2 p1 ( x 2 X ) 2 p 2 ( x3 X ) 2 p3 ... ( xi X ) 2 pi The standard deviation of a random variable X is a measure of how much the values of the variable typically vary from the mean μX. To get the standard deviation of a random variable, take the square root of the variance. Ex: A baby’s Apgar score is the sum of the ratings on each of five scales, which gives a whole-number value from 0 to 10. Let X = Apgar score of a randomly selected newborn. Compute and interpret the standard deviation of the random variable X. The formula for the variance of X is The standard deviation of X is 𝜎𝑥 = √2.066 = 1.437. A randomly selected baby’s Apgar score will typically differ from the mean (8.128) by about 1.4 units. On Your Own: A large auto dealership keeps track of sales made during each hour of the day. Let X = the number of cars sold during the first hour of business on a randomly selected Friday. Based on previous records, the probability distribution of X is as follows: 1. Compute and interpret the mean of X. 2. Compute and interpret the standard deviation of X. Continuous Random Variables When we use the table of random digits to select a digit between 0 and 9, the result is a discrete random variable (call it X). The probability model assigns probability 1/10 to each of the 10 possible values of X. Suppose we want to choose a number at random between 0 and 1, allowing any number between 0 and 1 as the outcome (like 0.84522 or 0.1111119). Calculator and computer random number generators will do this. The sample space of this chance process is an entire interval of numbers: S = all numbers between 0 and 1 Call the outcome of the random number generator Y for short. How can we find probabilities of events like P(0.3 ≤ Y ≤ 0.7)? As in the case of selecting a random digit, we would like all possible outcomes to be equally likely. But we cannot assign probabilities to each individual value of Y and then add them, because there are infinitely many possible values. In situations like this, we use a different way of assigning probabilities directly to events—as areas under a density curve. Recall from Chapter 2 that any density curve has area exactly 1 underneath it, corresponding to total probability 1. Ex: The random number generator will spread its output uniformly across the entire interval from 0 to 1 as we allow it to generate a long sequence of random numbers. The results of many trials are represented by the density curve of a uniform distribution. This density curve appears in purple in the figure below. It has height 1 over the interval from 0 to 1. The area under the density curve is 1, and the probability of any event is the area under the density curve and above the event in question. As the figure shows, the probability that the random number generator produces a number Y between 0.3 and 0.7 is P(0.3 ≤ Y ≤ 0.7) = 0.4. That’s because the area of the shaded rectangle is length × width = 0.4 × 1 = 0.4 The figure on the right showed the probability distribution of the random variable Y = random number between 0 and 1. We call Y a continuous random variable because its values are not isolated numbers but rather an entire interval of numbers. A continuous random variable takes on all values in an interval of numbers. The probability distribution is described by a density curve. The probability of any event is the area under the density curve and above the values that make up the event. The probability model of a discrete random variable X assigns a probability between 0 and 1 to each possible value of X. A continuous random variable Y has infinitely many possible values. All continuous probability models assign probability 0 to every individual outcome. Only intervals of values have positive probability. Note: • To see that this is true, consider a specific outcome from the random number generator of the previous example, such as P(Y = 0.7). The probability of this event is the area under the density curve that’s above the point 0.70000…on the horizontal axis. But this vertical line segment has no width, so the area is 0. For that reason, 𝑃(0.3 ≤ 𝑌 ≤ 0.7) = 𝑃(0.3 ≤ 𝑌 < 0.7) = 𝑃(0.3 < 𝑌 < 0.7) = 0.4 • We can use any density curve to assign probabilities. The density curves that are most familiar to us are the Normal curves of Ch. 2. We learned how to find areas in any Normal distribution. CAUTION: • In many cases, discrete random variables arise from counting something—for instance, the number of siblings that a randomly selected student has. • Continuous random variables often arise from measuring something—for instance, the height or time to run a mile for a randomly selected student. Ex: The heights of young women closely follow the Normal distribution with mean µ = 64 inches and standard deviation σ = 2.7 inches. Now choose one young woman at random. Call her height Y. If we repeat the random choice very many times, the distribution of values of Y is the same Normal distribution that describes the heights of all young women. Problem: What’s the probability that the chosen woman is between 68 and 70 inches tall? Step 1: State the distribution and the values of interest. The height Y of a randomly chosen young woman has the N(64, 2.7) distribution. We want to find P(68 ≤ Y ≤ 70). Step 2: Perform calculations—show your work! The standardized scores for the two boundary values are Step 3: Answer the question. There is about a 5.62% chance that the randomly selected woman has a height between 68 and 70 inches. On Your Own: The weights of three-year-old females closely follow a Normal distribution with a mean of µ = 30.7 pounds and standard deviation of σ = 3.6 pounds. Randomly choose one three-year-old female and call her weight X. Problem: What is the probability that a randomly selected three-year-old female weighs at least 30 pounds? 6.2: Transforming and Combining Random Variables Linear Transformations In Section 6.1, we learned that the mean and standard deviation give us important information about a random variable. In this section, we’ll learn how the mean and standard deviation are affected by transformations on random variables. In Chapter 2, we studied the effects of linear transformations on the shape, center, and spread of a distribution of data. Recall: Multiplying a Random Variable by a Constant Pete’s Jeep Tours offers a popular half-day trip in a tourist area. There must be at least 2 passengers for the trip to run, and the vehicle will hold up to 6 passengers. Define X as the number of passengers on a randomly selected day. Find and interpret the mean and standard deviation. Pete charges $150 per passenger. The random variable C describes the amount Pete collects on a randomly selected day. We can write C = 150X. The mean of C is $562.50 and the standard deviation is $163.50. Compare the shape, center, and spread of the two probability distributions. As with data, if we multiply a random variable by a negative constant b, our common measures of spread are multiplied by |b|. Adding a Constant to a Random Variable Consider Pete’s Jeep Tours again. We defined C as the amount of money Pete collects on a randomly selected day. It costs Pete $100 per trip to buy permits, gas, and a ferry pass. The random variable V describes the profit Pete makes on a randomly selected day. That is, V = C – 100. The mean of V is $462.50 and the standard deviation is $163.50. Compare the shape, center, and spread of the two probability distributions. On Your Own: A large auto dealership keeps track of sales made during each hour of the day. Let X = the number of cars sold during the first hour of business on a randomly selected Friday. Based on previous records, the probability distribution of X is as follows: Last class, we found the random variable X has mean μX = 1.1 and standard deviation σX = 0.943. a. Suppose the dealership’s manager receives a $500 bonus from the company for each car sold. Let Y = the bonus received from car sales during the first hour on a randomly selected Friday. Find the mean and standard deviation of Y. b. To encourage customers to buy cars on Friday mornings, the manager spends $75 to provide coffee and doughnuts. The manager’s net profit T on a randomly selected Friday is the bonus earned minus this $75. Find the mean and standard deviation of T. Putting it all Together Linear Transformations Linear transformations have similar effects on other measures of center or location (median, quartiles, percentiles) and spread (range, IQR). Whether we’re dealing with data or random variables, the effects of a linear transformation are the same. Note: These results apply to both discrete and continuous random variables. Ex: One brand of bathtub comes with a dial to set the water temperature. When the “babysafe” setting is selected and the tub is filled, the temperature X of the water follows a Normal distribution with a mean of 34℃ and a standard deviation of 2℃. 9 a. Define the random variable Y to be the water temperature in degrees Fahrenheit (recall that 𝐹 = 5 𝐶 + 32) when the dial is set on “babysafe.” Find the mean and standard deviation of Y. b. According to Babies R Us, the temperature of a baby’s bathwater should be between 90℉ and 100℉. Find the probability that the water temperature on a randomly selected day when the “babysafe” setting is used meets the Babies R Us recommendation. Show your work. Combining Random Variables Many interesting statistics problems require us to examine two or more random variables. Let’s investigate the result of adding and subtracting random variables. Let X = the number of passengers on a randomly selected trip with Pete’s Jeep Tours. Y = the number of passengers on a randomly selected trip with Erin’s Adventures (in another part of the country). Define T = X + Y. What are the mean and variance of T? How many total passengers T will Pete and Erin have on their tours on a randomly selected day? To answer this question, we need to know about the distribution of the random variable T = X + Y. Since Pete expects µX = 3.75 and Erin expects µY = 3.10 , they will average a total of 3.75 + 3.10 = 6.85 passengers per trip. We can generalize this result as follows: How much variability is there in the total number of passengers who go on Pete’s and Erin’s tours on a randomly selected day? Let’s think about the possible values of T = X + Y. The number of passengers X on Pete’s tour is between 2 and 6, and the number of passengers Y on Erin’s tour is between 2 and 5. So the total number of passengers T is between 4 and 11. Thus, the range of T is 11 – 4 = 7. How is this value related to the ranges of X and Y? The range of X is 4 and the range of Y is 3, so range of T = range of X + range of Y That is, there’s more variability in the values of T than in the values of X or Y alone. This makes sense, because the variation in X and the variation in Y both contribute to the variation in T. What about the standard deviation σT? If we had the probability distribution of the random variable T, then we could calculate σT. Let’s try to construct this probability distribution starting with the smallest possible value, T = 4. The only way to get a total of 4 passengers is if Pete has X = 2 passengers and Erin has Y = 2 passengers. We know that P(X = 2) = 0.15 and that P(Y = 2) = 0.3. If the two events X = 2 and Y = 2 are independent, then we can multiply these two probabilities. Otherwise, we’re stuck. In fact, we can’t calculate the probability for any value of T unless X and Y are independent random variables. If knowing whether any event involving X alone has occurred tells us nothing about the occurrence of any event involving Y alone, and vice versa, then X and Y are independent random variables. Probability models often assume independence when the random variables describe outcomes that appear unrelated to each other. You should always ask whether the assumption of independence seems reasonable. In our investigation, it is reasonable to assume X and Y are independent since the siblings operate their tours in different parts of the country. Let T = X + Y, as before. Because X and Y are independent random variables, 𝑃(𝑇 = 4) = 𝑃(𝑋 = 2 and 𝑌 = 2) = 𝑃(𝑋 = 2) × 𝑃(𝑌 = 2) = (0.15)(0.3) = 0.045 There are two ways to get a total of T = 5 passengers on a randomly selected day: X = 3, Y = 2 or X = 2, Y = 3. So 𝑃(𝑇 = 5) = 𝑃(𝑋 = 2 and 𝑌 = 3) + 𝑃(𝑋 = 3 and 𝑌 = 2) = (0.15)(0.4) + (0.25)(0.3) = 0.06 + 0.075 = 0.135 We can construct the probability distribution by listing all combinations of X and Y that yield each possible value of T and adding the corresponding probabilities. Here is the result. You can check that the probabilities add to 1. A histogram of the probability distribution is shown. The mean of T is 𝜇 𝑇 = 6.85. Recall that μX = 3.75 and μY = 3.10. Our calculation confirms that μT = μX + μY = 3.75 + 3.10 = 6.85 What about the variance of T? It’s 𝜎𝑇 2 = 2.0775. Recalling that 𝜎𝑋 2 = 1.1875 and 𝜎𝑌 2 = 0.89, we see that 1.1875 + 0.89 = 2.0775. That is, 𝜎𝑇 2 = 𝜎𝑋 2 + 𝜎𝑌 2 To find the standard deviation of T, take the square root of the variance 𝜎𝑇 = √2.0775 = 1.441 Note: • As the preceding example illustrates, when we add two independent random variables, their variances add. • Standard deviations do not add. • For Pete’s and Erin’s passenger totals, σX + σY = 1.0897 + 0.943 = 2.0327 – This is very different from σT = 1.441. Remember that you can add variances only if the two random variables are independent, and that you can NEVER add standard deviations! Ex: A college uses SAT scores as one criterion for admission. Experience has shown that the distribution of SAT scores among its entire population of applicants is such that PROBLEM: What are the mean and standard deviation of the total score X + Y for a randomly selected applicant to this college? Ex: Earlier, we defined X = the number of passengers that Pete has and Y = the number of passengers that Erin has on a randomly selected day. Recall that 𝜇𝑋 = 3.75, 𝜎𝑋 = 1.0897 𝜇𝑌 = 3.10, 𝜎𝑌 = 0.943 Pete charges $150 per passenger and Erin charges $175 per passenger. PROBLEM: Calculate the mean and the standard deviation of the total amount that Pete and Erin collect on a randomly chosen day. On Your Own: A large auto dealership keeps track of sales and lease agreements made during each hour of the day. Let X = the number of cars sold and Y = the number of cars leased during the first hour of business on a randomly selected Friday. Based on previous records, the probability distributions of X and Y are as follows: Define T = X + Y. Assume that X and Y are independent. a. Find and interpret μT b. Compute σT. Show your work. c. The dealership’s manager receives a $500 bonus for each car sold and a $300 bonus for each car leased. Find the mean and standard deviation of the manager’s total bonus B. Show your work. We can perform a similar investigation to determine what happens when we define a random variable as the difference of two random variables. In summary, we find the following: Ex: We have defined several random variables related to Pete’s and Erin’s tour businesses. For a randomly selected day, C = amount of money that Pete collects G = amount of money that Erin collects Here are the means and standard deviations of these random variables: 𝜇𝐶 = 562.50 𝜇𝐺 = 542.50 𝜎𝐶 = 163.46 𝜎𝐺 = 165.03 PROBLEM: Calculate the mean and the standard deviation of the difference D = C − G in the amounts that Pete and Erin collect on a randomly chosen day. Interpret each value in context. On Your Own: A large auto dealership keeps track of sales and lease agreements made during each hour of the day. Let X = the number of cars sold and Y = the number of cars leased during the first hour of business on a randomly selected Friday. Based on previous records, the probability distributions of X and Y are as follows: Define D = X - Y. Assume that X and Y are independent. a. Find and interpret μD b. Compute σD. Show your work. c. The dealership’s manager receives a $500 bonus for each car sold and a $300 bonus for each car leased. Find the mean and standard deviation of the difference in the manager’s bonus for cars sold and leased. Show your work. Combining Normal Random Variables We used Fathom software to simulate taking independent SRSs of 1000 observations from each of two Normally distributed random variables, X and Y. Figure 6.11(a) shows the results. The random variable X is N(3, 0.9) and the random variable Y is N(1,1.2). What do we know about the sum and difference of these two random variables? The histograms in Figure 6.11(b) came from adding and subtracting the values of X and Y for the 1000 randomly generated observations from each distribution. Let’s summarize what we see: As the last example showed: Any sum or difference of independent Normal random variables is also Normally distributed. Mr. Starnes likes between 8.5 and 9 grams of sugar in his hot tea. Suppose the amount of sugar in a randomly selected packet follows a Normal distribution with mean 2.17 g and standard deviation 0.08 g. If Mr. Starnes selects 4 packets at random, what is the probability his tea will taste right? Let X = the amount of sugar in a randomly selected packet. Then, T = X1 + X2 + X3 + X4. We want to find P(8.5 ≤ T ≤ 9). 8.5 8.68 9 8.68 1.13 and z 2.00 0.16 0.16 P(-1.13 ≤ Z ≤ 2.00) = 0.9772 – 0.1292 = 0.8480 There is about an 85% chance Mr. Starnes’s tea will taste right. z Ex: The diameter C of a randomly selected large drink cup at a fast-food restaurant follows a Normal distribution with a mean of 3.96 inches and a standard deviation of 0.01 inches. The diameter L of a randomly selected large lid at this restaurant follows a Normal distribution with mean 3.98 inches and standard deviation 0.02 inches. For a lid to fit on a cup, the value of L has to be bigger than the value of C, but not by more than 0.06 inches. PROBLEM: What’s the probability that a randomly selected large lid will fit on a randomly chosen large drink cup? 6.3: Binomial and Geometric Random Variables Binomial Settings What do the following scenarios have in common? 1. Toss a coin 5 times. Count the number of heads. 2. Spin a roulette wheel 8 times. Record how many times the ball lands in a red slot. 3. Take a random sample of 100 babies born in U.S. hospitals today. Count the number of females. In each case, we’re performing repeated trials of the same chance process. The number of trials is fixed in advance. Also, knowing the outcome of one trial tells us nothing about the outcome of any other trial. That is, the trials are independent. We’re interested in the number of times that a specific event (we’ll call it a “success”) occurs. Our chances of getting a “success” are the same on each trial. When these conditions are met, we have a binomial setting. 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. Some random variables count the number of times the outcome of interest occurs in a fixed number of repetitions. They are called binomial random variables. 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. The four conditions for a binomial setting are: • Binary? The possible outcomes of each trial can be classified as “success” or “failure.” • Independent? Trials must be independent; that is, knowing the result of one trial must not tell us anything about the result of any other trial. • Number? The number of trials n of the chance process must be fixed in advance. • Success? There is the same probability p of success on each trial. BINS Binomial Random Variables Consider tossing a coin n times. Each toss gives either heads or tails. Knowing the outcome of one toss does not change the probability of an outcome on any other toss. That means, each toss is independent. If we define heads as a success, then p is the probability of a head and is 0.5 on any toss. The number of heads in n tosses is a binomial random variable X. The probability distribution of X is called a binomial distribution. The count X of successes in a binomial setting is a binomial random variable. The probability distribution of X is a binomial distribution with parameters n and p, where n is the number of trials of the chance process and p is the probability of a success on any one trial. The possible values of X are the whole numbers from 0 to n. Ex: PROBLEM: Here are three scenarios involving chance behavior. In each case, determine whether or not the given random variable has a binomial distribution. Justify your answer. a. Genetics says that children receive genes from each of their parents independently. Each child of a particular set of parents has probability 0.25 of having type O blood. Suppose these parents have 5 children. Let X = the number of children with type O blood. b. Shuffle a deck of cards. Turn over the first 10 cards, one at a time. Let Y = the number of aces you observe. c. Shuffle a deck of cards. Turn over the top card. Put the card back in the deck, and shuffle again. Repeat this process until you get an ace. Let W = the number of cards required. On Your Own: For each of the following situations, determine whether the given random variable has a binomial distribution or not. Justify your answer. a. Shuffle a deck of cards. Turn over the top card. Put the card back in the deck, and shuffle again. Repeat this process 10 times. Let X = the number of aces you observe. b. Choose students at random from your class. Let Y = the number who are over 6 feet tall. c. Roll a fair die 100 times. Sometime during the 100 rolls, one corner of the die chips off. Let W = the number of 5s you roll. Binomial Probabilities In a binomial setting, we can define a random variable (say, X) as the number of successes in n independent trials. We are interested in finding the probability distribution of X. Each child of a particular pair of parents has probability 0.25 of having type O blood. Genetics says that children receive genes from each of their parents independently. If these parents have 5 children, the count X of children with type O blood is a binomial random variable with n = 5 trials and probability p = 0.25 of a success on each trial. In this setting, a child with type O blood is a “success” (S) and a child with another blood type is a “failure” (F). What’s P(X = 0)? That is, what’s the probability that none of the 5 children has type O blood? It’s the chance that all 5 children don’t have type O blood. The probability that any one of this couple’s children doesn’t have type O blood is 1 − 0.25 = 0.75 (complement rule). By the multiplication rule for independent events (Chapter 5), P(X = 0) = P(FFFFF) = (0.75)(0.75)(0.75)(0.75)(0.75) = (0.75)5 = 0.2373 What’s P(X = 2)? P(SSFFF) = (0.25)(0.25)(0.75)(0.75)(0.75) = (0.25)2(0.75)3 = 0.02637 However, there are a number of different arrangements in which 2 out of the 5 children have type O blood: Verify that in each arrangement, P(X = 2) = (0.25)2(0.75)3 = 0.02637 Therefore, P(X = 2) = 10(0.25)2(0.75)3 = 0.2637 Binomial Coefficient Note, in the previous example, any one arrangement of 2 S’s and 3 F’s had the same probability. This is true because no matter what arrangement, we’d multiply together 0.25 twice and 0.75 three times. We can generalize this for any setting in which we are interested in k successes in n trials. That is, P( X k ) P(exactly k successes in n trials) = number of arrangemen ts p k (1 p) nk Factorials Binomial Probability Formula The binomial coefficient counts the number of different ways in which k successes can be arranged among n trials. The binomial probability P(X = k) is this count multiplied by the probability of any one specific arrangement of the k successes. Ex: Each child of a particular pair of parents has probability 0.25 of having blood type O. Suppose the parents have 5 children a. Find the probability that exactly 3 of the children have type O blood. Let X = the number of children with type O blood. We know X has a binomial distribution with n = 5 and p = 0.25. 5 P( X 3) (0.25)3 (0.75) 2 10(0.25)3 (0.75) 2 0.08789 3 b. Should the parents be surprised if more than 3 of their children have type O blood? To answer this, we need to find P(X > 3). P( X 3) P( X 4) P( X 5) Since there is only a 5 5 1.5% chance that more (0.25) 4 (0.75)1 (0.25)5 (0.75) 0 than 3 children out of 5 4 5 would have Type O 5(0.25) 4 (0.75)1 1(0.25) 5 (0.75) 0 blood, the parents 0.01465 0.00098 0.01563 should be surprised! Note: • Note the use of the complement rule to find P(X > 3) in the Technology Corner: P(X > 3) = 1 − P(X ≤ 3). This is necessary because the calculator’s binomcdf (n, p, k) command only computes the probability of getting k or fewer successes in n trials. – Students often have trouble identifying the correct third input for the binomcdf command when a question asks them to find the probability of getting less than, more than, or at least so many successes. • Here’s a helpful tip to avoid making such a mistake: write out the possible values of the variable, circle the ones you want to find the probability of, and cross out the rest. In the previous example, X can take values from 0 to 5 and we want to find P(X > 3): Crossing out the values from 0 to 3 shows why the correct calculation is 1 − P(X ≤ 3). How to Find Binomial Probabilities Ex: A local fast-food restaurant is running a “Draw a three, get it free” lunch promotion. After each customer orders, a touch-screen display shows the message “Press here to win a free lunch.” A computer program then simulates one card being drawn from a standard deck. If the chosen card is a 3, the customer’s order is free. Otherwise, the customer must pay the bill. PROBLEM: a. All 12 players on a school’s basketball team place individual orders at the restaurant. What is the probability that exactly 2 of them win a free lunch? b. If 250 customers place lunch orders on the first day of the promotion, what’s the probability that fewer than 10 win a free lunch? On Your Own: To introduce her class to binomial distributions, Mrs. Desai gives a 10-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. a. Show that X is a binomial random variable. b. Find P(X = 3). Explain what this result means. c. To get a passing score on the quiz, a student must guess correctly at least 6 times. Would you be surprised if Patti earned a passing score? Compute an appropriate probability to support your answer. Mean and Standard Deviation of a Binomial Distribution We describe the probability distribution of a binomial random variable just like any other distribution – by looking at the shape, center, and spread. Consider the probability distribution of X = number of children with type O blood in a family with 5 children. xi 0 1 2 3 4 5 pi 0.2373 0.3955 0.2637 0.0879 0.0147 0.00098 Shape: The probability distribution of X is skewed to the right. It is more likely to have 0, 1, or 2 children with type O blood than a larger value. Center: The median number of children with type O blood is 1. Based on our formula for the mean: X xi pi (0)(0.2373) 1(0.39551) ... (5)(0.00098) 1.25 Spread: The variance of X is X2 ( xi X ) 2 pi (0 1.25) 2 (0.2373) (1 1.25) 2 (0.3955) ... (5 1.25) 2 (0.00098) 0.9375 The standard deviation of X is X 0.9375 0.968 Note: Note: These formulas work ONLY for binomial distributions. They can’t be used for other distributions! Ex: Mr. Bullard’s 21 AP Statistics students did an activity where they had to guess which of 3 cups held bottled water (not tap water). If we assume the students in his class cannot tell tap water from bottled water, then each has a 1/3 chance of correctly identifying the different type of water by guessing. Let X = the number of students who correctly identify the cup containing the different type of water. Find the mean and standard deviation of X. Since X is a binomial random variable with parameters n = 21 and p = 1/3, we can use the formulas for the mean and standard deviation of a binomial random variable. X np We’d expect about one-third of his 21 21(1 / 3) 7 students, about 7, to guess correctly. X np(1 p) 21(1 / 3)( 2 / 3) 2.16 If the activity were repeated many times with groups of 21 students who were just guessing, the number of correct identifications would differ from 7 by an average of 2.16. On Your Own: Refer to the previous On Your Own about Mrs. Desai’s special multiple-choice quiz on binomial distributions. We defined X = the number of Patti’s correct guesses. a. Find μX. Interpret this value in context. b. Find σX. Interpret this value in context. c. What’s the probability that the number of Patti’s correct guesses is more than 2 standard deviations above the mean? Show your method. Binomial Distributions in Statistical Sampling The binomial distributions are important in statistics when we wish to make inferences about the proportion p of successes in a population. Almost all real-world sampling, such as taking an SRS from a population of interest, is done without replacement. However, sampling without replacement leads to a violation of the independence condition. When the population is much larger than the sample, a count of successes in an SRS of size n has approximately the binomial distribution with n equal to the sample size and p equal to the proportion of successes in the population. Ex: An airline has just finished training 25 first officers—15 male and 10 female— to become captains. Unfortunately, only eight captain positions are available right now. Airline managers decide to use a lottery to determine which pilots will fill the available positions. Of the 8 captains chosen, 5 are female and 3 are male. PROBLEM: Explain why the probability that 5 female pilots are chosen in a fair lottery is not 8 𝑃(𝑋 = 5) = ( ) (0.40)5 (0.60)3 = 0.124 5 Normal Approximations for Binomial Distributions As n gets larger, something interesting happens to the shape of a binomial distribution. The figures below show histograms of binomial distributions for different values of n and p. What do you notice as n gets larger? This is called the Large Counts condition. Ex: Sample surveys show that fewer people enjoy shopping than in the past. A survey asked a nationwide random sample of 2500 adults if they agreed or disagreed that “I like buying new clothes, but shopping is often frustrating and time-consuming.” The population that the poll wants to draw conclusions about is all U.S. residents aged 18 and over. PROBLEM: Suppose that exactly 60% of all adult U.S. residents would say “Agree” if asked the same question. Let X = the number in the sample who agree. a. Assume that the conditions have been met for being a binomial random variable. Check the conditions for using a Normal approximation in this setting. b. Use a Normal distribution to estimate the probability that 1520 or more of the sample agree. Geometric Settings In a binomial setting, the number of trials n is fixed and the binomial random variable X counts the number of successes. In other situations, the goal is to repeat a chance behavior until a success occurs. Roll a pair of dice until you get doubles. In basketball, attempt a three-point shot until you make one. Keep placing a $1 bet on the number 15 in roulette until you win. These situations are called geometric settings. A geometric setting arises when we perform independent trials of the same chance process and record the number of trials it takes to get one success. On each trial, the probability p of success must be the same. In a geometric setting, if we define the random variable Y to be the number of trials needed to get the first success, then Y is called a geometric random variable. The probability distribution of Y is called a geometric distribution. The number of trials Y that it takes to get a success in a geometric setting is a geometric random variable. The probability distribution of Y is a geometric distribution with parameter p, the probability of a success on any trial. The possible values of Y are 1, 2, 3, . . . . Like binomial random variables, it is important to be able to distinguish situations in which the geometric distribution does and doesn’t apply! The Lucky Day Game The random variable of interest in this game is Y = the number of guesses it takes to correctly match the lucky day. What is the probability the first student guesses correctly? The second? Third? What is the probability the kth student guesses correctly? P(Y =1) =1/7 P(Y = 2) = (6/7)(1/7) = 0.1224 P(Y = 3) = (6/7)(6/7)(1/7) = 0.1050 P(Y 4) (6 / 7)(6 / 7)(6 / 7)(1 / 7) 0.08996 Ex: PROBLEM: Let the random variable Y be defined as in the previous example. a. Find the probability that the class receives exactly 10 homework problems as a result of playing the Lucky Day Game. b. Find P(Y < 10) and interpret this value in context. Mean of a Geometric Random Variable The table below shows part of the probability distribution of Y. We can’t show the entire distribution because the number of trials it takes to get the first success could be an incredibly large number. yi 1 2 3 4 5 6 pi 0.143 0.122 0.105 0.090 0.077 0.066 … Shape: The heavily right-skewed shape is characteristic of any geometric distribution. That’s because the most likely value is 1. Center: The mean of Y is µY = 7. We’d expect it to take 7 guesses to get our first success. Spread: The standard deviation of Y is σY = 6.48. If the class played the Lucky Day game many times, the number of homework problems the students receive would differ from 7 by an average of 6.48. On Your Own: Suppose you roll a pair of fair, six-sided dice until you get doubles. Let T = the number of rolls it takes. a. Show that T is a geometric random variable. b. Find P(T = 3). Interpret this result in context. c. 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.