Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

51
Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1

Transcript of Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Page 1: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning

Random Variables

Chapter 8

1

Page 2: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 2

8.1 What is a Random Variable?

Random Variable: assigns a number to each outcome of a random circumstance, or, equivalently, to each unit in a population.

Two different broad classes of random variables:

1. A discrete random variable can take one of a countable list of distinct values.

2. A continuous random variable can take any value in an interval or collection of intervals.

Page 3: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 3

Random factors that will determine how enjoyable the event is:

Temperature: continuous random variable

Number of airplanes that fly overhead:discrete random variable

Example 8.1 Random Variables at an Outdoor Graduation or Wedding

Page 4: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 4

• What is the probability that three tosses of a fair coin will result in three heads?

• Assuming boys and girls are equally likely, what is the probability that 3 births will result in 3 girls?

• Assuming probability is 1/2 that a randomly selected individual will be taller than median height of a population, what is the probability that 3 randomly selected individuals will all be taller than the median?

Example 8.2 Probability an Event Occurs Three Times in Three Tries

Answer to all three questions = 1/8.

Discrete Random Variable X = number of times the “outcome of interest” occurs in three independent tries.

Page 5: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 5

8.2 Discrete Random VariablesX the random variable.

k = a number the discrete r.v. could assume.

P(X = k) is the probability that X equals k.

Example 8.5 Number of Courses

35% of students taking four courses, 45% taking five, and remaining 20% are taking six courses.

X = number of courses a randomly selected student is takingThe probability distributionfunction of X can be given by:

Probability distribution function (pdf) X is a table or rule that assigns probabilities to possible values of X.

Page 6: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 6

Conditions for Probabilities for Discrete Random Variables

Condition 1 The sum of the probabilities over all possible values of a discrete random variable must equal 1.

Condition 2 The probability of any specific outcome for a discrete random variable must be between 0 and 1.

Page 7: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 7

Probability Distribution of a Discrete R.V.

Using the sample space to find probabilities:

Step 1: List all simple events in sample space.

Step 2: Identify the value of the random variable X for each simple event.

Step 3: Find the probability for each simple event (often equally likely).

Step 4: Find P(X = k) as the sum of the probabilities for all simple events where X = k.

Probability distribution function (pdf) X is a table or rule that assigns probabilities to possible values of X.

Page 8: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 8

Example 8.6 PDF for Number of Girls Family has 3 children. Probability of a girl is ½.What are the probabilities of having 0, 1, 2, or 3 girls?

Sample Space: For each birth, write either B or G. There are eight possible arrangements of B and G for three births. These are the simple events.

Sample Space and Probabilities: The eight simple events are equally likely.

Random Variable X: number of girls in three births. For each simple event, the value of X is the number of G’s listed.

Page 9: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 9

Example 8.6 & 8.7 Number of Girls

Probability DistributionFunction for Number of Girls X:

Value of X for each simple event:

Graph of the pdf of X:

Page 10: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 10

Cumulative Distribution Function of a Discrete Random Variable

Cumulative distribution function (cdf) for a random variable X is a rule or table that provides the probabilities P(X ≤ k) for any real number k.

Cumulative probability = probability that X is less than or equal to a particular value.

Example 8.8 Cumulative Distribution Function for the Number of Girls

Page 11: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 11

Finding Probabilities for Complex Events

Example 8.9 A Mixture of Children

pdf for Number of Girls X:

What is the probability that a family with 3 children will have at least one child of each sex?

If X = Number of Girls then either family has one girl and two boys (X = 1) or two girls and one boy (X = 2).

P(X = 1 or X = 2) = P(X = 1) + P(X = 2) = 3/8 + 3/8 = 6/8 = 3/4

Page 12: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 12

8.3 Expectations for Random Variables

The expected value of a random variable is the mean value of the variable X in the sample space or population of possible outcomes.

If X is a random variable with possible values x1, x2, x3, . . . , occurring with probabilities p1, p2, p3, . . . , then the expected value of X is calculated as

