Top Banner
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison- Wesley Chapter 16 Random Variables
29

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Apr 02, 2015

Download

Documents

Anika Tillerson
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Chapter 16Random Variables

Page 2: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 16- 2

Expected Value: Center

A random variable assumes a value based on the outcome of a random event. We use a capital letter, like X, to denote a

random variable. A particular value of a random variable will be

denoted with a lower case letter, in this case x.

Page 3: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 16- 3

Expected Value: Center (cont.)

There are two types of random variables: Discrete random variables can take one of a

finite number of distinct outcomes. Example: Number of credit hours

Continuous random variables can take any numeric value within a range of values.

Example: Cost of books this term

Page 4: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 16- 4

Expected Value: Center (cont.)

A probability model for a random variable consists of: The collection of all possible values of a

random variable, and the probabilities that the values occur.

Of particular interest is the value we expect a random variable to take on, notated μ (for population mean) or E(X) for expected value.

Page 5: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 16- 5

Expected Value: Center (cont.)

The expected value of a (discrete) random variable can be found by summing the products of each possible value by the probability that it occurs:

Note: Be sure that every possible outcome is included in the sum and verify that you have a valid probability model to start with.

E X x P X x

Page 6: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Expected Value – Example #1

An insurance company offers a “death and disability” policy that pays $10,000 when you die or $5000 if you are disabled. It charges a premium of only $50 a year for this benefit. Suppose the death rate is 1/1000 and another 2/1000 will be disabled. Is the company likely to make a profit selling such a plan? Come up with a probability model Find the expected value

Slide 16- 6

Page 7: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Policy Outcome x = payout probability

Death 10,000 1/1000

Disability 5,000 2/1000

Neither 0 997/1000

Expected Value for 1000 people:

10,000 for 1 person

5,0000 for 2 people

0 for 997 people = 20,000 payout or $20 per policy

So company has an average profit of $30 for every

policy

Slide 16- 7

Page 8: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Expected Value Example #2 One of the authors took his minivan in for repair. The

mechanic identified the problem as dirt in the control unit. He said that in about 75% of such cases, drawing down an recharging the coolant a couple of times cleans up the problem and costs $60. If it fails, then the control unit must be replaced at an additional cost of $100 for parts and $40 for labor. A) Define the random variable and construct a

probability model B) what is the expected value of the cost of the

repair? C) what does that mean in this context?

Slide 16- 8

Page 9: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Answer

Outcome x= cost probability

recharging $60 .75

works

Replace unit $200 .25 60(.75) + 200(.25) = $95 Car owners with this problem will spend an

average of $95 to get it fixed

Slide 16- 9

Page 10: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Back to the Insurance problem… No individual policy actually costs the company

$20 – most cost $0 Since we are dealing with random events, some

policyholders receive big payouts, others nothing

B/c insurance company must anticipate this variability, we need to know the standard deviation from the mean

Slide 16- 10

Page 11: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Remember standard deviation?

How far from the average To compute we took the deviation (difference)

from the mean and squared it – called variance Take the square root to get the standard deviation

Slide 16- 11

Page 12: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Finding Standard Deviation Example

Using the data from example #1, find the standard deviation

Slide 16- 12

Page 13: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Policy Outcome x = payout probability Deviation

Death 10,000 1/1000 (10000-20) = 9980

Disability 5,000 2/1000 (5000-20) = 4980

Neither 0 997/1000 (0-20) = -20

To Find the Variance:

Var(X) = 99802 (1/1000) + 49802 (2/1000) + (-20) 2 (997/1000) = 149,600

SD = Square Root 149,600 = $386.78

The insurance company can expect an average payout of $20

per policy, with a standard deviation of $386.78

So this means that although payout is small there is a big risk

(Spread) for an average profit of $30Slide 16- 13

Page 14: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 16- 14

First Center, Now Spread…

For data, we calculated the standard deviation by first computing the deviation from the mean and squaring it. We do that with random variables as well.

The variance for a random variable is:

The standard deviation for a random variable is:

22 Var X x P X x

SD X Var X

Page 15: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Practice

