Random Variables Application of Random Variables.

17

Click here to load reader

Transcript of Random Variables Application of Random Variables.

Page 1: Random Variables Application of Random Variables.

Random Random VariablesVariables

Application of Random Variables

Page 2: 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!!!Surprisingly, the answer is NO!!! Rules that work in Algebra do not Rules that work in Algebra do not

necessarily work with random variables!!!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!!!

Page 3: Random Variables Application of Random Variables.

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 What is the best strategy to win?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.

Page 4: Random Variables Application of Random Variables.

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) = .4P(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.

Page 5: Random Variables Application of Random Variables.

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.

Page 6: Random Variables Application of Random Variables.

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.

OutcomeOutcome PointsPoints P(X = x)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) = 10Var(X) = (0 – 10)2(1/2) + (5 – 10)2(1/3) + (50 – 10)2(1/6)Var(X) = 325SD(X) = 0318325 .)( XVar

Page 7: Random Variables Application of Random Variables.

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.

Page 8: Random Variables Application of Random Variables.

Example 1: Die Variations

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) = 05553613002 .)( XVar

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) = 495125650 .)( YXVar

Page 9: Random Variables Application of Random Variables.

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. E(X – Y) = 10 – 10 = 0 Var(X – Y) = 325 + 325 = 650 SD(X – Y) = 495125650 .)( YXVar

Don’t forget!!! Don’t forget!!! Variances Variances

ADD!!!ADD!!!

Page 10: Random Variables Application of Random Variables.

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.)

Page 11: Random Variables Application of Random Variables.

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) = We expect the total preparation time to take

an average of 150 minutes (2.5 hours), with a standard deviation of 15.8 minutes.

8115250 .)( TVar

Page 12: Random Variables Application of Random Variables.

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 so variances addvariances add.

Page 13: Random Variables Application of Random Variables.

Example 2: The Auto Dealer Let M M = mechanical hours= mechanical hours EE((MM) = 1.5) = 1.5 SDSD((MM) )

= 0.25= 0.25 A A = appearance hours= appearance hours EE((AA) = 1.0) = 1.0 SDSD((AA) ) = 0.08= 0.08 T T = total expenses= 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 ) = We expect the total preparation expense to average

$81, with a standard deviation of $12.51.

511248156 .$.)( TVar

Page 14: Random Variables Application of Random Variables.

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.)

Page 15: Random Variables Application of Random Variables.

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.

Page 16: Random Variables Application of Random Variables.

Example 2: The Auto Dealer EE((DD) = ) = EE((M M − − AA) = ) = EE((MM) − ) − EE((AA) = 90 − 60 = ) = 90 − 60 =

30minutes.30minutes. Var(D) = Var(M − A) = Var(M) + Var(A)Var(D) = Var(M − A) = Var(M) + Var(A) SDSD((DD) =) = The difference in prep times varies according to the

Normal model N(30, 15.8). Remember that N(N(μμ, , σσ)) represents the normal curve with

a mean of μμ and a standard deviation of σσ

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.

250515 22 minutes 815250 .

8991815

300.

.

x

z

Page 17: Random Variables Application of Random Variables.

Assignment

Chapter 16

Lesson:Random Variables

and Expected Value

Read:Chapter

16

Problems:1 – 41 (odd)