1 of 35

Slides developed by Mine Çetinkaya-Rundel of OpenIntro

Translated from LaTeX to Google Slides by Curry W. Hilton of OpenIntro.

The slides may be copied, edited, and/or shared via the CC BY-SA license

To make a copy of these slides, go to File > Download as > [option],�as shown below. Or if you are logged into a Google account, you can choose Make a copy... to create your own version in Google Drive.

2 of 35

Random Variables

3 of 35

Random variables

There are two types of random variables:

  • Discrete random variables often take only integer values
    • Example: Number of credit hours, Difference in number of credit hours this term vs last
  • Continuous random variables take real (decimal) values
    • Example: Cost of books this term, Difference in cost of books this term vs last

A random variable is a numeric quantity whose value depends on the outcome of a random event

  • We use a capital letter, like X, to denote a random variable
  • The values of a random variable are denoted with a lowercase letter, in this case x
  • For example, P(X = x)

4 of 35

Expectation

  • We are often interested in the average outcome of a random variable.
  • We call this the expected value (mean), and it is a weighted average of the possible outcomes

5 of 35

Expected value

of a discrete random variable

In a game of cards you win $1 if you draw a heart, $5 if you draw an ace (including the ace of hearts), $10 if you draw the king of spades and nothing for any other card you draw. Write the probability model for your winnings, and calculate your expected winning.

6 of 35

Expected value

of a discrete random variable

In a game of cards you win $1 if you draw a heart, $5 if you draw an ace (including the ace of hearts), $10 if you draw the king of spades and nothing for any other card you draw. Write the probability model for your winnings, and calculate your expected winning.

7 of 35

Expected value

of a discrete random variable (cont.)

Below is a visual representation of the probability distribution of winnings from this game:

8 of 35

Variability

We are also often interested in the variability in the values of a random variable.

9 of 35

Variability of

a discrete random variable

For the previous card game example, how much would you expect the winnings to vary from game to game?

10 of 35

Variability of

a discrete random variable

For the previous card game example, how much would you expect the winnings to vary from game to game?

11 of 35

Variability of

a discrete random variable

For the previous card game example, how much would you expect the winnings to vary from game to game?

12 of 35

Linear combinations

  • A linear combination of random variables X and Y is given by

aX + bY

where a and b are some fixed numbers.

13 of 35

Linear combinations

  • The average value of a linear combination of random variables�is given by

E(aX + bY) = a x E(X) + b x E(Y)

  • A linear combination of random variables X and Y is given by

aX + bY

where a and b are some fixed numbers.

14 of 35

Calculating the expectation

of a linear combination

On average you take 10 minutes for each statistics homework problem and 15 minutes for each chemistry homework problem. This week you have 5 statistics and 4 chemistry homework problems assigned. What is the total time you expect to spend on statistics and physics homework for the week?

15 of 35

Calculating the expectation

of a linear combination

On average you take 10 minutes for each statistics homework problem and 15 minutes for each chemistry homework problem. This week you have 5 statistics and 4 chemistry homework problems assigned. What is the total time you expect to spend on statistics and physics homework for the week?

16 of 35

Linear Combination

The variability of a linear combination of two independent random variables is calculated as:

17 of 35

Linear Combination

  • The variability of a linear combination of two independent random variables is calculated as:

  • The standard deviation of the linear combination is the square root of the variance.

Note: If the random variables are not independent, the variance calculation gets a little more complicated and is beyond the scope of this course.

18 of 35

Linear combinations

The standard deviation of the time you take for each statistics homework problem is 1.5 minutes, and it is 2 minutes for each chemistry problem. What is the standard deviation of the time you expect to spend on statistics and chemistry homework for the week if you have 5 statistics and 4 chemistry homework problems assigned?

19 of 35

Linear combinations

The standard deviation of the time you take for each statistics homework problem is 1.5 minutes, and it is 2 minutes for each chemistry problem. What is the standard deviation of the time you expect to spend on statistics and chemistry homework for the week if you have 5 statistics and 4 chemistry homework problems assigned?

Looking for a complete explanation? There's a discussion in the OpenIntro Forums with a detailed explanation for why we aren't squaring the 5 and 4 in the equation above. [link]

20 of 35

Practice

A casino game costs $5 to play. If you draw first a red card, then you get to draw a second card. If the second card is the ace of hearts, you win $500. If not, you don't win anything, i.e. lose your $5. What is your expected profits (or losses) from playing this game? Remember: profit (or loss) = winnings - cost.

(a) a loss of 10¢ (c) a loss of 30¢

(b) a loss of 25¢ (d) a profit of 5¢

21 of 35

Practice

A casino game costs $5 to play. If you draw first a red card, then you get to draw a second card. If the second card is the ace of hearts, you win $500. If not, you don't win anything, i.e. lose your $5. What is your expected profits (or losses) from playing this game? Remember: profit (or loss) = winnings - cost.

