Chapter 16: Random Variables

Download Report

Transcript Chapter 16: Random Variables

Random
Variables
Application of Random
Variables
The Sum of the Variance

The sum of variance is a concept that is very
important. It has been the subject of many AP
questions and it is an idea that you should
understand. (NOTE: This is for independent
random variables only!)
 Looking
at Rules 2 and 3, is the following true?
Given that Var(X) = Var(Y), then is Var(X+Y) = Var(2X)?
 Surprisingly, the answer is NO!!!
 Rules that work in Algebra do not necessarily work
with random variables!!!
 Assume that Var(X) = 50 and Var(Y) = 50, then according
to our rules:
 Rule 2: Var(2X) = 22(50) = 4(50) = 200
 Rule 3: Var(X + Y) = (50) + (50) = 100
 It’s obvious that these are not the same!!!

The Sum of the Variance

What is going on here?! If the variances are the
same for each random variable, then why don’t
the rules match up?
 The
main reason is because the two random variable
are independent. Since the random variables are
independent, each one reduces the variability.

Consider the following example: You know that
you have a 40% chance of winning a game. The
game pays out $100 for every $1 that you bet.
You have $5. What is the best strategy to win?
Should you bet all $5 at once or should you play
5 games at $1 per game? Assume that each game
is independent.
The Sum of the Variance



It’s in your best interest to spread it out. Why?
Because there is less variance if you spread it out
or rather you have a lower chance of losing. If
you play 5 games you increase you chances of
winning at least one game.
 P(win one game) = .4
 P(win at least once out of 5 games) = .9222
If you play 5 games, you have a 92% chance of
winning at least once whereas if you played just
one game, you only have a 40% chance of
winning.
The Sum of the Variance


This concept is based on independence. With
independent random variables, we don’t expect
to lose all five games. Because we spread the
risk across five games, we should expect our
standard deviation and variance to be smaller.
This is the fundamental principle that insurance
companies, lotteries, and casinos use to make all
their money.
Example 1: Die

You wish to play a game with a die. If you roll a 1, 2, or
3, you get 0 points; if you roll 4 or 5, you get 5 points; and
if you roll a 6, you get 50 points. Find the expected value,
the standard deviation, and interpret you results.
Outcome
Points
P(X = x)
1, 2, 3
0
1/2
4, 5
5
1/3
6
50
1/6
E(X) = 0(1/2) + 5(1/3) +50(1/6) = 10
Var(X) = (0 – 10)2(1/2) + (5 – 10)2(1/3) + (50 – 10)2(1/6)
Var(X) = 325
SD(X) = Var( X )  325  18.03
Example 1: Die

You wish to play a game with a die. If you roll a 1, 2, or
3, you get 0 points; if you roll 4 or 5, you get 5 points; and
if you roll a 6, you get 50 points. Find the expected value,
the standard deviation, and interpret you results.
 So, what does E(X) = 10 and SD(X) = 18.03 mean?
 I expect to win 10 points per roll, on average, in the
long run. The standard deviation is 18.03 points,
suggesting a highly variable game.
Example 1: Die Variations

If you played the game twice, what would be your new
expected value and standard deviation?
 E(X + Y) = E(X) + E(Y) = 10 + 10 = 20
 Var(X + Y) = Var(X) + Var(Y) = 325 + 325 = 650
 SD(X + Y) = Var( X Y )  650  25.4951

If you doubled the points, what would be your new
expected value and standard deviation?
 E(2X) = 2E(X) = 2(10) = 20
 Var(2X) = a2Var(X) = 22(325) = 4(325) = 1300
 SD(2X) = Var(2 X )  1300  36.0555
Example 1: Die Variations

OK, one more variation of the die game. Let’s assume
that you and your friend are going to play this game.
Your total score will be the difference in your individual
scores (X – Y). Find the expected value and the standard
deviation.
Don’t forget!!!
 E(X – Y) = 10 – 10 = 0
