Upload
paula-chandler
View
239
Download
0
Tags:
Embed Size (px)
Citation preview
Chapter 16 Random Variables
Streamlining Probability:Probability Distribution, Expected Value and Standard Deviation of
Random Variable
Graphically and Numerically Summarize a Random
ExperimentPrincipal vehicle by which we do this:random variables
Random Variables
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.
Examples
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 13th hole (par 5) at Augusta National golf course for a randomly selected golfer on day 1 of 2011 Masters
y=3, 4, 5, 6, 7
Random Variables and Probability Distributions
Random variables areunknown chance outcomes.
Probability distributionstell us what is likely
to happen.
Data variables are
known outcomes.
Data distributions
tell us what happened.
A probability distribution lists the possible values of a random variable and the probability that each value will occur.
Probability Distribution Of Number of Games Played in Randomly Selected World Series
Estimate based on results from 1946 to 2010.
x 4 5 6 7
p(x) 12/65=0.185
12/65=0.185
14/65=0.215
27/65=0.415
Probability Histogram
4 5 6 70
0.1
0.2
0.3
0.4
0.185 0.1850.215
0.415
Number of Games in Randomly Selected World
Series
Probability Distribution Of Score on 13th hole (par 5) at Augusta National Golf Course on Day 1 of 2011 Masters
y 3 4 5 6 7
p(x) 0.040 0.414 0.465 0.051 0.030
3 4 5 6 70
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
0.5
0.04
0.414
0.465
0.0510.03
Score on 13th Hole
Probability Histogram
Probability distributions: requirements
Requirements1. 0 p(x) 1 for all values x of X
2. all x p(x) = 1
Expected Value of a Random Variable
A measure of the “middle” of the values of a random variable
The mean of the probability distribution is the expected value of X, denoted E(X)
E(X) is also denoted by the Greek letter µ (mu)
3 4 5 6 70
0.050.1
0.150.2
0.250.3
0.350.4
0.450.5
0.04
0.414
0.465
0.0510.03
Score on 13th Hole
4 5 6 70
0.1
0.2
0.3
0.4
0.5
0.185 0.185 0.215
0.415
Number of Games in Randomly Selected World
Series
k = the number of possible values of random variable
E(x)= µ = x1·p(x1) + x2·p(x2) + x3·p(x3) + ... + xk·p(xk)
Weighted mean
Mean orExpectedValue
k
i ii=1
( ) = x P(X=x )E x
x 4 5 6 7
p(x) 12/65=0.185
12/65=0.185
14/65=0.215
27/65=0.415
y 3 4 5 6 7
p(x) 0.040 0.414 0.465 0.051 0.030
k = the number of outcomes
µ = x1·p(x1) + x2·p(x2) + x3·p(x3) + ... + xk·p(xk)
Weighted meanEach outcome is weighted by its
probability
Mean orExpectedValue
Sample MeanSample Mean
n
n
1=ii
X
= X
nx
n
1 + ... +
3x
n
1 +
2x
n
1 +
1x
n
1 =
nn
x + ... + 3
x + 2
x + 1
x = X
k
i ii=1
( ) = x P(X=x )E x
Other Weighted Means
GPA A=4, B=3, C=2, D=1, F=0
Baseball slugging percentage SLG (hr=4, 3b=3, 2b=2, 1b=1)
Baseball ticket prices Football ticket prices
Five 3-hour courses: 2 A's (6 hrs), 1 B (3 hrs), 2 C's (6 hrs)
4 * 6 3*3 2 * 6 45GPA: 3.0
15 15
4* 3*3 2*2 1*1
Babe Ruth 1920 (80 yrs): 458 AB; 54 hr, 9 3B, 36 2B, 73 1B
4*54 9*3 36*2 73*1 388.847
458 458
hr B B BSLG
AB
SLG
E(X)= µ =4(0.185)+5(0.185)+6(0.215)+7(0.414)=5.86 games
E(Y)= µ=3(.04)+4(0.414)+5(0.465)+6(0.051)+7(0.03)
=4.617 strokes
Mean orExpectedValue
k
i ii=1
( ) = x P(X=x )E X
x 4 5 6 7
p(x) 12/65=0.185
12/65=0.185
14/65=0.215
27/65=0.415
y 3 4 5 6 7
p(x) 0.040 0.414 0.465 0.051 0.030
E(X)= µ =4(0.185)+5(0.185)+6(0.215)+7(0.414)
=5.86 games
Mean or Expected Value
µ=5.86
4 5 6 70
0.050.1
0.150.2
0.250.3
0.350.4
0.45
0.185 0.1850.215
0.415
Number of Games in Ran-domly Selected World Series
Interpretation
E(x) is not the value of the random variable x that you “expect” to observe if you perform the experiment once
Interpretation of E(X)
E(X) is a “long run” average.The expected value of a random
variable is equal to the average value of the random variable if the chance process was repeated an infinite number of times. In reality, if the chance process is continually repeated, x will get closer to E(x) as you observe more and more values of the random variable x.
Example: Green Mountain Lottery
State of Vermontchoose 3 digits from 0 through 9;
repeats allowedwin $500
x $0 $500p(x) .999 .001
E(x)=$0(.999) + $500(.001) = $.50
Example (cont.)
E(x)=$.50On average, each ticket wins $.50.Important for Vermont to knowE(x) is not necessarily a possible
value of the random variable (values of x are $0 and $500)
Expected Value, Surprise Onside Kicks
http://www.advancednflstats.com/ The change in expected points for the kicking team: successful 1.9; fail -1.4.
X=change in expected points for kicking team when attempting surprise onside kick
What values of p make surprise onside kicks a good strategy?
X 1.9 -1.4
p(x) p 1-p
Expected change should be greater than 0
(1.9) ( 1.4)(1 ) 0
3.3 1.4 0
3.3 1.4
0.424
p p
p
p
p
US Roulette Wheel and Table
The roulette wheel has alternating black and red slots numbered 1 through 36.
There are also 2 green slots numbered 0 and 00.
A bet on any one of the 38 numbers (1-36, 0, or 00) pays odds of 35:1; that is . . .
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
Let x be your winnings resulting from a $1 bet on a single number; x has 2 possible values
x -1 35p(x) 37/38 1/38
E(x)= -1(37/38)+35(1/38)= -.05So on average the house wins 5 cents on
every such bet. A “fair” game would have E(x)=0.
The roulette wheels are spinning 24/7, winning big $$ for the house, resulting in …
Standard Deviation of a Random Variable
First center (expected value)Now - spread
Standard Deviation of a Random Variable
Measures how “spread out” the random variable is
Summarizing data and probability
DataHistogrammeasure of the center: sample mean
xmeasure of spread:
sample standard deviation s
Random variableProbability Histogrammeasure of the center: population
mean mmeasure of spread: population
standard deviation s
Example
x 0 100p(x) 1/2 1/2
E(x) = 0(1/2) + 100(1/2) = 50
y 49 51p(y) 1/2 1/2
E(y) = 49(1/2) + 51(1/2) = 50
s =
(X X)
n - 1 =
1805.703
34 = 53.10892
i2
i=1
n
VarianceVariance
The deviations of the outcomes from the mean of the probability distribution xi - µ
2 (sigma squared) is the variance of the probability distribution
Variation
X - Xi
s =
(X X)
n - 1 =
1805.703
34 = 53.10892
i2
i=1
n
VarianceVariance
Variation
2 2
1
= ( ) ( = )=
x P X xi ii
k
Variance of random variable X
P. 207, Handout 4.1, P. 4
Example2 = (x1-µ)2 · P(X=x1) + (x2-µ)2 · P(X=x2) +
(x3-µ)2 · P(X=x3) + (x4-µ)2 · P(X=x4)
= (4-5.86)2 · 0.185 + (5-5.86)2 · 0.185 +
(6-5.86)2 · 0.215 + (7-5.86)2 · 0.415 = 1.3204
Variation
5.86 5.86
5.86
5.86
2 2
1
= ( ) ( = )=
x P X xi ii
k
x 4 5 6 7
p(x) 12/65=0.185
12/65=0.185
14/65=0.215
27/65=0.415
Standard Deviation: of More Interest then the Variance
variancepopulation theof
root square theisdeviation standard population The
Standard Deviation (s) =
Positive Square Root of the Variance
Standard DeviationStandard Deviation
s = s2
, or SD, is the standard deviation of the probability distribution
Standard Deviation
(or SD) = 1.3204 1.1491 games
2 = 1.3204
2 (or SD) =
© 2010 Pearson Education
33
Expected Value of a Random VariableExample: 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.
© 2010 Pearson Education
34
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.
68-95-99.7 Rule for Random Variables
For random variables x whose probability histograms are approximately mound-shaped:
P( - m s x + ) .68msP( - m s x + ) .95m sP( -3 m s x + 3 ) .997m s
( - 1 , + 1m s m s) (50-5, 50+5) (45, 55)P( - m s X + ) = ms P(45 X 55)=.048+.057+.066+.073+.078+.08+.078+.
073+ .066+.057+.048=.724
Rules for E(X), Var(X) and SD(X):adding a constant a
If X is a rv and a is a constant:
E(X+a) = E(X)+a
Example: a = -1
E(X+a)=E(X-1)=E(X)-1
Rules for E(X), Var(X) and SD(X): adding constant a (cont.)
Var(X+a) = Var(X)SD(X+a) = SD(X)
Example: a = -1
Var(X+a)=Var(X-1)=Var(X)
SD(X+a)=SD(X-1)=SD(X)
Carolina Panthers Next Season’s Profit
Probability
Great 0.20
Good 0.40
OK 0.25
Economy Profit X($ Millions)
5
1
-4Lousy 0.15
10
E(X)=10(0.20) + 5(0.40) + 1(0.25) – 4(0.15)
=3.65SD(X)=4.4
Probability
Great 0.20
Good 0.40
OK 0.25
EconomicScenario
Profit($ Millions)
5
1
-4Lousy 0.15
10
X
x1
x2
x3
x4
Probability
Great 0.20
Good 0.40
OK 0.25
EconomicScenario
Profit($ Millions)
5+2
1+2
-4+2Lousy 0.15
10+2
X+2
x1+2
x2+2
x3+2
x4+2
E(X + a) = E(X) + a; SD(X + a)=SD(X); let a = 2
Probability
0
0.1
0.2
0.3
0.4
0.5
-4 -2 0 2 4 6 8 10 12 14
Profit=m 5.65
= 4.40Probability
0
0.1
0.2
0.3
0.4
0.5
-4 -2 0 2 4 6 8 10 12 14
Profit=m 3.65
= 4.40
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 SDLong (UNC-CH) way: (compute from
“scratch”)Var(X+2)=(12-5.65)2(0.20)+…
+(-2+5.65)2(0.15) = 19.3275SD(X+2) = √19.3275 = 4.40
Smart (NCSU) way:Var(X+2) = Var(X) = 19.3275SD(X+2) = SD(X) = 4.40
Rules for E(X), Var(X) and SD(X): multiplying by constant b
E(bX)=bE(X)
Var(bX) = b2Var(X)
SD(bX)= |b|SD(X) |b| denotes the
absolute value of b
Example: b =-1 E(bX)=E(-X)=-E(X)
Var(bX)=Var(-1X)==(-1)2Var(X)=Var(X)
SD(bX)=SD(-1X)==|-1|SD(X)=SD(X)
Expected Value and SD of Linear Transformation a + bx
Let the random variable X= season field goal shooting percentage for an NBA team. Suppose E(X)= 45.31 and SD(X)=1.67
The relationship between X and points scored per game for an NBA team can be described by 14.49 + 1.85X.
What are the mean and standard deviation of the points scored per game?
Points per game (ppg) = 14.49 + 1.85XE(ppg) = E(14.49+1.85X)=14.49+1.85E(X)=14.49+1.85*45.31=
= 14.49+83.82=98.31SD(ppg)=SD(14.49+1.85X)=SD(1.85X)=1.85*SD(X)=1.85*1.67=
=3.09
Note that the shift of 14.49 does NOT affect the standard deviation.
Addition and Subtraction Rules for Random Variables
E(X+Y) = E(X) + E(Y); E(X-Y) = E(X) - E(Y)
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)
( ) ( )Var X Var Y
( ) ( )Var X Var Y
Motivation forVar(X-Y)=Var(X)+Var(Y)
Let X=amount automatic dispensing machine puts into your 16 oz drink (say at McD’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-YVar(Z) = Var(X-Y) =
Var(X) + Var(Y)Has 2 components
Example: rv’s NOT independent
X=number of hours a randomly selected student from our class slept between noon yesterday and noon today.
Y=number of hours the same randomly selected student from our class was awake between noon yesterday and noon today. Y = 24 – X.
What are the expected value and variance of the total hours that a student is asleep and awake between noon yesterday and noon today?
Total hours that a student is asleep and awake between noon yesterday and noon today = X+Y
E(X+Y) = E(X+24-X) = E(24) = 24 Var(X+Y) = Var(X+24-X) = Var(24) = 0. We don't add Var(X) and Var(Y) since X and Y are not
independent.
a2
b2
Pythagorean Theorem of Statistics for Independent X and Y
a
b
c
Var(X)
Var(Y)
Var(X+Y)
SD(X)
SD(Y)
SD(X+Y)
a + b ≠ cSD(X)+SD(Y) ≠SD(X+Y)
c2
a2+b2=c2
Var(X)+Var(Y)=Var(X+Y)
9
25=9+16
16
Pythagorean Theorem of Statistics for Independent X and Y
3
4
5
32 + 42 = 52
Var(X)
Var(Y)
Var(X+Y)
SD(X)
SD(Y)
SD(X+Y)
Var(X)+Var(Y)=Var(X+Y)
3 + 4 ≠ 5SD(X)+SD(Y) ≠SD(X+Y)
Example: meal plansRegular plan: X = daily amount spentE(X) = $13.50, SD(X) = $7Expected value and stan. dev. of total
spent in 2 consecutive days?E(X1+X2)=E(X1)+E(X2)=$13.50+
$13.50=$27
1 2 1 2 1 2
2 2 2 2 2
( ) ( ) ( ) ( )
($7) ($7) $ 49 $ 49 $ 98 $9.90
SD X X Var X X Var X Var X
SD(X1 + X2) ≠ SD(X1)+SD(X2) = $7+$7=$14
Example: meal plans (cont.)Jumbo plan for football players
Y=daily amount spentE(Y) = $24.75, SD(Y) = $9.50Amount by which football player’s
spending exceeds regular student spending is Y-X
E(Y-X)=E(Y)–E(X)=$24.75-$13.50=$11.25
2 2 2 2 2
( ) ( ) ( ) ( )
($9.50) ($7) $ 90.25 $ 49 $ 139.25 $11.80
SD Y X Var Y X Var Y Var X
SD(Y ; X) ≠ SD(Y) ; SD(X) = $9.50 ; $7=$2.50
For random variables, X+X≠2X 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?Double payout is 2X.
E(2X)=2E(X)=2*$200=$400SD(2X)=2SD(X)=2*$3,867=$7,734
2) Suppose insurance policies are sold to 2 people. The annual payouts are X1 and X2. Assume the 2 people behave independently. What are the expected value and standard deviation of the total payout?E(X1 + X2)=E(X1) + E(X2) = $200 + $200 =
$400
1 2 1 2 1 2
2 2
SD(X + X )= ( ) ( ) ( )
(3867) (3867) 14,953,689 14,953,689
29,907,378
Var X X Var X Var X
$5,468.76
The risk to the insurance co. when doubling the payout (2X) is not the same as the risk when selling policies to 2 people.