ii pxXE

Expected value = Sum of “value × probability”

Page 13: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 13

Example 8.12 California Decco Lottery

How much would you win/lose per ticket over long run?

Player chooses one card from each of four suits. Winning card drawn from each suit. If one or more matches the winning cards prize. It costs $1.00 for each play.

Lose an average of 35 cents per play.

Page 14: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 14

Standard Deviation for a Discrete Random Variable

The standard deviation of a random variable is roughly the average distance the random variable falls from its mean, or expected value, over the long run.

If X is a random variable with possible values x1, x2, x3, . . . , occurring with probabilities p1, p2, p3, . . . , and expected value E(X) = , then

ii

ii

pxX

pxXVX

2

22

ofDeviation Standard

of Variance

Page 15: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 15

Example 8.13 Stability or Excitement

Two plans for investing $100 – which would you choose?

Expected Value for each plan:

Plan 1:E(X ) = $5,000(.001) + $1,000(.005) + $0(.994) = $10.00

Plan 2: E(Y ) = $20(.3) + $10(.2) + $4(.5) = $10.00

Page 16: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 16

Example 8.13 Stability or Excitement

Variability for each plan:

Plan 1: V(X ) = $29,900.00 and = $172.92

Plan 2: V(X ) = $48.00 and = $6.93

The possible outcomes for Plan 1 are much more variable. If you wanted to invest cautiously, you would choose Plan 2, but if you wanted to have the chance to gain a large amount of money, you would choose Plan 1.

Page 17: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 17

Expected Value (Mean) and Standard Deviation for a Population

Page 18: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 18

8.4 Binomial Random Variables

1. There are n “trials” where n is determined in advance and is not a random value.

2. Two possible outcomes on each trial, called “success” and “failure” and denoted S and F.

3. Outcomes are independent from one trial to the next.

4. Probability of a “success”, denoted by p, remains same from one trial to the next. Probability of “failure” is 1 – p.

Class of discrete random variables = Binomial -- results from a binomial experiment.

Conditions for a binomial experiment:

Page 19: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 19

Examples of Binomial Random Variables

A binomial random variable is defined as X=number

of successes in the n trials of a binomial experiment.

Page 20: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 20

Finding Binomial Probabilities

p = probability win = 0.2; plays of game are independent.

X = number of wins in three plays.

What is P(X = 2)?

knk ppknk

nkXP

1

!!

!for k = 0, 1, 2, …, n

Example 8.15 Probability of Two Wins in Three Plays