(a) a loss of 10¢ (c) a loss of 30¢

(b) a loss of 25¢ (d) a profit of 5¢

22 of 35

Fair game

A fair game is defined as a game that costs as much as its expected payout, i.e. expected profit is 0.

23 of 35

Fair game

A fair game is defined as a game that costs as much as its expected payout, i.e. expected profit is 0.

Do you think casino games in Vegas cost more or less than their expected payouts?

24 of 35

Fair game

A fair game is defined as a game that costs as much as its expected payout, i.e. expected profit is 0.

Do you think casino games in Vegas cost more or less than their expected payouts?

If those games cost less than their expected payouts, it would mean that the casinos would be losing money on average, and hence they wouldn't be able to pay for all this:

25 of 35

Simplifying random variables

Random variables do not work like normal algebraic variables:

X + X ≠ 2X

26 of 35

Simplifying random variables

Random variables do not work like normal algebraic variables:

X + X ≠ 2X

E(X + X) = E(X) + E(X) V(X + X) = Var(X) + Var(X)

= 2E(X) = 2 Var(X)

E(2X) = 2E(X) Var(2X) = 22 Var(X)

= 4 Var(X)

Assuming Independence

27 of 35

Simplifying random variables

Random variables do not work like normal algebraic variables:

X + X ≠ 2X

E(X + X) = E(X) + E(X) V(X + X) = Var(X) + Var(X)

= 2E(X) = 2 Var(X)

E(2X) = 2E(X) Var(2X) = 22 Var(X)

= 4 Var(X)

E(X + X) = E(2X), but Var(X + X) ≠ Var(2X)

Assuming Independence

28 of 35

Adding or multiplying?

A company has 5 Lincoln Town Cars in its fleet. Historical data show that annual maintenance cost for each car is on average $2,154 with a standard deviation of $132. What is the mean and the standard deviation of the total annual maintenance cost for this fleet?

29 of 35

Adding or multiplying?

A company has 5 Lincoln Town Cars in its fleet. Historical data show that annual maintenance cost for each car is on average $2,154 with a standard deviation of $132. What is the mean and the standard deviation of the total annual maintenance cost for this fleet?

Note that we have 5 cars each with the given annual maintenance cost (X1 + X2 + X3 + X4 + X5), not one car that had 5 times the given annual maintenance cost (5X).

30 of 35

Adding or multiplying?

A company has 5 Lincoln Town Cars in its fleet. Historical data show that annual maintenance cost for each car is on average $2,154 with a standard deviation of $132. What is the mean and the standard deviation of the total annual maintenance cost for this fleet?

Note that we have 5 cars each with the given annual maintenance cost (X1 + X2 + X3 + X4 + X5), not one car that had 5 times the given annual maintenance cost (5X).

31 of 35

Adding or multiplying?

A company has 5 Lincoln Town Cars in its fleet. Historical data show that annual maintenance cost for each car is on average $2,154 with a standard deviation of $132. What is the mean and the standard deviation of the total annual maintenance cost for this fleet?

Note that we have 5 cars each with the given annual maintenance cost (X1 + X2 + X3 + X4 + X5), not one car that had 5 times the given annual maintenance cost (5X).

32 of 35

Adding or multiplying?

A company has 5 Lincoln Town Cars in its fleet. Historical data show that annual maintenance cost for each car is on average $2,154 with a standard deviation of $132. What is the mean and the standard deviation of the total annual maintenance cost for this fleet?

Note that we have 5 cars each with the given annual maintenance cost (X1 + X2 + X3 + X4 + X5), not one car that had 5 times the given annual maintenance cost (5X).

33 of 35

Adding or multiplying?

A company has 5 Lincoln Town Cars in its fleet. Historical data show that annual maintenance cost for each car is on average $2,154 with a standard deviation of $132. What is the mean and the standard deviation of the total annual maintenance cost for this fleet?

Note that we have 5 cars each with the given annual maintenance cost (X1 + X2 + X3 + X4 + X5), not one car that had 5 times the given annual maintenance cost (5X).

34 of 35

Adding or multiplying?

A company has 5 Lincoln Town Cars in its fleet. Historical data show that annual maintenance cost for each car is on average $2,154 with a standard deviation of $132. What is the mean and the standard deviation of the total annual maintenance cost for this fleet?

Note that we have 5 cars each with the given annual maintenance cost (X1 + X2 + X3 + X4 + X5), not one car that had 5 times the given annual maintenance cost (5X).

35 of 35

Find more resources at openintro.org/os, including

  • Slides
  • Videos
  • Statistical Software Labs
  • Discussion Forums (free support for students and teachers)
  • Learning Objectives

Teachers only content is also available for Verified Teachers, including

  • Exercise solutions
  • Sample exams
  • Ability to request a free desk copy for a course
  • Statistics Teachers email group

Questions? Contact us.