Sei sulla pagina 1di 9

Chapter 2:

Random Variables and Probability Distributions


Lesson 7: More About Means and Variances
TIME FRAME: 1 hour
LEARNING OUTCOME(S): At the end of the lesson, the learner should be able to:

explain why the mean and variance are important summary measures of a probability
distribution
calculate the mean and variance for sums and differences of independent random
variables
provide an interpretation of the mean (and variance) of a discrete random variable
PRE-REQUISITE LESSONS: Random Variables, Probability Distributions, Expected Values

LESSON OUTLINE:
1. Review of Means and Variances
2. Chebychevs Inequality
3. Mean and Variance of Sums of Random Variables

DEVELOPMENT OF THE LESSON


(A) Introduction: Review of Means and Variances

Ask students to recall the definition of the expected value and variance of a random variable.
They should say that

the expected value of a discrete random variable is a weighted average of the possible
values of a the random variable, with the weights being the probabilities.

the variance of a random variable X with mean is the expected value of (X-)2

Help students remember that computationally, we derive the variance as

=
In addition, ask students to define the standard deviation. They should say it is the square
root of the variance.
(B) Motivation: Importance of Mean and Variance (and Standard Deviation)

Students may wonder why the mean and standard deviation are by far the two most important
summary measures of a distribution (whether a list of data, or for probability distribution,
including a probability density function).

Tell them about a mathematical result derived by a Russian mathematician named Pafnuty
Chebychev, called Chebychevs Inequality, that says that for a distribution,

(i) at least three fourths of the distribution is within two standard deviations from the
mean;
(ii) at least eight ninths of the data are within three standard deviations from the mean.
These bounds may be conservative though.

In the next set of lessons, students will discover that if a random variable has a normal
distribution, this limits are even quite conservative: about 95% of a normal distribution lies
between two standard deviations from the mean, and about 99.7% of the normal distribution
lies between three standard deviations from the mean.

(C) Main Lesson: Properties of Means and Variances

In previous lessons, students were shown that adding or subtracting a constant from data
shifts the mean but it does not change the variance and standard deviation. This is also the
case for random variables.

E( X c ) = E(X) c

Var( X c ) = Var(X)

If a teacher decides to give extra points to everyone in an exam, the average in the exam
increases by the number of extra points given by the teacher, but the variability of the new
increased scores stays the same.

If a company (or the government) decides to double incomes of its employees, this would
double the average incomes, and also increase by four times the variability in incomes. (The
latter is the reason why government should be careful of doubling incomes, as this would
increase income inequality). Students may have observed that multiplying or dividing data
by a constant changes both the mean and the standard deviation by the same factor. Variance,
being the square of standard deviation, would be affected even more, by the square of this
constant. This is also the case for random variables

E( aX ) = a E(X)

Var( aX ) = a2 Var(X)
Earlier, when the random variable X denoted the number of heads which occur when a fair
coin is tossed three times. It is natural to view X as the sum of the random variables X1, X2,
X3, where Xi is defined to be 1 if the ith toss comes up heads, and 0 if the ith toss comes up
tails. The expected values of the Xis are extremely easy to compute. It turns out that the
expected value of X can be obtained by simply adding the expected values of the Xis.

For simplicity, consider a case of two independent random variables, X and Y. The expected
value of the sum of independent random variables X and Y is the sum of the expected values:

E(X + Y) = E(X) + E(Y)

while the expected value of the difference of X and Y is the difference of the expected
values:

E(X - Y) = E(X) - E(Y)

How about the variance? Explain to students that that, if the random variables are
independent, then there is a simple Addition Rule for variances (for a sum of random
variables) :

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

What about the variances of a difference? Surprisingly, variance also adds up for a
difference of random variables:

Var( X - Y ) = Var(X) + Var(Y)

Variances are added for both the sum and difference of two independent random variables
because the variation in each variable contributes to the variation in each case. The
variability of a differences increases as much as the variability of sums.

To illustrate this notion about sums (or differences of random variables), consider a team of
four swimmers that are supposed to perform 4 medley relay events, swimming 100 meters.
The swimmers performances are independent, having the following means and standard
deviations of the times (in seconds) to finish 100 meters