Variances ADD!!!
 Var(X – Y) = 325 + 325 = 650
 SD(X – Y) = Var( X Y )  650  25.4951
Example 2: The Auto Dealer

Suppose a used car dealer runs autos through a
two-stage process to get them ready to sell. The
mechanical checkup costs $50 per hour and
takes an average of 90 minutes, with a standard
deviation of 15 minutes. The appearance prep
(wash, polish, etc.) costs $6 per hour and takes
an average of 60 minutes, with a standard
deviation of 5 minutes.
 What
are the mean and standard deviation of the
total time spent preparing a car? (Note that we cannot
find the standard deviation if we do not believe that
the two phases of the process are independent, an
important assumption to check.)
Example 2: The Auto Dealer





Let’s start by defining the what we are working
with: Let M = mechanical time, A = appearance
time, T = total time, where T = M + A
E(T) = E(M) + E(A) = 90 + 60 = 150 minutes.
Var(T) = Var(M) + Var(A) = 152 + 52 = 250
SD(T) = Var(T )  250  15.81
We expect the total preparation time to take an
average of 150 minutes (2.5 hours), with a
standard deviation of 15.8 minutes.
Example 2: The Auto Dealer


What are the mean and standard deviation of
the total expense to prepare a car?
We want to know the mean and standard
deviation of the total expense of preparing a car.
We can find mean and standard deviation of
expenses for each part of the preparation by
multiplying the mean and standard deviation of
the times by the rate of $50/hr for mechanical
time and $6/hr for appearance time. We believe
that the two phases of the process are
independent, so variances add.
Example 2: The Auto Dealer






Let M = mechanical hours E(M) = 1.5
SD(M) = 0.25
A = appearance hours E(A) = 1.0
SD(A) = 0.08
T = total expenses
T = 50M + 6A
E(T ) = E(50M + 6A) = E(50M) + E(6A)
= 50E(M) + 6E(A) = 50(1.5) + 6(1.0) = $81
Var(T ) = Var(50M + 6A) = Var(50M) +Var(6A)
= (502)Var(M) + (62)Var(A)
= 2500(.252) + 36(.082) = 156.48
SD(T ) = Var(T )  156.48  $12.51
We expect the total preparation expense to average $81,
with a standard deviation of $12.51.
Example 2: The Auto Dealer

What is the probability that it will take longer to
do the appearance prep than the mechanical
checkup? (Note that we cannot answer this
question unless we believe each phase of the
process can be described by a Normal model.)
Example 2: The Auto Dealer


We want to know the probability that it will take longer to
do the appearance prep than the mechanical checkup. In
order to calculate this, we need to know the mean and
standard deviation of the difference in time spent on each
type of preparation. Let D = M – A. Since we are
subtracting the amount of time for Appearance from the
time for Mechanical work, if the difference in prep times in
less than 0, that means the appearance prep took longer.
We believe that the two phases of the process are
independent, so variances add.
In order to calculate a probability, we will assume that
each of the processes varies according to a Normal model.
Therefore, the difference in times will vary Normally as
well.
Example 2: The Auto Dealer




E(D) = E(M − A) = E(M) − E(A) = 90 − 60 = 30minutes.
2
2
Var(D) = Var(M − A) = Var(M) + Var(A)  15  5  250
SD(D) = 250  15.8 minutes
The difference in prep times varies according to the
Normal model N(30, 15.8).

Remember that N(μ, σ) represents the normal curve with a mean
of μ and a standard deviation of σ
x   0  30
z

 1.899

15.8

Find normalcdf(-E99, -1.899, 0, 1) = 0.0288
Or use normalcdf(-E99, 0, 30, 15.8) = 0.0288
We expect the appearance prep to take more time than the
mechanical checkup about 2.88% of the time.


Assignment
Lesson:
Read:
Random Variables
Chapter 16
and Expected
Chapter 16
Value
Problems:
1 – 41 (odd)