chapter 7 random variables and discrete distributions

36
Chapter 7 Random Variables and Discrete Distributions

Upload: susanna-lindsey

Post on 18-Jan-2018

259 views

Category:

Documents


1 download

DESCRIPTION

Two Types of Random Variables: Discrete – its set of possible values is a collection of isolated points along a number line Continuous - its set of possible values includes an entire interval on a number line This is typically a “count” of something This is typically a “measure” of something In this chapter, we will look at different distributions of discrete and continuous random variables.

TRANSCRIPT

Page 1: Chapter 7 Random Variables and Discrete Distributions

Chapter 7Random Variables and Discrete Distributions

Page 2: Chapter 7 Random Variables and Discrete Distributions

Random Variable -• A numerical variable whose value

depends on the outcome of a chance experiment

• Associates a numerical value with each outcome of a chance experiment

• Two types of random variables– Discrete– Continuous

A grocery store manager might be interested in the number of broken

eggs in each carton (dozen of eggs).OR

An environmental scientist might be interested in the amount of ozone in

an air sample.

Since these values change and are subject to some uncertainty, these are examples of random variables.

Page 3: Chapter 7 Random Variables and Discrete Distributions

Two Types of Random Variables:• Discrete – its set of possible values is

a collection of isolated points along a number line

• Continuous - its set of possible values includes an entire interval on a number line

This is typically a “count” of something

This is typically a “measure” of something

In this chapter, we will look at different

distributions of discrete and continuous

random variables.

Page 4: Chapter 7 Random Variables and Discrete Distributions

Suppose yearly bonuses for employees of a small business are given below.

$200 $400 $300 $100 $500

Find and . = $300, = $141.42

Suppose that each bonus was increased by $200 .Find and . = $500, = $141.42

Suppose that each of the original bonuses were doubled.Find and . = $600, = $282.84

Page 5: Chapter 7 Random Variables and Discrete Distributions

Mean and Standard Deviation of Linear functions

If x is a random variable with mean, x, and standard deviation, x, and a and b are numerical constants, then the random variable y is defined by

andbxay

xyxbxay

xbxay

bb

ba

or2222

Page 6: Chapter 7 Random Variables and Discrete Distributions

Consider the chance experiment in which a customer of a propane gas company is randomly selected. Let x be the number of gallons required to fill a propane tank. Suppose that the mean and standard deviation is 318 gallons and 42 gallons, respectively. The company is considering the pricing model of a service charge of $50 plus $1.80 per gallon. Let y be the random variable of the amount billed. What is the equation for y?What is the mean and standard deviation for the amount billed?y = 50 + 1.8(318) =

$622.40

y = 50 + 1.8x

y = 1.8(42) = $75.60

Page 7: Chapter 7 Random Variables and Discrete Distributions

Suppose we are going to play a game called Stat Land! Players spin the two spinners below and move the sum of the

two numbers.

A = 2.5 B = 3.5A = 1.118 B = 1.708

List all the possible sums (A + B).2 3 4 5 6 73 4 5 6 7 84 5 6 7 8 95 6 7 8 9 10

?Move 1

1 234

Spinner A

2

45

61 3

Spinner B

Find the mean and standard deviation for

each spinner.

Find the mean and standard deviation for

these sums.

A+B = 6A+B =2.041

Notice that the mean of the sums is the sum of the

means!

How are the standard

deviations related?

Not sure – let’s think about it and return in just a few

minutes!

Page 8: Chapter 7 Random Variables and Discrete Distributions

Stat Land Continued . . .Suppose one variation of the game had players move the difference of the spinners

A = 2.5 B = 3.5A = 1.118 B = 1.708

List all the possible differences (B - A).0 -1 -2 -31 0 -1 -22 1 0 -13 2 1 04 3 2 15 4 3 2

?Move 1

1 234

Spinner A

2

45

61 3

Spinner BFind the mean and

standard deviation for these difference.

B-A= 1B-A =2.041

Notice that the mean of the differences is the difference of the

means!

WOW – this is the same value as the standard deviation

of the sums!

How do we find the standard deviation for

the sums or differences?

Page 9: Chapter 7 Random Variables and Discrete Distributions