Swimmer Mean Standard


Deviation
1 (freestyle) 45.02 0.20
2 (butterfly) 50.25 0.26
3 (backstroke) 51.45 0.24
4 (breaststroke) 56.38 0.22

ask students what would be the mean and standard deviation for the relay teams total time in
the relay, and if the teams practice best time was 201.62 seconds, would it be likely for the
team to swim faster than this during the actual competition?
Students should be able to obtain the mean of the teams total time in the relay as the sum of
the means 45.02+50.02 +51.45 +56.38 = 203.1 seconds, with a variance equal to the sum of
the variances, i.e. 0.202 + 0.262 + 0.242 + 0.222 = 0.2136, so that the standard deviation is the
square root of 0.2136=0.46 seconds. The best time of 201.62 seconds is 3.2 standard deviations
below the mean, thus it would be very likely for the team to swim faster than this best time.

The crucial assumption is independence of the random variables. Suppose the amount of
money spent by students for lunch is represented by the random variable X, and the amount
of money the same group of students spends on afternoon snacks is represented by variable
Y. The variance of the sum X + Y is not the sum of the variances, since X and Y are not as
independent random variables.

Consider tossing a fair coin 10 times, ask students what would be the number of heads
expected? (Students will likely say 5). Ask them how they got 5? Likely, they will say 10
times one half. Tell them their intuition is correct.

Now, show them that why their answer is right.

Define Xi as 1 if the ith toss comes up heads, and 0 if the ith toss comes up tails, and assuming
in general that the coin has a chance p of yielding heads (with p=1/2 when the coin is fair),
then tell them that the probability mass function for Xi is

X 0 1
P(Xi =x) 1-p p

For all values of i: i=1, up to 10 (or whatever number of tosses we make).

Here the mean of Xi is

E(Xi)= 0(1-p) + 1(p) = p,


while the variance of Xi is
E(Xi2) - (E(Xi))2 = (02)(1-p) + (1)2(p) p2 = p p2 = p (1-p)

Recall in the previous lesson that for tossing a fair coin (where p=1/2) three times, the
expected value of the number of heads is 1.5. We can also derive this as:
E(X1 + X2+ X3) = E(X1)+ E(X2)+ E(X3) = (1/2) + (1/2) + (1/2 ) = 1.5
while the variance was 0.75, and we can get this of
Var(X1 + X2+ X3) = Var(X1)+ Var(X2)+ Var(X3) = (1/2) (1/2) + (1/2) (1/2) +
(1/2 ) (1/2) = 3(1/2) (1/2) = 0.75
For tossing a fair coin ten times, the expected value of the number of heads is
E(X1 + X2+ X3) = E(X1)+ E(X2)+ E(X3) + + E(X10) = 10(1/2)= 5
while the variance here is
Var(X1 + X2+ X3 ++ X10) = Var(X1)+ Var(X2)+ Var(X3) + Var(X10)
= 10(1/2) (1/2) = 5/2 = 2.5
and thus a standard deviation of approximately 1.58.

Using Chebychevs Inequality, we know that when tossing a fair coin ten times (and
repeating this coin tossing process many, many times), at least three fourths of the time, we
would have the number of heads would range between 5 heads (the expected value) give or
take 3 heads ( 3 = 2 times the standard deviation 1.58 ).

In general, when we have a sequence of independent random variables X1, X2, X3, , Xn,
with a common mean , and a common standard deviation , then the sum

S = = =1 Xi

will have an expected value of (n ) and a variance of (n 2).

If we were too a fair coin 100 times, then expected value of the number of heads obtained is
100 (1/2)=50 , while the variance is =100 (1/2) (1/2) =25. According to Chebychevs
Inequality, at least three fourth of the distribution of the number of heads in 100 tosses of a
fair coin is within 50 2(5) = 40 heads to 50 + 2 (5) = 60 heads.

For tossing a coin n times where the probability of getting a head is p, if S is the number of
heads, then E(S) = n (p) while Var (S) = n (p) (1-p).

