Chapter 7 Random Variables n 7.1 Discrete and Continuous Random Variables n 6.2 n Example: El Dorado Community College El Dorado Community College considers a student to be full-time if he or she is taking between 12 and 18 credits. The number of credits X that a randomly-selected EDCC full-time student is taking in the fall semester has the following distribution. Credits 12 13 14 15 16 17 18 Prob p i 0.25 0.10 0.05 0.30 0.10 0.05 0.15 Find the mean and standard deviation. EDCC charges $50 per credit. Let T = tuition charge for a randomly-selected fulltime student. T = 50X. Tuit. T $600 $650 $700 $750 $800 $850 $900 Prob p i 0.25 0.10 0.05 0.30 0.10 0.05 0.15 Find the mean and standard deviation Compare the shape, center, and spread of the two probability distributions. 1
n Example: Skee Ball Good skee ball players always roll for the 50-point slot. The probability distribution of a randomly-selected score at the WLPCS skee ball championship is shown below. Let X be the score. Find the mean and the standard deviation of the random variable X. Describe the s shape of the distribution. Score x i 10 20 30 40 50 Probability p i 0.32 0.27 0.19 0.15 0.07 Find the mean and standard deviation. Describe the distribution. A player receives one ticket from the game for every 10 points scored. Let the random variable T = number of tickets a player gets on a randomly-selected throw. Find and interpret the mean and standard deviation of the random variable T. Tickets T 1 2 3 4 5 Probability p i 0.32 0.27 0.19 0.15 0.07 Find the mean state in words the meaning. Find the standard deviation start in words what this means. n Linear Transformations How does adding or subtracting a constant affect a random variable? Effect on a Random Variable of Adding (or Subtracting) a Constant Adding the same number a (which could be negative) to each value of a random variable: Adds a to measures of center and location (mean, median, quartiles, percentiles). Does not change measures of spread (range, IQR, standard deviation). Does not change the shape of the distribution. 2
n Linear Transformations Consider Pete s Jeep Tours again. We defined C as the amount of money Pete collects on a randomly selected day. Collected c i 300 450 600 750 900 Probability p i 0.15 0.25 0.35 0.20 0.05 Find the mean and standard deviation 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. Profit v i 200 350 500 650 800 Probability p i 0.15 0.25 0.35 0.20 0.05 Find the mean and standard deviation. Compare the shape, center, and spread of the two probability distributions. n Example: El Dorado Community College In addition to tuition charges, each full-time student is assessed student fees of $100 per semester. If C = overall cost for a randomly selected full-time student, C = 100 T Overall Cost $700 $750 $800 $850 $900 $950 $1000 Prob p i 0.25 0.10 0.05 0.30 0.10 0.05 0.15 Find the mean and standard deviation. Tuit. T $600 $650 $700 $750 $800 $850 $900 Prob p i 0.25 0.10 0.05 0.30 0.10 0.05 0.15 Find the mean and standard deviation. Compare the shape, center, and spread of the two probability distributions. 3
n CHECK YOUR UNDERSTANDING 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. The probability distribution is: Cars Sold 0 1 2 3 Prob p i 0.3 0.4 0.2 0.1 The random variable X has mean 1.1 and standard deviation is 0.943. 1) 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. 2) 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 the $75. Find the mean and standard deviation of T. n CHECK YOUR UNDERSTANDING 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. The probability distribution is: Cars Sold 0 1 2 3 Prob p i 0.3 0.4 0.2 0.1 The random variable X has mean 1.1 and standard deviation is 0.943. 1) 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. 2) 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 the $75. Find the mean and standard deviation of T. 4
n AP ERROR ALERT! When you are asked about the effect of a linear transformation on summary statistics, it is easy to forget that adding (subtracting) a constant to (from) every value in the distribution has no effect on measures of spread, including the standard deviation, variance, range, and IQR. n Linear Transformations Whether we are dealing with data or random variables, the effects of a linear transformation are the same. Effect on a Linear Transformation on the Mean and Standard Deviation If Y = a bx is a linear transformation of the random variable X, then The probability distribution of Y has the same shape as the probability distribution of X. µ Y = a bµ X. σ Y = b σ X (since b could be a negative number). 5
n Example: The Baby and the Bathwater 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 C and a standard deviation of 2 C. Define the random variable Y to be the water temperature in Fahrenheit (F = (9/5)C 32) when the dial is set to babysafe. Find the mean and standard deviation of Y. According to Babies R Us, the temperature of a baby s bathwater should be between 90 F and 100 F. Find the probability that the water temperature on a randomly-selected day when the babysafe setting is used meets the Babies R Us recommendations. n Example: Scaling a Test In a large introductory statistics class, the distribution of X = raw scores on a test was approximately Normally distributed with a mean of 17.2 and a standard deviation of 3.8. The professor decides to scale the scores by multiplying the raw scores by 4 and adding 10. Define the random variable Y to be scaled score of a randomly-selected student from the class. Find the mean and standard deviation of Y. What is the probability that a randomly-selected student has a scaled score of at least 90? 6
n Example: Cereal A company s cereal boxes advertise 9.63 ounces of cereal. In fact, the amount of cereal X in a randomly-selected box follows a Normal distribution with a mean of 9.70 ounces and a standard deviation of 0.03 ounces. Define the random variable Y to be the excess amount of cereal beyond what s advertised in a randomly-selected box, measured in grams (1oz = 28.35g). Find the mean and standard deviation of Y. What is the probability that a randomly-selected box at least 3 grams more cereal than advertised? n Combining Random Variables If we buy a large drink at a fast-food restaurant and grab a largesized lid, we assume that the lid will fit snugly on the cup. Usually, it does. Sometimes, though, the lid is a bit too small or too large to fit securely. Why does this happen? Even though the large cups are made to be identical in size, the width actually varies slightly from cup to cup. In fact, the diameter of a randomly-selected large drink cup is a random variable (C) that has a particular probability distribution. Likewise, the diameter of a randomly-selected large lid (L) is a random variable with its own probability distribution. For a lid to fit on a cup, the value of L has to be bigger than the value of C, but not too much bigger. To find the probability that the lid fits, we need to know more about what happens when we combine these two random variables. 7
n Combining Random Variables So far, we have looked at settings that involve a single random variable. 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. Define T = X Y. What are the mean and variance of T? Passengers x i 2 3 4 5 6 Probability p i 0.15 0.25 0.35 0.20 0.05 Mean µ X = 3.75 Standard Deviation σ X = 1.090 Passengers y i 2 3 4 5 Probability p i 0.3 0.4 0.2 0.1 Mean µ Y = 3.10 Standard Deviation σ Y = 0.943 n Combining Random Variables How many total passengers can Pete and Erin expect on a randomly selected day? 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: Mean of the Sum of Random Variables For any two random variables X and Y, if T = X Y, then the expected value of T is E(T) = µ T = µ X µ Y In general, the mean of the sum of several random variables is the sum of their means and the range is the sum of all ranges. 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? To determine this, we need to find the probability distribution of T. 8
n Combining Random Variables The only way to determine the probability for any value of T is if X and Y are independent random variables. Definition: 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. n Combining Random Variables Let T = X Y. Consider all possible combinations of the values of X and Y. Recall: µ T = µ X µ Y = 6.85 σ T 2 = (t i µ T ) 2 p i = (4 6.85) 2 (0.045) (11 6.85) 2 (0.005) = 2.0775 Note: σ X 2 =1.1875 and σ Y 2 = 0.89 What do you notice about the variance of T? 9
n Combining Random Variables As the preceding example illustrates, when we add two independent random variables, their variances add. Standard deviations do not add. Variance of the Sum of Random Variables For any two independent random variables X and Y, if T = X Y, then the variance of T is σ T 2 = σ X 2 σ Y 2 Is that the Pythagorean Theorem I see? Why, In general, the variance of the sum of several independent random yes variables it is! is the sum of their variances. Remember that you can add variances only if the two random variables are independent, and that you can NEVER add standard deviations! n Example: El Dorado Community College EDCC also has a campus downtown, specializing in just a few fields of study. Full-time students at the downtown campus take only 3-credit classes. Let Y = the number of credits taken in the fall semester by a randomly-selected full-time student at the downtown campus. Here is the probability distribution: Number of Credits (Y) 12 15 18 Probability 0.3 0.4 0.3 Mean µ X = 15 credits; Variance σ 2 X = 5.4 credits; Standard Deviation σ X = 2.3 credits If you were to randomly select one full-time student from the main campus and one full-time student from the downtown campus and add their number of units, the expected value of the sum (S = X Y) would be µ S = µ X µ Y = 14.65 15 = 29.65. 10
n Example: El Dorado Community College Here are all possible combinations of X and Y: n Example: Tuition, Fees, & Books Let B = the amount spent on books in the fall semester for a randomly-selected full-time student at EDCC. Suppose that µ B = 153 and σ B = 32. Recall that C = overall cost for tuition and fees for a randomly-selected full-time student at EDCC and that µ C = $832.50 and σ C = $103. Find the mean and standard deviation of the cost of tuition, fees, & books (C B) for a randomly-selected full-time student at EDCC. 11
n Example: SAT Scores & the Role of Independence 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: Mean SAT Math Score X 519 115 SAT CR Score Y 507 111 Standard Deviation What are the mean and standard deviation of the total score Math & CR among students applying to this college? n CHECK YOUR UNDERSTANDING 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: Cars sold x i 0 1 2 3 Prob. p i 0.3 0.4 0.2 0.1 µ x = 1.1 σ x = 0.943 Cars leased y i 0 1 2 Prob. p i 0.4 0.5 0.1 µ y = 0.7 σ y = 0.64 Define T = X Y 1) 1) Find and interpret µ T.. 2) 2) Compute σ T assuming that X and Y are independent. 3) 3) The dealer s manager receives a $500 bonus for for each car sold and a $300 bonus for for each car leased. Find the µ & σ for for the total bonus. 12
n Combining Random Variables 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: Mean of the Difference of Random Variables For any two random variables X and Y, if D = X - Y, then the expected value of D is E(D) = µ D = µ X - µ Y In general, the mean of the difference of several random variables is the difference of their means. The order of subtraction is important! Variance of the Difference of Random Variables For any two independent random variables X and Y, if D = X - Y, then the variance of D is σ D 2 = σ X 2 σ Y 2 In general, the variance of the difference of two independent random variables is the sum of their variances. n Example: Pete s Jeep Tours & Erin s Adventures We have defined several random variables related to Pete s and Erin s tour businesses. For a randomly-selected day: X = number of passengers on Pete s trip; C = money Pete collects µ x = 3.75 σ x = 1.090 µ C = 562.50 σ C = 163.50 Y = number of passengers on Erin s trip; G = money Erin collects µ Y = 3.10 σ Y = 0.943 µ G = 542.50 σ G = 165.03 Calculate the mean and standard deviation of the difference D = C G in the amounts that Pete & Erin collect on a randomly-chosen day. Interpret each value in context. 13
n Example: El Dorado Community College Suppose we randomly select one full-time student from each of the two campuses. What are the mean and standard deviation of the difference in tuition charges? T = average tuition at downtown campus: mean = 732.50; stdev = 102.8 U = average tuition at main campus: mean = 825; stdev = 126.50 n CHECK YOUR UNDERSTANDING 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 distribution of X and Y are as follows. Cars sold x i 0 1 2 3 Prob. p i 0.3 0.4 0.2 0.1 µ x = 1.1 σ x = 0.943 Cars leased y i 0 1 2 Prob. p i 0.4 0.5 0.1 µ y = 0.7 σ y = 0.64 Define D = X Y. Find and interpret the mean and standard deviation. The dealer s manager receives a $500 bonus for each car sold and a $300 bonus for each car leased. Find the µ & σ for the total bonus. 14
n Combining Normal Random Variables So far, we have concentrated on finding rules for means and variances of random variables. If a random variable is Normally distributed, we can use its mean and standard deviation to compute probabilities. An important fact about Normal random variables is that any sum or difference of independent Normal random variables is also Normally distributed. Example Mr. Boyd likes between 8.5 and 9 grams of sugar in his coffee. 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. Boyd selects 4 packets at random, what is the probability his tea will taste right? µ T = µ X1 µ X2 µ X3 µ X4 = 2.17 2.17 2.17 2.17 = 8.68 σ 2 2 T = σ X1 2 σ X 2 2 σ X 3 σ T = 0.0256 = 0.16 2 σ X 4 = (0.08) 2 (0.08) 2 (0.08) 2 (0.08) 2 = 0.0256 n Example: Apples Suppose that a certain variety of apples have weights that are approximately Normally distributed with a mean of 9 ounces and a standard deviation of 1.5oz. If bags of apples are filled by randomly selecting 12 apples, what is the probability that the sum of the weights of the 12 apples is less than 100 ounces? What is the probability that a random sample of 12 apples has a total weight less than 100 ounces? 15
n Example: Put a Lid on It! 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. What is the probability that a randomly-selected large lid will fit on a randomly chosen large drink cup? Section 6.2 Summary In this section, we learned that ü Adding a constant a (which could be negative) to a random variable increases (or decreases) the mean of the random variable by a but does not affect its standard deviation or the shape of its probability distribution. ü Multiplying a random variable by a constant b (which could be negative) multiplies the mean of the random variable by b and the standard deviation by b but does not change the shape of its probability distribution. ü A linear transformation of a random variable involves adding a constant a, multiplying by a constant b, or both. If we write the linear transformation of X in the form Y = a bx, the following about are true about Y: ü Shape: same as the probability distribution of X. ü Center: µ Y = a bµ X ü Spread: σ Y = b σ X 16
Section 6.2 Summary In this section, we learned that ü If X and Y are any two random variables, µ X ±Y = µ X ± µ Y ü If X and Y are independent random variables 2 σ X ±Y = σ X 2 σ Y 2 ü The sum or difference of independent Normal random variables follows a Normal distribution. 17