23
Chapter 5: Random Variables and Discrete Probability Distributions 1 http://www.landers.co.uk/statistics-cartoons/

Chapter 5: Random Variables and Discrete Probability Distributions 1

Embed Size (px)

Citation preview

Page 1: Chapter 5: Random Variables and Discrete Probability Distributions 1

1

Chapter 5: Random Variables and Discrete Probability Distributions

http://www.landers.co.uk/statistics-cartoons/

Page 2: Chapter 5: Random Variables and Discrete Probability Distributions 1

2

5.1-5.2: Random Variables - Goals• Be able to define what a random variable is.• Be able to differentiate between discrete and

continuous random variables.• Describe the probability distribution of a discrete

random variable.• Use the distribution and properties of a discrete

random variable to calculate the probability of an event.

Page 3: Chapter 5: Random Variables and Discrete Probability Distributions 1

3

Random Variables

A random variable is a function that assigns a unique numerical value to each outcome in a sample space.

The rule for a random variable may be given by a formula, a table, or words.

Random variables can either be discrete or continuous.

Page 4: Chapter 5: Random Variables and Discrete Probability Distributions 1

4

Probability Distribution of a Random Variables

• The probability distribution of a random variable gives all of its possible values and the probabilities for each of them.

Page 5: Chapter 5: Random Variables and Discrete Probability Distributions 1

5

Probability Distribution of a Random Variables

• Probability mass function (pmf) is the probability that a discrete random variable is equal to some specific value.

In symbols, p(x) = P(X = x)

Outcome x1 x2 …probability p1 p2 …

Page 6: Chapter 5: Random Variables and Discrete Probability Distributions 1

6

Examples: Probability Histograms

1 2 3 40

0.20.40.6

#1

Outcomes

Prob

abili

ty

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-0.2

0.2

0.6

#1

Outcomes

Prob

abili

ty

Page 7: Chapter 5: Random Variables and Discrete Probability Distributions 1

7

Examples: Probability Histograms

1 2 3 40

0.20.40.6

#2

Outcomes

Prob

abili

ty

0.5 1 1.5 2 2.5 3 3.5 4 4.5-0.25.55111512312578E-17

0.20.40.6

#2

Outcomes

Prob

abili

ty

Page 8: Chapter 5: Random Variables and Discrete Probability Distributions 1

8

Properties of a Valid Probability Distribution

1. 0 ≤ pi ≤ 1

Page 9: Chapter 5: Random Variables and Discrete Probability Distributions 1

9

Example: Discrete Random Variable

In a standard deck of cards, we want to know the probability of drawing a certain number of spades when we draw 3 cards with replacement. Let X be the number of spades that we draw.a) What is the distribution?b) Is this a valid distribution?c) What is the probability that you draw at least

1 spade?d) What is the probability that you draw at least

2 spades?

Page 10: Chapter 5: Random Variables and Discrete Probability Distributions 1

10

Example: Discrete (cont.)

0 1 2 3-0.1

0.1

0.3

0.5

Spades Example

Number of Spades

Prob

abili

ty

Page 11: Chapter 5: Random Variables and Discrete Probability Distributions 1

11

Example: Discrete Random Variable

In a standard deck of cards, we want to know the probability of drawing a certain number of spades when we draw 3 cards. Let X be the number of spades that we draw.a) What is the distribution?b) Is this a valid distribution?c) What is the probability that you draw at least

1 spade?d) What is the probability that you draw at least

2 spades?

Page 12: Chapter 5: Random Variables and Discrete Probability Distributions 1

12

5.3: Mean, Variance, and Standard Deviation for a Discrete Variable - Goals

• Be able to use a probability distribution to find the mean of a discrete random variable.

• Calculate means using the rules for means (not in the book)

• Be able to use a probability distribution to find the variance and standard deviation of a discrete random variable.

• Calculate variances (standard deviations) using the rules for variances for both correlated and uncorrelated random variables (not in the book)