Remind students that variances of independent random variables are the ones that add up (not
the standard deviations: variances have squared units, so the intuition here is the underlying
use of the Pythagorean theorem: the square of the hypotenuse is the sum of squares of the
legs). In addition, remind them that variances of independent random variables add even
when we are considering differences between them.

KEY POINTS

Adding or subtracting a constant from the distribution of a random variable X shifts


the mean E(X) by the costant but it does not change the variance

E( X c ) = E(X) c
Var( X c ) = Var(X)
Multiplying or dividing the distribution of X by a constant changes the mean by a
factor equal to the constant, and the variability by the square of the constant.

E( aX ) = a E(X)
Var( aX ) = a2 Var(X)

The expected value of the sum (difference) of independent random variables X and Y
is the sum (difference) of the expected values

E(X Y) = E(X) E(Y)

while the variance of the sum (difference) of the random variables is the sum of the
variances:

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


REFERENCES

De Veau, R. D., Velleman, P. F., and Bock, D. E. (2006). Intro Stats. Pearson Ed. Inc.

http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/Chapter6.
pdf

https://www.youtube.com/watch?v=SMl7Jx7fcdE
ASSESSMENT

1. A grade 12 student uses the internet to get information on temperatures in the city where
he intends to go for college. He finds information in degrees Fahrenheit.

Determine the summary statistics equivalents in Celsius scale given C =( F-32) (5/9)

Maximum = 82.4 Range = 23.4 Median = 71.6


Mean =73.4 Standard Deviation = 7.2 IQR = 10.8

Answers:

The measures of location are sensitive to the transformation,

Maximum in Celsius = (82.4 -32) (5/9) = 28

Mean in Celsius = (73.4 -32) (5/9) = 23

Median in Celsius = (71.6 -32) (5/9) = 22

but the measures of variation will only be sensitive to scale.

Range in Celsius = (23.4)*5/9 = 13


Standard Deviation in Celsius = (7.2)*5/9 = 4
Interquartile Range in Celsius = (10.8)*5/9 = 6

2. Two companies are selling batteries for MP4 players. Company A claims an average
battery life of 12 hours, while Company B advertises an average of 14 hours. Why would
we need to know the standard deviation of the battery life before deciding what brand to
buy. Suppose that the standard deviations are 1.5 hours for A, and 1 hour for B, which
battery is more likely to last all day?

Answers: While mean is important, standard deviation gives info on variability; together
they show consistency. Since B has higher average and lower variability, it is likely to
last longer. According to Chebychevs inequality, at least 8
three fourths of the time, A will last within 9 hours to 15 hours; while B will last within
12 hours to 16 hours at least three fourths of the time.

3. Suppose that in a casino, a certain slot machine pays out an average of P15, with a
standard deviation of P5000. Every play of the game costs a gambler P20.

a) Why is the standard deviation so large?


b) If your parent decides to play with this slot machine 5 times, what are the mean
and standard deviation of the casinos profit?
c) If gamblers play with this slot machine 1000 times in a day, what are the mean
and standard deviation of the casinos profits?
Answers:
a) Gamblers lose a small amount of money most of the time, but there are a few large
payouts by the slot machine

In one play of the game, the slot machine loses X pesos to the gambler, with a mean
E(X)= 15, while SD(X) =5000, or Var(X)=25,000,000. Note that every play of the
game, gamblers are charged 20 pesos thus, the casino actually loses only an average
of E(X-20) = 15-20 = -5 pesos (i.e. on average, the casino wins 5 pesos per game),
with a variability of Var(X-20) = 25,000,000

b) For 5 plays of the game, expected value of losses would be 5 times (-5 pesos) = -25
pesos, i.e. (25 pesos earned by a casino per game), with a variability of

Var( 5 ( X 20 ) ) = 25 * 25,000,000 = 625,000,000

And thus a standard deviation of 25,000

c) For 1000 plays of the game, the expected losses of the casino would be

E ( 1000 ( X -20 ) ) = 1000 x (-5 pesos) = -5000 pesos

With a variance of

Var (1000 ( X 20 ) ) = 10002 x (25,000,000)

or a standard deviation of 1000 x 5,000 = 5,000,000

Potrebbero piacerti anche