34
8/2/2019 72 Means and Variances of Random Variables http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 1/34 The Practice of Statistics Third Edition Chapter 7: Random Variables 7.2 The mean and Standard Deviation of a Random Variable Copyright © 2008 by W. H. Freeman & Company Daniel S. Yates 

72 Means and Variances of Random Variables

Embed Size (px)

Citation preview

Page 1: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 1/34

The Practice of StatisticsThird Edition 

Chapter 7:Random Variables

7.2 The mean and Standard Deviation

of a Random Variable

Copyright © 2008 by W. H. Freeman & Company

Daniel S. Yates 

Page 2: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 2/34

Some of the examples and slides were copied from the following source:

Roxy Peck

Chris Olsen

Jay Devore

Introduction to Statistics & Data Analysis

3ed

Thompson Brooks/Cole, a part of The ThompsonCorporation

Page 3: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 3/34

Essential Questions

• How do you calculate the mean of a discrete randomvariable?

• How do you calculate the variance and standarddeviation of a discrete random variable?

• What is the law of large numbers?• Given µX and µY, How do you calculate µa+bX and µX+Y ?

• Given X and Y are independent, how do you calculateσ2

a+bX and σ2X+Y ?

• How do you describe the shape of a linear combinationof independent Normal random variables?

Page 4: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 4/34

Review

Page 5: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 5/34

Review

Page 6: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 6/34

Review

Page 7: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 7/34

Calculating The Means of aDiscrete Random Variable

Distribution

Page 8: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 8/34

Example 1• A professor regularly gives multiple

choice quizzes with 5 questions. Overtime, he has found the distribution of thenumber of wrong answers on his

quizzes is as followsx P(x)

0 0.25

1 0.352 0.20

3 0.15

4 0.04

5 0.01

Page 9: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 9/34

Example Continued

• Multiply each x value by itsprobability and add the results toget mx.

x P(x) x•P(x)

0 0.25 0.001 0.35 0.35

2 0.20 0.40

3 0.15 0.45

4 0.04 0.165 0.01 0.05

1.41

mx = 1.41

Page 10: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 10/34

Example – Apgar Scores

• At I min after birth and again at 5 min, each newborn child isgiven a numerical rating called the Apgar score. Possiblevalues of the score are 0, 1, 2, …, 9, 10. A child’s score is

determined by five factors: muscle tone, skin color,respiratory effort, strength of heartbeat, and reflex. A high

score indicates a healthy baby. Let X denote the Apgarscore at I min of a randomly selected newborn infant at aparticular hospital. The probability distribution is:

0 1 2 3 4 5 6 7 8 9 10.002 .001 .002 .005 .02 .04 .17 .38 .25 .12 .01

X

P(X)

What is the mean Apgar score at this hospital?

µX = 7.16

Page 11: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 11/34

Calculating Variance

Page 12: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 12/34

Example 1 Again• A professor regularly gives multiple

choice quizzes with 5 questions. Overtime, he has found the distribution of thenumber of wrong answers on hisquizzes is as follows

x P(x)

0 0.25

1 0.35

2 0.203 0.15

4 0.04

5 0.01

µX = 1.41

Calculate the variance for the of X.

Page 13: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 13/34

Example - continued