Page 13: Chapter 5: Random Variables and Discrete Probability Distributions 1

13

Formula for the Mean of a Random Variable

Page 14: Chapter 5: Random Variables and Discrete Probability Distributions 1

14

Example: Expected value

What is the expected value of the following:a) A fair 4-sided die

X 1 2 3 4

Probability 0.25 0.25 0.25 0.25

Page 15: Chapter 5: Random Variables and Discrete Probability Distributions 1

15

Rules for MeansRule 1: If X is a random variable and a and b are

fixed numbers, then:µa+bX = a + bµX

Rule 2: If X and Y are random variables, then:µXY = µX µY

Rule 3: If X is a random variable and g is a function of X, then:

Page 16: Chapter 5: Random Variables and Discrete Probability Distributions 1

16

Example: Expected ValueAn individual who has automobile insurance form a certain company is randomly selected. Let X be the number of moving violations for which the individual was cited during the last 3 years. The distribution of X is

a) Verify that E(X) = 0.60. b) If the cost of insurance depends on the following

function of accidents, g(x) = 400 + (100x -15), what is the expected value of the cost of the insurance?

X 0 1 2 3px 0.60 0.25 0.10 0.05

Page 17: Chapter 5: Random Variables and Discrete Probability Distributions 1

17

Example: Expected ValueFive individuals who have automobile insurance from a certain company are randomly selected. Let X and Y be two different accident profiles in this insurance company:

E(X) = 0.60

E(Y) = 0.95 c) What is the expected value the total number of accidents

of the people if 2 of them have the distribution in X and 3 have the distribution in Y?

X 0 1 2 3px 0.60 0.25 0.10 0.05

Y 0 1 2 3pY 0.40 0.35 0.15 0.10

Page 18: Chapter 5: Random Variables and Discrete Probability Distributions 1

18

Example: Expected valueAn individual who has automobile insurance form a certain company is randomly selected. Let X be the number of moving violations for which the individual was cited during the last 3 years. The distribution of X is

d) Calculate E(X2).

X 0 1 2 3px 0.60 0.25 0.10 0.05

Page 19: Chapter 5: Random Variables and Discrete Probability Distributions 1

19

Variance of a Random Variable

= E(X2) – (E(X))2

Page 20: Chapter 5: Random Variables and Discrete Probability Distributions 1

20

Example: Variance

An individual who has automobile insurance form a certain company is randomly selected. Let X be the number of moving violations for which the individual was cited during the last 3 years. The distribution of X is

e) Calculate Var(X).

X 0 1 2 3px 0.60 0.25 0.10 0.05

Page 21: Chapter 5: Random Variables and Discrete Probability Distributions 1

21

Rules for VarianceRule 1: If X is a random variable and a and b are

fixed numbers, then:σ2

a+bX = b2σ2X

Rule 2: If X and Y are independent random variables, then:

σ2XY = σ2

X + σ2Y

Rule 3: If X and Y have correlation ρ, then:

σ2XY = σ2

X + σ2Y 2ρσXσY

Page 22: Chapter 5: Random Variables and Discrete Probability Distributions 1

22

Example: VarianceAn individual who has automobile insurance form a certain company is randomly selected. Let X be the number of moving violations for which the individual was cited during the last 3 years. The distribution of X is

a) Calculate the variance of this distribution. b) If the cost of insurance depends on the following

function of accidents, g(x) = 400 + (100x -15), what is the standard deviation of the cost of the insurance?

X 0 1 2 3px 0.60 0.25 0.10 0.05

Page 23: Chapter 5: Random Variables and Discrete Probability Distributions 1

23

Example: Variance5 individuals who have automobile insurance from a certain company are randomly selected. Let X and Y be two different independent accident profiles in this insurance company:

Var(X) = 0.74

Var(Y) = 0.95 What is the standard deviation of the (2X – 3Y)?

X 0 1 2 3px 0.60 0.25 0.10 0.05

Y 0 1 2 3pY 0.40 0.35 0.15 0.10