Chapter 16 Random Variables Streamlining Probability Probability Distribution
Chapter 16 Random Variables Streamlining Probability: Probability Distribution, Expected Value and Standard Deviation of Random Variable
Graphically and Numerically Summarize a Random Experiment z. Principal vehicle by which we do this: random variables z. A random variable assigns a number to each outcome of an experiment
Random Variables z. Definition: A random variable is a numerical-valued variable whose value is based on the outcome of a random event. Denoted by upper-case letters X, Y, etc. When the number of possible values of X is finite (number of heads in 3 tosses of a coin) or countably infinite (number of tosses until you get 3 heads in a row), the random variable is discrete. (Will study continuous rv’s later).
Examples: Discrete rv’s 1. X = # of games played in a randomly selected World Series Possible values of X are x=4, 5, 6, 7 2. Y=score on 13 th hole (par 5) at Augusta National golf course for a randomly selected golfer on day 1 of 2015 Masters y=3, 4, 5, 6, 7
Examples: Discrete rv’s z. Number of girls in a 5 child family z. Number of customers that use an ATM in a 1 -hour period. z. Number of tosses of a fair coin that is required until you get 3 heads in a row (note that this discrete random variable has a countably infinite number of possible values: x=3, 4, 5, 6, 7, . . . )
Data Variables and Data Distributions Data variables are known outcomes.
Data Variables and Data Distributons Data variables are known outcomes. Data distributions tell us what happened. Handout 2. 1, P. 10
Random Variables and Probability Distributions Random variables are unknown chance outcomes. Probability distributions tell us what is likely to happen. Data variables are known outcomes. Data distributions tell us what happened.
Notation Economic Scenario Profit X ($ Millions) Probability Great x 1 10 0. 20 Good x 2 5 0. 40 OK x 3 1 0. 25 Lousy x 4 -4 0. 15 X = the random variable (profits) xi = outcome i x 1 = 10 x 2 = 5 x 3 = 1 x 4 = -4
Notation Economic Scenario Profit X ($ Millions) Probability Great x 1 10 Pr(X=x 1) 0. 20 Good x 2 5 Pr(X=x 2) 0. 40 OK x 3 1 Pr(X=x 3) 0. 25 Lousy Pr(X=x 4) 0. 15 x 4 -4 P is the probability p(xi)= Pr(X = xi) is the probability of X being outcome xi p(x 1) = Pr(X = 10) =. 20 p(x 2) = Pr(X = 5) =. 40 p(x 3) = Pr(X = 1) =. 25 p(x 4) = Pr(X = -4) =. 15
Economic Scenario Probability Histogram Probability. 40. 35. 30. 25. 20. 15 Lousy Profit X ($ Millions) Great x 1 10 p(x 1) 0. 20 Good x 2 5 p(x 2) 0. 40 OK x 3 1 p(x 3) 0. 25 Lousy x 4 -4 p(x 4) 0. 15 Good OK Great . 10. 05 -4 -2 0 2 Probability P 4 Profit 6 8 10 12
Probability Distribution Of Number of Games Played in Randomly Selected World Series z. Estimate based on results from 1946 to 2014. x 4 5 6 7 p(x) 12/65=0. 185 14/65=0. 215 27/65=0. 415 Probability Histogram Number of Games in Randomly Selected World Series 0, 45 0, 4 0, 35 0, 3 0, 25 0, 2 0, 15 0, 1 0, 05 0 0, 415 0, 185 4 5 0, 215 6 7
Probability distributions: requirements z Notation: p(x)= Pr(X = x) is the probability that the random variable X has value x z Requirements 1. 0 p(x) 1 for all values x of X 2. all x p(x) = 1
Expected Value of a Discrete Random Variable A measure of the “middle” of the values of a random variable
Mean or Expected Value k = the number of outcomes µ = x 1·p(x 1) + x 2·p(x 2) + x 3·p(x 3) +. . . + xk·p(xk) Weighted mean Each outcome is weighted by its probability
Other Weighted Means 1. Stock Market: The Dow Jones Industrial Average y. The “Dow” consists of 30 companies (the 30 companies in the “Dow” change periodically) y. To compute the Dow Jones Industrial Average, a weight proportional to the company’s “size” is assigned to each company’s stock price 2. GPA A=4, B=3, C=2, D=1, F=0
Economic Scenario Mean Profit X ($ Millions) Probability P Great x 1 10 P(X=x 1) 0. 20 Good x 2 5 P(X=x 2) 0. 40 OK x 3 1 P(X=x 3) 0. 25 Lousy x 4 -4 P(X=x 4) 0. 15 k = the number of outcomes (k=4) µ = x 1·p(x 1) + x 2·p(x 2) + x 3·p(x 3) +. . . + xk·p(xk) EXAMPLE µ = 10*. 20 + 5*. 40 + 1*. 25 – 4*. 15 = 3. 65 ($ mil)
Mean µ=3. 65 k = the number of outcomes (k=4) µ = x 1·p(x 1) + x 2·p(x 2) + x 3·p(x 3) +. . . + xk·p(xk) EXAMPLE µ = 10·. 20 + 5·. 40 + 1·. 25 - 4·. 15 = 3. 65 ($ mil)
Interpretation z. E(x) is not the value of the random variable x that you “expect” to observe if you perform the experiment once
Interpretation z. E(x) is a “long run” average; if you perform the experiment many times and observe the random variable x each time, then the average x of these observed xvalues will get closer to E(x) as you observe more and more values of the random variable x.
Example: Green Mountain Lottery z. State of Vermont zchoose 3 digits from 0 through 9; repeats allowed zwin $500 x $0 $500 p(x). 999. 001 E(x)=$0(. 999) + $500(. 001) = $. 50
Example (cont. ) z. E(x)=$. 50 z. On average, each ticket wins $. 50. z. Important for Vermont to know z. E(x) is not necessarily a possible value of the random variable (values of x are $0 and $500)
Example (cont. ) z. So the probability distribution of x is: x p(x) 0 1/8 1 3/8 2 3/8 3 1/8
z So the probability distribution of X is: Example x p(x) 0 1/8 1 3/8 2 3/8 3 1/8 z. Let X = number of heads in 3 tosses of a fair coin.
US Roulette Wheel and Table z The roulette wheel has alternating black and red slots numbered 1 through 36. z There also 2 green slots numbered 0 and 00. z A bet on any one of the 38 numbers (1 -36, 0, or 00) pays odds of 35: 1; that is. . . z If you bet $1 on the winning number, you receive $36, so your winnings are $35 American Roulette 0 - 00 (The European version has only one 0. )
US Roulette Wheel: Expected Value of a $1 bet on a single number z Let x be your winnings resulting from a $1 bet on a single number; x has 2 possible values x p(x) -1 37/38 35 1/38 z E(x)= -1(37/38)+35(1/38)= -. 05 z So on average the house wins 5 cents on every such bet. A “fair” game would have E(x)=0. z The roulette wheels are spinning 24/7, winning big $$ for the house, resulting in …
Summarizing data and probability Data z Histogram z measure of the center: sample mean x z measure of spread: sample standard deviation s Random variable z Probability Histogram z measure of the center: population mean m measure of spread: population standard deviation s
Standard Deviation of a Discrete Random Variable Measures how “spread out” the random variable is
Variation The deviations of the individual x ‘s from the mean (expected value) of their probability distribution: xi - µ Var(X)= 2 (sigma squared) is the variance of the probability distribution
Variation Variance of discrete random variable X
Economic Scenario Variation Profit X ($ Millions) Probability P Great x 1 10 P(X=x 1) 0. 20 Good x 2 5 P(X=x 2) 0. 40 OK x 3 1 P(X=x 3) 0. 25 Lousy x 4 -4 P(X=x 4) 0. 15 Example 3. 65 2 = (x 1 -µ)2 · P(X=x 1) + (x 2 -µ)2 · P(X=x 2) + 3. 65 (x 3 -µ)2 · P(X=x 3) + (x 4 -µ)2 · P(X=x 4) = (10 -3. 65)2 · 0. 20 + (5 -3. 65)2 · 0. 40 + (1 -3. 65)2 · 0. 25 + (-4 -3. 65)2 · 0. 15 = 19. 3275 P. 207, Handout 4. 1, P. 4
Standard Deviation: of More Interest then the Variance
Standard Deviation 2 = 19. 3275 , or SD, is the standard deviation of the probability distribution
Finance and Investment Interpretation z. X = return on an investment (stock, portfolio, etc. ) z. E(x) = m = expected return on this investment zs is a measure of the risk of the investment
Example A basketball player shoots 3 free throws. P(make) =P(miss)=0. 5. Let X = number of free throws made.
Expected Value of a Random Variable Example: The probability model for a particular life insurance policy is shown. Find the expected annual payout on a policy. We expect that the insurance company will pay out $200 per policy per year. 37 © 2010 Pearson Education
Standard Deviation of a Random Variable Example: The probability model for a particular life insurance policy is shown. Find the standard deviation of the annual payout. 38 © 2010 Pearson Education
68 -95 -99. 7 Rule for Random Variables For random variables x whose probability histograms are approximately moundshaped: z. P(m - x m + ) . 68 z. P(m - 2 x m + 2 ) . 95 z. P(m -3 x m + 3 ) . 997
(m - 1 , m + 1 ) (50 -5, 50+5) (45, 55) P(m - X m + ) = P(45 X 55) =. 048+. 057+. 066+. 073+. 078+. 073+. 066+. 057+. 048=. 724
Rules for E(X), Var(X) and SD(X): adding a constant a z If X is a rv and a is z Example: a = -1 a constant: Ø E(X+a) = E(X)+a Ø E(X+a)=E(X-1)=E(X)-1
Rules for E(X), Var(X) and SD(X): adding constant a (cont. ) z Var(X+a) = Var(X) SD(X+a) = SD(X) z Example: a = -1 Ø Var(X+a)=Var(X-1)=Var(X) Ø SD(X+a)=SD(X-1)=SD(X)
Economic Profit X Scenario ($ Millions) Probability P Economic Profit X+2 Scenario ($ Millions) Probability P Great x 1 10 P(X=x 1) 0. 20 Great x 1+2 10+2 P(X=x 1) 0. 20 Good x 2 5 P(X=x 2) 0. 40 Good x 2+2 5+2 P(X=x 2) 0. 40 OK x 3 1 P(X=x 3) 0. 25 OK x 3+2 1+2 P(X=x 3) 0. 25 Lousy x 4 -4 P(X=x 4) 0. 15 Lousy x 4+2 -4+2 P(X=x 4) 0. 15 E(x + a) = E(x) + a; SD(x + a)=SD(x); let a = 2 = 4. 40 m=3. 65 = 4. 40 m=5. 65
New Expected Value Long (UNC-CH) way: E(x+2)=12(. 20)+7(. 40)+3(. 25)+(-2)(. 15) = 5. 65 Smart (NCSU) way: a=2; E(x+2) =E(x) + 2 = 3. 65 + 2 = 5. 65
New Variance and SD Long (UNC-CH) way: (compute from “scratch”) Var(X+2)=(12 -5. 65)2(0. 20)+… +(-2+5. 65)2(0. 15) = 19. 3275 SD(X+2) = √ 19. 3275 = 4. 40 Smart (NCSU) way: Var(X+2) = Var(X) = 19. 3275 SD(X+2) = SD(X) = 4. 40
Rules for E(X), Var(X) and SD(X): multiplying by constant b z E(b. X)=b E(X) z Var(b X) = b 2 Var(X) z SD(b. X)= |b|SD(X) z Example: b =-1 Ø E(b. X)=E(-X)=-E(X) Ø Var(b. X)=Var(-1 X)= =(-1)2 Var(X)=Var(X) Ø SD(b. X)=SD(-1 X)= =|-1|SD(X)=SD(X)
Expected Value and SD of Linear Transformation a + bx Let X=number of repairs a new computer needs each year. Suppose E(X)= 0. 20 and SD(X)=0. 55 The service contract for the computer offers unlimited repairs for $100 per year plus a $25 service charge for each repair. What are the mean and standard deviation of the yearly cost of the service contract? Cost = $100 + $25 X E(cost) = E($100+$25 X)=$100+$25 E(X)=$100+$25*0. 20= = $100+$5=$105 SD(cost)=SD($100+$25 X)=SD($25 X)=$25*SD(X)=$25*0. 55= =$13. 75
Addition and Subtraction Rules for Random Variables z E(X+Y) = E(X) + E(Y); z E(X-Y) = E(X) - E(Y) z When X and Y are independent random variables: 1. Var(X+Y)=Var(X)+Var(Y) 2. SD(X+Y)= SD’s do not add: SD(X+Y)≠ SD(X)+SD(Y) 3. Var(X−Y)=Var(X)+Var(Y) 4. SD(X −Y)= SD’s do not subtract: SD(X−Y)≠ SD(X)−SD(Y) SD(X−Y)≠ SD(X)+SD(Y)
Motivation for Var(X-Y)=Var(X)+Var(Y) Ø Let X=amount automatic dispensing machine puts into your 16 oz drink (say at Mc. D’s) Ø A thirsty, broke friend shows up. Let Y=amount you pour into friend’s 8 oz cup Ø Let Z = amount left in your cup; Z = ? Ø Z = X-Y Has 2 + components Var(Y) Ø Var(Z) = Var(X-Y) = Var(X)
Example: rv’s NOT independent z X=number of hours a randomly selected student from our class slept between 9 am yesterday and 9 am today. z Y=number of hours a randomly selected student from our class was awake between 9 am yesterday and 9 am today. Y = 24 – X. z What are the expected value and variance of the total hours that a student is asleep and awake between 9 am yesterday and 9 am today? z Total hours that a student is asleep and awake between 9 am yesterday and 9 am today = X+Y z E(X+Y) = E(X+24 -X) = E(24) = 24 z Var(X+Y) = Var(X+24 -X) = Var(24) = 0. z We don't add Var(X) and Var(Y) since X and Y are not independent.
Pythagorean Theorem of Statistics for Independent X and Y a 2 + b 2 = c 2 Var(X)+Var(Y)=Var(X+Y ) c 2=a 2+b 2 Var(X) a 2 Var(X+Y) a c SD(X+Y) SD(X) b SD(Y) b 2 Var(Y) a+b≠c SD(X)+SD(Y) ≠SD(X+Y)
Pythagorean Theorem of Statistics for Independent X and Y 32 + 42 = 52 Var(X)+Var(Y)=Var(X+Y ) 25=9+16 Var(X) 9 Var(X+Y) 3 5 SD(X+Y) SD(X) 4 SD(Y) 16 Var(Y) 3+4≠ 5 SD(X)+SD(Y) ≠SD(X+Y)
Example: meal plans z. Regular plan: X = daily amount spent z. E(X) = $13. 50, SD(X) = $7 z. Expected value and stan. dev. of total spent in 2 consecutive days? z. E(X +X )=E(X )+E(X )=$13. 50+$13. 50=$27 1 2 SD(X + X ) ≠ SD(X )+SD(X ) = $7+$7=$14 1 2
Example: meal plans (cont. ) z. Jumbo plan for football players Y=daily amount spent z. E(Y) = $24. 75, SD(Y) = $9. 50 z. Amount by which football player’s spending exceeds regular student spending is Y-X z. E(Y-X)=E(Y)–E(X)=$24. 75 -$13. 50=$11. 25 SD(Y X) ≠ SD(Y) SD(X) = $9. 50 $7=$2. 50
For random variables, X+X≠ 2 X z Let X be the annual payout on a life insurance policy. From mortality tables E(X)=$200 and SD(X)=$3, 867. 1) If the payout amounts are doubled, what are the new expected value and standard deviation? The risk to the Ø Double payout is 2 X. E(2 X)=2 E(X)=2*$200=$400 insurance co. when Ø SD(2 X)=2 SD(X)=2*$3, 867=$7, 734 doubling the payout is not. The the same 2) Suppose insurance policies are sold to 2 (2 X) people. as 2 thepeople risk when annual payouts are X 1 and X 2. Assume the selling policies behave independently. What are the expected value to 2 people. and standard deviation of the total payout? Ø E(X 1 + X 2)=E(X 1) + E(X 2) = $200 + $200 = $400
- Slides: 56