As the head of inventory for a computer company, you ship 2 computers to your client the day the order arrived. You find out that someone had restocked refurbished computers in with new computers. The shipped computers were selected randomly from 15 computers in stock, 4 of those were refurbished .

If your client gets 2 new computers, things are fine. If the client gets one refurbished computer, it will be sent back at your expense $100 and you can replace it. If both are refurbished, the client will cancel and you’ll lose $1000. What’s the expected value and standard deviation of your loss?

Slide 16- 15

Page 16: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

How do you find the Mean and Standard Deviation in Calculator?

Using the previous example: STAT – Edit - L1: enter values of variable

(0,100,1000) L2: enter probability model (.524,.419, .057) STAT CALC - 1: VarStats L1, L2 – enter X = mean σ = standard deviation

Slide 16- 16

Page 17: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 16- 17

More About Means and Variances

Adding or subtracting a constant from data shifts the mean but doesn’t change the variance or standard deviation:

E(X ± c) = E(X) ± c Var(X ± c) = Var(X)

Example: Consider everyone in a company receiving a $5000 increase in salary.

Page 18: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 16- 18

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:

E(aX) = aE(X) Var(aX) = a2Var(X)

Example: Consider everyone in a company receiving a 10% increase in salary.

Page 19: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 16- 19

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.E(X ± Y) = E(X) ± E(Y)

If the random variables are independent, the variance of their sum or difference is always the sum of the variances.

Var(X ± Y) = Var(X) + Var(Y)

Page 20: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Example #5

Suppose the time it takes a customer to get and pay for seats at the ticket window of a baseball park is a random variable with a mean of 100 seconds and a standard deviation of 50 seconds. When you get there, you find 2 people in line How long do you expect to wait for your turn to

get tickets? What’s the standard deviation of your wait time? What assumption did you make about the 2

customers in finding the standard deviation

Slide 16- 20

Page 21: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Answer

100 + 100 = 200 seconds = 70.7 seconds The times for the two customers are independent

Slide 16- 21

Page 22: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 16- 22

Continuous Random Variables

Random variables that can take on any value in a range of values are called continuous random variables.

Continuous random variables have means (expected values) and variances.

We won’t worry about how to calculate these means and variances in this course, but we can still work with models for continuous random variables when we’re given the parameters.

Page 23: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 16- 23

Continuous Random Variables (cont.)

Good news: nearly everything we’ve said about how discrete random variables behave is true of continuous random variables, as well.

When two independent continuous random variables have Normal models, so does their sum or difference.

This fact will let us apply our knowledge of Normal probabilities to questions about the sum or difference of independent random variables.

Page 24: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Example#6

The times required to pack a stereos can be described with a Normal model with a mean of 9 minutes and standard deviation of 1.5 minutes. The times for the boxing stage can also be modeled as Normal, with a mean of 6 minutes and standard deviation of 1 minute What is the probability that packing two

consecutive systems takes over 20 minutes What percentage of the stereo systems take

longer to pack than to box?

Slide 16- 24

Page 25: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 16- 25

What Can Go Wrong?

Probability models are still just models. Models can be useful, but they are not reality. Question probabilities as you would data, and

think about the assumptions behind your models.

If the model is wrong, so is everything else.

Page 26: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 16- 26

What Can Go Wrong? (cont.)

Don’t assume everything’s Normal. Watch out for variables that aren’t independent:

You can add expected values for any two random variables, but

you can only add variances of independent random variables.

Page 27: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 16- 27

What Can Go Wrong? (cont.)

Don’t forget: Variances of independent random variables add. Standard deviations don’t.

Don’t forget: Variances of independent random variables add, even when you’re looking at the difference between them.

Don’t forget: Don’t write independent instances of a random variable with notation that looks like they are the same variables.

Page 28: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 16- 28

What have we learned?

We know how to work with random variables. We can use a probability model for a discrete

random variable to find its expected value and standard deviation.

The mean of the sum or difference of two random variables, discrete or continuous, is just the sum or difference of their means.

And, for independent random variables, the variance of their sum or difference is always the sum of their variances.

Page 29: Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 16 Random Variables.

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 16- 29

What have we learned? (cont.)

Normal models are once again special. Sums or differences of Normally distributed

random variables also follow Normal models.