The Practice of Statistics Third Edition Chapter 7: Random Variables Copyright © 2008 by W. H. Freeman & Company Daniel S. Yates
Discrete random variables –Number of sales –Number of calls –Shares of stock –People in line –Mistakes per page Continuous random variables –Length –Depth –Volume –Time –Weight
Probability Histogram can be used to display the probability distribution of a discrete random variable. Probability distribution of digits in table of random digits
6 Probability distribution of the random variable X, the number of siblings of a randomly selected student Probability histogram for the random variable X, the number of siblings of a randomly selected student
Probability Distribution of Grades 0 = F 1 = D 2 = C 3 = B 4 = A
Ex. What is the probability distribution of the discrete random variable X, that is the sum of a pair of dice. X can take on values {2,3,4,5,6,7,8,9,10,11,12} P(X=2) = 1/36 = P(X=8) = 5/36 = P(X=3) = 2/36 = P(X=9) = 4/36 = P(X=4) = 3/36 = P(X=10) = 3/36 = P(X=5) = 4/36 = P(X=11) = 2/36 = P(X=6) = 5/36 = P(X=12) = 1/36 = P(X=7) = 6/36 = 0.167
Ex. Probability density curve
Probability Density Curves Any individual value has zero probability Only intervals between numbers have probability Therefore, P(X>a) and P(X>a) are equal Area under probability density curve equals 1 The normal distribution is a probability density curve Ex.
7.2 Means and Variances of random variables aka. Expected value
Example Find the mean (expected) size of an American household Inhabitants Proportion of households x = (1)(0.25) + (2)(0.32) + (3)(0.17) + (4)(0.15) + (5)(0.07) +(6)(0.03) + (7)(0.01) = 2.6
Example In a roulette wheel in a U.S. casino, a $1 bet on “even” wins $1 if the ball falls on an even number (same for “odd,” or “red,” or “black”). The odds of winning this bet are 47.37% On average, bettors lose about a nickel for each dollar they put down on a bet like this. (These are the best bets for patrons.)
More About Means and Variances Adding or subtracting a constant from data shifts the mean but doesn’t change the variance or standard deviation: (x ± c) = (x) ± c (X ± c) = (X) –Example: Consider everyone in a company receiving a $5000 increase in salary.
More About Means and Variances (cont.) In general, multiplying each value of a random variable by a constant multiplies the mean by that constant and the variance by the square of the constant: (ax) = a (x) (ax) = a 2 (x) –Example: Consider everyone in a company receiving a 10% increase in salary.
More About Means and Variances (cont.) In general, –The mean of the sum of two random variables is the sum of the means. –The mean of the difference of two random variables is the difference of the means. (x ± y) = (x) ± (y) –If the random variables are independent, the variance of their sum or difference is always the sum of the variances. (x ± y) = (x) + (y)
Example Linda is a sales associate at a large auto dealership. She estimates her car sales as follows: Cars Sold0123 Probability Calculate the mean ( x ), variance ( and standard deviation ( X is the number of cars sold xixi pipi xipixipi (x i - x p i (0-1.1) 2 (0.3) = (1-1.1) 2 (0.4) = (2-1.1) 2 (0.2) = (3-1.1) 2 (0.1) = x = 1.1 2 x = x = 0.943
Linda also sells trucks and SUVs. Following is her estimate of how many trucks and SUVs she will sell: Trucks and SUVs sold 012 Probability Let Y be the number of trucks and SUVs she sells. y = (0)(0.4) + (1)(0.5) + (2)(0.1) = 0.7 Trucks and SUVs If she earns $350 for each car sold and $400 for each truck or SUV. What are her expected earnings? Let Z be her earnings; Z = 350X + 400Y z = 350 x y = (350)(1.1) + (400)(0.7) = $665
What is the standard deviation of her earnings? Trucks and SUVs sold 012 Probability (y i - y p i (0-0.7) 2 (0.4) = (1-0.7) 2 (0.5) = (2-0.7) 2 (0.1) = y = 0.41