x P(x) x•P(x) x - m (x - m

(x - m•P(x)

0 0.25 0.00 -1.41 1.9881 0.49701 0.35 0.35 -0.41 0.1681 0.05882 0.20 0.40 0.59 0.3481 0.06963 0.15 0.45 1.59 2.5281 0.3792

4 0.04 0.16 2.59 6.7081 0.26835 0.01 0.05 3.59 12.8881 0.12891.41 1.4019

2

XVariance 1.4019

x

Standard deviation

1.4019 1.184

Page 14: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 14/34

Page 15: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 15/34

Number of Observations versusAccurate Estimates of μ 

Page 16: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 16/34

Page 17: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 17/34

Rules for Means and

Variances

Page 18: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 18/34

Suppose

• Suppose we want to find the means length andStandard Deviation of a species of grasshoppersin a particular field. We run our survey andestablish the following distribution:

• X = the length in inches

X 1 2 3

P(X) 0.2 0.5 0.3

• Find the mean and standard deviation of X.

μX = 2.1 inches σ2X = 0.49 σ = 0.7 inches

Page 19: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 19/34

More Supposing

• Suppose we are required to report our findingsusing the metric system. How does changing tocentimeters affect µX and σX ?

X (in.) 1 2 3

P(X) 0.2 0.5 0.3

2.54X 2.54(1) 2.54(2) 2.54(3)

P(X) 0.2 0.5 0.3

μX = 2.1 in.

σ2X = 0.49

µ2.54X = 2.54(1)(0.2) + 2.54(2)(0.5) + 2.54(3)(0.3)

= 2.54[(1)(0.2) + (2)(0.5) + (3)(0.3)] = 2.54[ 2.01]

= 2.54µx --------- Let b = 2.54, then bµx

σ22.54X = (2.54(1) – 2.54(2.1))2 (0.2) + (2.54(2) – 2.54(2.1))2 (0.5) + (2.54(3) – 2.54(2.1))2 (0.3)

= (2.54(-1.1))2 (0.2) + (2.54(-0.1))2 (0.5) + (2.54(0.9))2 (0.3)

= 2.542 ((-1.1)2 (0.2) + (-0.1)2 (0.5) + (0.9)2 (0.3)) = 2.542 (0.49)

= 2.542 σ2X --------------- b2σ2

Page 20: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 20/34

Even More Supposing• We discover after the survey that the instruments we used to

measure the grasshopper were miss calibrated. The measurementswere 0.1 inches too short. Is there a way to adjust the results

without re-doing the entire survey?• 0.1 inches = .254 cm

.254 + 2.54X .254 + 2.54 .254 + 5.08 .254 + 7.62

P(X) 0.2 0.5 0.3

µ.254+2.54X = (.254 + 2.54)(0.2) + (.254 + 5.08)(0.5) + (.254 + 7.62)(0.3) 

= .254(.2) + .254(.5) + .254(.3) +2.54(.2) + 5.08(.5) +(7.62)(.3)

= [.254(.2) + .254(.5) + .254(.3)] +[2.54(.2) + 5.08(.5) +(7.62)(.3)]

= .254[ 1(.2) + 1(.5) + 1(.3)] + 2.54[ 1(.2) + 2(.5) + 3(.3)]= .254 + 2.54µX 

If we let a = .254 and b = 2.54, then we have

µa+bX = a + bµx 

Page 21: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 21/34

Rules for Means

Page 22: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 22/34

Page 23: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 23/34

Example 2

Suppose x is the number of sales staffneeded on a given day. If the cost of doingbusiness on a day involves fixed costs of$255 and the cost per sales person per day

is $110, find the mean cost (the mean of x ormx) of doing business on a given day wherethe distribution of x is given below.

x p(x)

1 0.32 0.4

3 0.2

4 0.1

Page 24: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 24/34

Example 2 continued

x p(x) xp(x)

1 0.3 0.3

2 0.4 0.83 0.2 0.6

4 0.1 0.4

2.1

x 2.1m

We need to find the mean of y = 255 + 110x

xy 255 110x 255 110

255 110(2.1) $486

mm m

Page 25: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 25/34

Example 2 continued

2

x

x

0.89

0.89 0.9434

x p(x) (x-m)2

p(x)

1 0.3 0.3630

2 0.4 0.00403 0.2 0.1620

4 0.1 0.3610

0.8900

X255 1102 2 2 2

x(110) (110) (0.89) 10769 m

We need to find the variance and standarddeviation of y = 255 + 110x

X255 110 x110 110(0.9434) 103.77

m

Page 26: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 26/34

1. my = a1m1 + a2m2 + + anmn 

(This is true for any random variables with no conditions.) 

Means and Variances for LinearCombinations

2. If x1

, x2

, , xn

are independent randomvariables then

and

2 2 2 2 2 2 2

y 1 1 2 2 n na a a

2 2 2 2 2 2

y 1 1 2 2 n na a a

If x1, x2, , xn are random variables with means

m1, m2, , mn and variances respectively,

and y = a1x1 + a2x2 + + anxn then

2 2 2

1 2 n, , ,

Page 27: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 27/34

Example 3A distributor of fruit baskets is going to put 4

apples, 6 oranges and 2 bunches of grapes inhis small gift basket. The weights, in ounces, ofthese items are the random variables x1, x2 andx3 respectively with means and standarddeviations as given in the following table.

Find the mean, variance and standard deviation of therandom variable y = weight of fruit in a small gift

basket.

Apples Oranges Grapes

Meanm 

8 10 7

Standard deviation  0.9 1.1 2

E l 3 i d

Page 28: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 28/34

Example 3 continued

1 2 3 1 2 3a 4, a 6, a 2, 8, 10, 7 m m m

1 2 30.9, 1.1, 2

1 1 2 2 3 3y a x a x a x 1 1 2 2 3 3a a a

4(8) 6(10) 2(7) 106

m m m m m

It is reasonable in this case to assume that theweights of the different types of fruit are

independent.

1 1 2 2 3 3

2 2 2 2 2 2 2 2

y a x a x a x 1 1 2 2 3 3

2 2 2 2 2 2

a a a

4 (.9) 6 (1.1) 2 (2) 72.52

y = 72.52 8.5159

Apples Oranges

Meanm

8 10 7

Standard deviation

 0.9 1.1 2

Grapes

E l 4

Page 29: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 29/34

Example 4• A nationwide standardized exam consists of a multiple choice and a

free response section. Each section, the mean and standarddeviation are reported to be:

• Let X1 = the score for multiple-choice and X2 = the score for the freeresponse.

• Suppose the total score is computed as Y = X1

+ 2X2• Find the mean and standard deviation for the test

Mean StandardDeviation

Multiple Choice 38 6

Free Response 30 7

E l 4 C i d

Page 30: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 30/34

Example 4 Continued

The Mean1 2

2

38 2(30) 98Y X X m m m 

The Standard Deviation

Are X1 and X2 independent?It is likely that X1 and X2 are not independentsince a person who does well on multiple

choice section will also do well on the freeresponse section and vice versa.

Therefore, we can not calculate the standarddeviation with the given information.

Page 31: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 31/34

Last Problem

• Suppose that the mean height of policemen is70 inches with a standard deviation of 3 inches.And suppose that the mean height for

policewomen is 65 inches with a standarddeviation of 2.5 inches.

• If heights of policemen and policewomen areNormally distributed, find the probability that a

randomly selected policewoman is taller than arandomly selected policeman.

Page 32: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 32/34

Last Problem - Continued

• Let X = height of policewoman and Y=height of policeman.

•  μX-Y = 65 – 70 = -5.

•  σ2X-Y = σ2X + σ2Y = 2.52 + 32 = 15.25•  σX-Y =

• Using N(-5, 3.905) find P(X –Y < 0).

590.32 Y  X  

From the Calculator ( NormCDF ( -9999, 0, -5, 3.905)

P(X – Y < 0) = 0.8997

Page 33: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 33/34

Summary

• The Law of Large Numbers says that theaverage of the values of X observed in manytrials approach μ.

• If X is discrete with the possible values xi, the

means is the average of the values of X, eachweighted by its probability:μX = x1p1 + x2p2 + … + xnpn 

• The variance σ2 for a discrete variable:

σ2X = (x1 - μ)2p1 + (x2 – μ)2p2 + … + (xn - μ)2pn • The standard deviation σX is the square root of

the variance.

Page 34: 72 Means and Variances of Random Variables

8/2/2019 72 Means and Variances of Random Variables

http://slidepdf.com/reader/full/72-means-and-variances-of-random-variables 34/34

Summary

The means and variance of random variables obeythe following rules

• If a and b are fixed numbers, thenμa + bX = a + b μX

σ2a+bX = b2σ2

X • If X and Y are any two random variables, then

μX + Y = μX + μY

• And if X and Y are independent, thenσ2X + Y = σ2

X + σ2Y 

σ2X – Y = σ2

X + σ2Y