The Additive Rule The expected value of the sum (or difference) of random variables is the sum (or difference) to their expected values.

)()()( YVarxVarYXVar

)()()( YEXEYXE

If the random variables are independent, the variance of their sum or difference is always the sum of the variances.

Page 10: Chapter 7 Random Variables and Discrete Distributions

A commuter airline flies small planes between San Luis Obispo and San Francisco. For small planes the baggage weight is a concern. Suppose it is known that the variable x = weight (in pounds) of baggage checked by a randomly selected passenger has a mean and standard deviation of 42 and 16, respectively.Consider a flight on which 10 passengers, all traveling alone, are flying.The total weight of checked baggage, y, is

y = x1 + x2 + … + x10

Page 11: Chapter 7 Random Variables and Discrete Distributions

Airline Problem Continued . . . x = 42 and x = 16

The total weight of checked baggage, y, is y = x1 + x2 + … + x10

What is the mean total weight of the checked baggage?

x = 1 + 2 + … + 10

= 42 + 42 + … + 42 = 420 pounds

Page 12: Chapter 7 Random Variables and Discrete Distributions

Airline Problem Continued . . . x = 42 and x = 16

The total weight of checked baggage, y, is y = x1 + x2 + … + x10

What is the standard deviation of the total weight of the checked baggage?x

2 = x1

2 + x22 + … + x10

2

= 162 + 162 + … + 162 = 2560 pounds

= 50.596 pounds

Since the 10 passengers are all traveling alone, it is reasonable to

think that the 10 baggage weights are unrelated and therefore independent.

To find the standard deviation, take the square root of this value.

Page 13: Chapter 7 Random Variables and Discrete Distributions

Probability Distributions for Discrete Random

VariablesProbability distribution is a model that describes the

long-run behavior of a variable.

Page 14: Chapter 7 Random Variables and Discrete Distributions

In Wolf City (a fictional place), regulations prohibit no more than five dogs or cats per household. Let x = the number of dogs or cats per household in Wolf City

x 0 1 2 3 4 5P(x) .26 .31 .21 .13 .06 .03

Is this variable discrete or continuous?What are the possible values for x?

The Department of Animal Control has collected data over the course

of several years. They have estimated the long-run probabilities

for the values of x.

What do you notice about the sum of these probabilities?

Page 15: Chapter 7 Random Variables and Discrete Distributions

Dogs and Cats Revisited . . . Let x = the number of dogs or cats per household in Wolf City

x 0 1 2 3 4 5P(x) .26 .31 .21 .13 .06 .03

What is the probability that a randomly selected household in Wolf City has at most 2 pets?

What does this mean?

P(x < 2) =

Just add the probabilities for 0, 1, and 2

.26 + .31 + .21 = .78

Page 16: Chapter 7 Random Variables and Discrete Distributions

Dogs and Cats Revisited . . . Let x = the number of dogs or cats per household in Wolf City

x 0 1 2 3 4 5P(x) .26 .31 .21 .13 .06 .03

What is the probability that a randomly selected household in Wolf City has less than 2 pets?

What does this mean?

P(x < 2) =

Notice that this probability does NOT include 2!

.26 + .31 = .57

Page 17: Chapter 7 Random Variables and Discrete Distributions

Dogs and Cats Revisited . . . Let x = the number of dogs or cats per household in Wolf City

x 0 1 2 3 4 5P(x) .26 .31 .21 .13 .06 .03

What is the probability that a randomly selected household in Wolf City has more than 1 but no more than 4 pets?

What does this mean?

P(1 < x < 4) =

.21 + .13 + .06 = .40

When calculating probabilities for discrete random variables, you MUST pay close attention to whether certain values are included (< or >) or not included (<

or >) in the calculation.

Page 18: Chapter 7 Random Variables and Discrete Distributions

Means and Standard Deviations of Probability Distributions• The mean value of a random variable x, denoted by x, describes where the probability distribution of x is centered.

• The standard deviation of a random variable x, denoted by x, describes variability in the probability distribution

Page 19: Chapter 7 Random Variables and Discrete Distributions

Mean and Variance for Discrete Probability Distributions• Mean is sometimes referred to as the

expected value (denoted E(x)).

• Variance is calculated using

• Standard deviation is the square root of the variance.

xpμx

px x22

Page 20: Chapter 7 Random Variables and Discrete Distributions

x = 1.51 pets

Dogs and Cats Revisited . . . Let x = the number of dogs or cats per household in Wolf City

x 0 1 2 3 4 5P(x) .26 .31 .21 .13 .06 .03

What is the mean number of pets per household in Wolf City?

First multiply each x-value times its corresponding probability.

x(p) 0 .31 .42 .39 .24 .15

Next find the sum of these values.

x(p) 0 + .31 + .42 + .39 + .24 + .15

Page 21: Chapter 7 Random Variables and Discrete Distributions

x2 = (0-1.51)2(.26) + (1-

1.51)2(.31) + (2-1.51)2(.21) + (3-1.51)2(.13) + (4-1.51)2(.06) + (5-1.51)2(.03) = 1.7499

Dogs and Cats Revisited . . . Let x = the number of dogs or cats per household in Wolf City

x 0 1 2 3 4 5P(x) .26 .31 .21 .13 .06 .03

What is the standard deviation of the number of pets per household in Wolf City?First find the deviation of each

x-value from the mean. Then square these deviations.Next multiply by the

corresponding probability. Then add these values.

This is the variance – take the square root of this value.

x = 1.323 pets

Page 22: Chapter 7 Random Variables and Discrete Distributions

Here’s a game:If a player rolls two dice and gets a sum of 2 or 12, he wins $20. If he gets a 7, he wins $5. The cost to roll the dice one time is $3. Is this game fair?

A fair game is one where the cost to play EQUALS

the expected value!X 0 5 20P(X) 7/9 1/61/18

NO, since = $1.944 which is less than it cost to play ($3).

Page 23: Chapter 7 Random Variables and Discrete Distributions

Special DistributionsTwo Discrete Distributions:

Binomial and Geometric

Page 24: Chapter 7 Random Variables and Discrete Distributions

Properties of Geometric Distributions:• There are two mutually exclusive

outcomes that result in a success or failure

• A geometric random variable x is defined as the number of trials UNTIL the FIRST success is observed ( including the success).

x 1 2 3 4

So what are the possible values of x, a geometric

random variable

. . .

Page 25: Chapter 7 Random Variables and Discrete Distributions

Probability Formula for the Geometric Distribution

Letp = constant probability that any trial results in a success

2

1

1)(

pq

p

pqxP x

Page 26: Chapter 7 Random Variables and Discrete Distributions

Suppose that 405 of students who drive to campus at your school or university carry jumper cables. Your car has a dead battery and you don’t have jumper cables, so you decide to stop students as they are headed to the parking lot and ask them whether they have a pair of jumper cables. Let x = the number of students stopped before finding one with a pair of jumper cables

Is this a geometric distribution?Yes

Page 27: Chapter 7 Random Variables and Discrete Distributions

Jumper Cables Continued . . . Let x = the number of students stopped before finding one with a pair of jumper cablesp = .4What is the probability that third student stopped will be the first student to have jumper cables?

What is the probability that at most three student are stopped before finding one with jumper cables?

P(x = 3) = (.6)2(.4) = .144

P(x < 3) = P(1) + P(2) + P(3) =(.6)0(.4) + (.6)1(.4) + (.6)2(.4)

= .784

Page 28: Chapter 7 Random Variables and Discrete Distributions

A real estate agent shows a house to prospective buyers. The probability that the house will be sold to the person is 35%. What is the probability that the agent will sell the house to the third person she shows it to?

How many prospective buyers does she expect to show the house to before someone buys the house? SD?

1479.0)3,35(.)3( geometpdfxP

buyers86.235.1

x buyers304.235.65.

2 x

Page 29: Chapter 7 Random Variables and Discrete Distributions

Properties of a Binomial Experiment1.Each trial results in one of two mutually

exclusive outcomes. (success/failure)2.There are a fixed number of trials

The binomial random variable x is defined as the number of successes observed when a binomial experiment is performed

We use n to denote the fixed number of trials.

Page 30: Chapter 7 Random Variables and Discrete Distributions

Binomial Probability Formula:Let

n = number of trialsp = probability of success (q = 1 – p (probability of failure))X = number of successes in n trials

)!(!! where,)(xnx

nkn

qpkn

xP xnx

Page 31: Chapter 7 Random Variables and Discrete Distributions

Instead of recording the gender of the next 25 newborns at a particular hospital, let’s record the gender of the next 5 newborns at this hospital.Is this a binomial experiment?Yes, if the births were not multiple births (twins, etc).Define the random variable of interest.x = the number of females born out of the next 5 birthsWhat are the possible values of x?x 0 1 2 3 4 5

Will a binomial random variable always include the value of 0?

What is the probability of “success”?

What will the largest value of the binomial random value be?

Page 32: Chapter 7 Random Variables and Discrete Distributions

Newborns Continued . . .

What is the probability that exactly 2 girls will be born out of the next 5 births?

What is the probability that less than 2 girls will be born out of the next 5 births?

3125.5.05.0)2( 3225 CxP

)1()0()2( ppxP

1875.5.5.5.5. 41

1550

05

CC

Page 33: Chapter 7 Random Variables and Discrete Distributions

Newborns Continued . . .

How many girls would you expect in the next five births at a particular hospital?

What is the standard deviation of the number of girls born in the next five births?

5.2)5(.5 npx

118.1)5)(.5(.5)1(

pnpx

Page 34: Chapter 7 Random Variables and Discrete Distributions

In a certain county, 30% of the voters are Republicans. If ten voters are selected at random, find the probability that no more than six of them will be Republicans.

B(10,.3)P(x < 6) = binomcdf(10,.3,6) = .9894What is the probability that at least 7 are notnot Republicans?

P(x > 7) = 1 - binomcdf(10,.7,6) = .6496

Page 35: Chapter 7 Random Variables and Discrete Distributions

In a certain county, 30% of the voters are Republicans. How many Republicans would you expect in ten randomly selected voters?What is the standard deviation for this distribution?

sRepublican45.1)7)(.3(.10sRepublican3)3(.10

)3,.10(

x

x

B

Page 36: Chapter 7 Random Variables and Discrete Distributions

In a certain county, 30% of the voters are Republicans. What is the probability that the number of Republicans out of 10 is within 1 standard deviation of the mean?

B(10,.3)P(1.55 < x < 4.45) = binomcdf(10,.3,4) – binomcdf(10,.3,1) = .7004