Download File

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

History of statistics wikipedia , lookup

Statistics wikipedia , lookup

Transcript
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 1
Chapter 16
Random Variables
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
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.
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
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.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 5
Greedy Pig
All students stand up. I will roll a die. Each student
will get the number of points on the die. Students
then may choose to keep their points by sitting
down, or remain standing for another roll. With
each roll, points accumulate for those who choose
to remain standing. BUT…if I roll a 5, all those
still standing lose their points, ending the round
with a score of 0.
Let’s play a couple of practice rounds.
What strategy were you using? (There is an
optimal strategy.)
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 6
Let’s Play a Game!!
A player will pay me $5 and then draw a card from
a deck. If you draw the ace of hearts, I will pay
you $100. For any other ace, I will pay you $10,
and for any other heart, I will pay you $5. If you
draw anything else, you lose.
Who wants to play? Would you play for a top prize
of $200?
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 7
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:
  E  X    x  P  X  x

Note: Be sure that every possible outcome is
included in the sum and verify that you have a
valid probability model to start with.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 8
Example 1: Expected Value
Given:
x
2
4
6
8
P(X=x) .3
.4
.2
.1
Find the expected value of the random variable.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 9
Example 1 continued….
We know that:
μ = E(X) = ΣxP(x)
= 2P(2) + 4P(4) + 6P(6) + 8P(8)
=2(.3) + 4(.4) + 6(.2) + 8(.1)
=4.2
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 10
Example 2: Finding Probability Models
For an insurance company, x (particular value of a random
variable) is $10,000 if you die that year, $5,000 if you are
disabled, or $0 if neither occurs. Suppose that the death
rate in any year is 1 out of every 1000 people, and that
another 2 out of 1000 suffer some kind of disability. We
can display the probability model for this insurance policy
in a table like this:
Policy Holder
Outcome
Payout
x
Probability
P(X=x)
Death
10,000
1/1000
Disability
5,000
2/1000
neither
0
997/1000
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 11
Example 2 continued…
If we insure exactly 1000 people, find the following.
What is the expected value of total payout for the
year?
What is the payout per policy?
If we charge a $50 premium for a policy, how much
money would we expect to make?
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 12
Example 2 continued…
If we insure exactly 1000 people, find the following.
What is the total payout?
We expect to pay out 10,000 + 2(5000) = $20,000
What is the expected payout per policy?(like the average)
  E ( X )  10000 P(death)  5000 P(disability )  0 P(neither )
  E ( X )  10000 
1
2
997
 5000 
 0
 $20
1000
1000
1000
If we charge a $50 premium for a policy, how much money would we
expect to make?
Charge: 1,000($50) = $50,000
Payout: $20,000
Net Profit: $30,000
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 13
Example 3: Car Repairs
Buck took his minivan in for repair recently because the air
conditioner was cutting out intermittently. The mechanic
identified the problem as dirt in the control unit. He said
that in about 75% of such cases, drawing down and then
recharging the coolant a couple times cleans up the
problem – and costs only $60. If that 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 the probability
model.
b.
What is the expected value of the cost of this repair?
c.
What does this mean in context?
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 14
Example 3 continued…
1.
Outcome
X=cost
Probability
Recharging
works
$60
0.75
Replace control
unit
$200
0.25
2. μ=E(X)=60(.75) + 200(.25) = $95
3. Car owners with this problem will spend an average of
$95 to get it fixed.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 15
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:
  Var  X     x     P  X  x 
2
2

The standard deviation for a random variable is:
  SD  X   Var  X 
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 16
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.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 17
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)
SD(aX) = aSD(X)
 Example: Consider everyone in a company
receiving a 10% increase in salary.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 18
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)

If the random variables are independent, the standard deviation of
their sum or difference is always the square root of the squares of the
standard deviations.
Pythagorean
Theorem of
Statistics!
SD( X  Y )  ( SD( X )) 2  ( SD(Y )) 2
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 19
Using Transformation Rules
Given independent random variables with means and
standard deviations as shown, find the mean and
standard deviation of each of these variables.

.8Y
Mean SD

2X-100
X
120
12

X+2Y
Y
300
16

3X-Y

Y1+Y2
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 20
Example




A casino knows that people play the slot machine in
hopes of hitting the jackpot, but that most of them lose
their dollar. Suppose a certain machine pays out an
average of $0.92 with a standard deviation of $120.
Why is the standard deviation so large?
If you play 5 times, what are the mean and standard
deviation of the casino’s profit?
If gamblers play this machine 1000 times in a day, what
are the mean and standard deviation of the casino’s
profit?
Do you think the casino is likely to be profitable?
Explain.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 21
Car Dealer Example
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 1.5
hours, with a standard deviation of .25 hours. The
appearance prep (wash, polish, etc) costs $6 per hour and
takes an average of 1 hour, with a standard deviation of
.083 hours.
 What are the mean and standard deviation of the total
time spent preparing a car?
 What are the mean and standard deviation of the total
expense to prepare a car?
 What are the mean and standard deviation of the
difference in costs for the two phases of the operation?
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 22
Answers



What are the mean and standard deviation of the
total time spent preparing a car?
E(T)=2.5 hours
SD(T)=.263 hours
What are the mean and standard deviation of the
total expense to prepare a car?
E(T)=$81
SD(T)=$12.51
What are the mean and standard deviation of the
difference in costs for the two phases of the
operation?
E(T)=$69
SD(T)=$12.51
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 23
Continuous Random Variables (cont.)


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.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 24
Car Dealers continued…
What is the probability that it will take longer than
2.7 hours to do the appearance prep and the
mechanical check-up? Both phases of the
process can be described by a Normal model.
E(T) =E(M) + E(A) = 1.5 + 1 = 2.5 hours
SD(D) = .263 hours (WHY?)
Normal model……
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 25
Car Dealers continued…
What is the probability that it will take longer to do
the appearance prep than the mechanical checkup? Both phases of the process can be
described by a Normal model.
**If the difference in the prep times is less than 0, it
means the appearance prep took longer.
E(D) =E(M) – E(A) = 1.5 – 1 = .5 hours
SD(D) = .263 hours (WHY?)
Normal model……
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 26
Example 7: Packaging Stereos



Consider a company that manufactures and ships small
stereo systems that were discussed in Chapter 16 of the
book. The times required to pack the stereos can be
described by 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 and boxing a system
takes over 20 minutes?
What is the probability that packing and boxing a system
takes between 12 and 17 minutes?
What percentage of the stereo systems take longer to
pack than to box?
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Slide 16- 27