096.0)8(.)2(.3

2.12.!23!2

!32

12

232

XP

Page 21: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 21

Expected Value and Standard Deviation for a Binomial Random Variable

For a binomial random variable X based on n trials and success probability p,

pnp

npXE

1 deviation Standard

Mean

Page 22: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 22

Example 8.18 Extraterrestrial Life? 50% of large population would say “yes” if asked, “Do you believe there is extraterrestrial life?”

Sample of n = 100 is taken.

X = number in the sample who say “yes” is approximately a binomial random variable.

In repeated samples of n=100, on average 50 people would say “yes”. The amount by which that number would differ from sample to sample is about 5.

55.)5(.100 deviation Standard

50)5(.100 Mean

XE

Page 23: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 23

8.5 Continuous Random Variables

Continuous random variable: the outcome can be any value in an interval or collection of intervals.

Probability density function for a continuous random variable X is a curve such that the area under the curve over an interval equals the probability that X is in that interval.

P(a X b) = area under density curve over the interval between the values a and b.

Page 24: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 24

Example 8.19 Time Spent Waiting for Bus

Bus arrives at stop every 10 minutes. Person arrives at stop at a random time, how long will s/he have to wait?

X = waiting time until next bus arrives.

X is a continuous random variable over 0 to 10 minutes.

Note: Height is 0.10 so total area under the curve is (0.10)(10) = 1

This is an example of a Uniform random variable

Page 25: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 25

Example 8.20 Probability about Wait Time

What is the probability the waiting time X is in the interval from 5 to 7 minutes?

Probability = area under curve between 5 and 7

= (base)(height) = (2)(.1) = .2

Page 26: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 26

8.6 Normal Random Variables

Most commonly encountered type of continuous random variable is the normal random variable, which has a specific form of a bell-shaped probability density curve called a normal curve.

A normal random variable is also said to have a normal distribution

Any normal random variable can be completely characterized by its mean, , and standard deviation, .

Page 27: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 27

Example 8.21 College Women’s Heights

Data suggest the distribution of heights of college women described well by a normal curve with mean = 65 inches and standard deviation = 2.7 inches.

Note: Tick marks given at the mean and at 1, 2, 3 standard deviations above and below the mean.

Empirical Rule are exact characteristics of a normal curve model.

Page 28: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 28

Useful Probability Relationships

Page 29: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 29

Useful Probability Relationships

Page 30: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 30

Example 8.22 Prob for Math SAT Scores

Math SAT scores have a normal distribution with mean = 515 and standard deviation = 100.

Q: Probability a score is less than or equal to 600?

A: (using Minitab) .8023.

Page 31: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 31

Example 8.22 Prob for Math SAT Scores

Math SAT scores have a normal distribution with mean = 515 and standard deviation = 100.

Q: Probability a score is greater than 600?

A: By complement, 1 – .8023 = .1977

Page 32: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 32

Example 8.22 Prob for Math SAT Scores

Math SAT scores have a normal distribution with mean = 515 and standard deviation = 100.

Q: Probability a score is between 515 and 600?

A: (since 50% of scores are larger than the mean of 515), .8023 – .5000 = .3023

Page 33: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 33

Example 8.22 Prob for Math SAT Scores

Math SAT scores have a normal distribution with mean = 515 and standard deviation = 100.

Q: Probability a score is more than 85 points away from the mean in either direction?

A: (since 600 is 85 points above the mean) .1977 + .1977 = .3954.

Page 34: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 34

Using a Table to Find Probabilities

Table A.1 = Standard Normal (z) Probabilities• Body of table gives cumulative probabilities P(Z z).

• First column gives digit before the decimal place, the first decimal place for z.

• Second decimal place of z is in column heading.

P(Z 1.82) = .9656

Page 35: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 35

More Finding Probabilities for z-scores

Table A.1 = Standard Normal (z) Probabilities

P(Z -2.5) =.0048 (see in portion above)

Verify on own:

P(Z 1.31) = .9049

P(Z -2.00) = .0228

Page 36: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 36

Calculating a Standard Score

The formula for converting any value x to a z-score is

x

zdeviation Standard

MeanValue

A z-score measures the number of standard deviations that a value falls from the mean.

Page 37: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 37

Example 8.23 z-Score for Height

For a population of college women, the z-score corresponding to a height of 62 inches is

This z-score tells us that 62 inches is 1.11 standard deviations below the mean height for this population.

11.17.2

6562

deviation Standard

MeanValue

z

Page 38: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 38

Use z-scores to Solve General Problems

Example 8.24 Probability of Smaller Height

What is the probability that a randomly selected college woman is 62 inches or shorter?

1335.11.162 ZPXP

About 13% of college women are 62 inches or shorter.

11.17.2

6562

Z

Page 39: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 39

Finding PercentilesIf 25th percentile of pulse rates is 64 bpm, then 25% of pulse rates are below 64 and 75% are above 64. The percentile is 64 bpm, and the percentile ranking is 25%.

Step 1: Find z-score that has specified cumulative probability. Using Table A.1, find percentile rank in body of table and read off the z-score.

Step 2: Compute x = z* + . This is desired percentile.

Page 40: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 40

Example 8.26 75th Percentile of Systolic Blood Pressure

Blood Pressures are normal with mean 120 and standard deviation 10. What is the 75th percentile?

Step 1: Find closest z* with area of 0.7500 in body of Table A.1.

z* = 0.67

Step 2: Compute x = z* +

x = (0.67)(10) + 120 = 126.7 or about 127.

Page 41: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 41

8.7 Approximating Binomial Distribution ProbabilitiesIf X is a binomial random variable based on n trials with success probability p, and n is large, then the random variable X is also approximately normal, with mean and standard deviation given as:

Conditions: Both np and np(1 – p) are at least 10.

pnp

npXE

1 deviation Standard

Mean

Page 42: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 42

Example 8.27 Number of Heads in 60 Flips

X = number of heads in n = 60 flips of fair coinBinomial distribution with n = 60 and p = .5.

Distribution is bell-shaped and can be approximated by a normal curve.

873.35.)5(.60 deviation Standard

30)5(.60 Mean

XE

Page 43: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 43

Example 8.28 Another Normal Approx

Binomial distribution with n = 300 and p = .3

Normal curve closely approximates the

binomial distribution

937.77.)3(.300 deviation Standard

90)3(.300 Mean

XE

Page 44: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 44

Example 8.29 Political Woes

Poll: n = 500 adults; 240 supported position

If 50% of all adults support position, what is the probability that a random sample of 500 would find 240 or fewer holding this position? P(X 240)

2.115.)5(.100 deviation Standard

250)5(.500 Mean

XEX is approximately normal with

1867.89.2.11

250240240

ZPZPXP

Not unlikely to see 48% or less, even if 50% in population favor.

Page 45: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 45

8.8 Sums, Differences, Combinations of r.v.

A linear combination of random variables, X, Y, . . . is a combination of the form:

L = aX + bY + …

where a, b, etc. are numbers – positive or negative.

Most common:Sum = X + Y Difference = X – Y

Page 46: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 46

Means of Linear Combinations

L = aX + bY + …

The mean of L is:

Mean(L) = a Mean(X) + b Mean(Y) + …

Most common:

Mean( X + Y) = Mean(X) + Mean(Y)

Mean(X – Y) = Mean(X) – Mean(Y)

Page 47: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 47

Variances of Linear Combinations

If X, Y, . . . are independent random variables, then

Variance(L) = a2 Variance(X) + b2 Variance(Y) + …

Most common:

Variance( X + Y) = Variance(X) + Variance(Y)

Variance(X – Y) = Variance(X) + Variance(Y)

Page 48: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 48

If X, Y, . . . are independent normal random variables, then L = aX + bY + … is normally distributed.

In particular:

X + Y is normal with

X – Y is normal with

Combining Independent Normal Random Variables

22 deviation standard

mean

YX

YX

22 deviation standard

mean

YX

YX

Page 49: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 49

Example 8.31 Will Meg Miss Her Flight?

X = driving time, normal, mean 25 min, std dev 3 min

Y = airport time, normal, mean 15 min, std dev 2 min

X and Y independentT = X + Y = total time is normal with

6.323 deviation standard

401525 mean

22

0823.39.16.3

404545

ZPZPTP

If Meg leaves with 45 minutes before flight takes off, what is probability she will miss her flight?

Page 50: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 50

If X, Y, . . . are independent binomial random variables with nX, nY, etc trials and all have same success probability p, then the sum X + Y + … is a binomial random variable with n = nX + nY + … and success probability p.

If the success probabilities differ, the sum is not a binomial random variable.

Combining Independent Binomial Random Variables

Page 51: Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.

Copyright ©2011 Brooks/Cole, Cengage Learning 51

Example 8.33 Donations Add Up

X = # donors by volunteer 1; binomial n = 10, p = .2

Y = # donors by volunteer 2; binomial n = 12, p = .2

W = # donors by volunteer 3; binomial n = 18, p = .2

T = X + Y + W is binomial n = 40, p = .2

2682.10 TP

Fund drive: Three volunteers call potential donors. About 20% called make a donation, independent of who called. If volunteers make 10, 12 and 18 calls, respectively, what is the probability that they get at least ten donors?

(Verify it!)