Chapter 7. Random Variables

Chapter 7 Random Variables Lesson 7-1, Part 1 Discrete and Continuous Random Variables. Random Variable      A numerical variable whose va...
Author: Loreen Hubbard
43 downloads 3 Views 592KB Size
Chapter 7 Random Variables

Lesson 7-1, Part 1 Discrete and Continuous Random Variables.

Random Variable 

  



A numerical variable whose value depends on the outcome of a chance experiment is called random variable. A random variable associates a numerical value with each outcome of a chance experiment. We use a capital letter like X, to denote a random value. The probability distribution of a random variable X gives the probability associated with each possible X value . A random variable can be discrete or continuous.

Discrete and Continuous Random Variables 

A discrete variable is a variable whose values are obtained by counting. 

Example   



Number of students present Number of heads when flipping three coins Student’s grade level

A continuous variable is a variable whose values are obtained by measuring. 

Example   

Height of students in class Time it takes to get to school Distance traveled between classes

Discrete Random Variable Example: Let X represents the sum of two dice

Then the probability distribution of X is as follows:

X

2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 5 4 3 2 1 P( X ) 36 36 36 36 36 36 36 36 36 36 36 To graph the probability distribution of a discrete random variable, construct a probability histogram.

Probability Histogram Probability Distribution of X

Probability

0.2

0.15

0.1

0.05 0 2

3

4

5

6

7

8

Outcome

9

10

11

12

Example – Page 396, #7.2 A couple plans to have three children. There are 8 possible arrangements of girls and boys. For example GGB means the first two children are girls and the child is a boy. All 8 arrangements are (approximately equally likely.

A). Write down all 8 arrangements of the sexes of three children. What is the probability of any one of these arrangements? 1 1 1 1 P (GGB )     GGG BBB 2 2 2 8 GGB BGG GBB GBG

BBG BGB

Example – Page 396, #7.2 GGG GGB GBB GBG

BBB BGG BBG BGB

1 1 1 1 P (GGB )     2 2 2 8

B). Let X be the number of girls the couple has. What is the probability that X = 2?

 1 3 P ( X  2)  3    8 8

Example – Page 396, #7.2 GGG GGB GBB GBG

BBB BGG BBG BGB

C). Starting from your work in (A), find the distribution of X. That is what values can X take, and what are the probabilities for each value. Value of X: Probability:

0 1/ 8

1

2

3

3 / 8 3 / 8 1/ 8

Lesson 7-1, Part 2 Discrete and Continuous Random Variables.

Continuous Random Variable   



A continuous random variable X takes all values in a given interval of numbers. The probability distribution of a continuous random variable is shown by a density curve. The probability that X is between an interval of numbers is the area under the density curve between the endpoints. The probability that a continuous random variable X is exactly equal to a number is zero.

Example – Page 401, #7.6 Let X be a random number between 0 and 1 produced by the idealized uniform random number generator describe in Example 7.3 and Figure 7.5. Find the following probabilities. A). P (0  X  0.4)  0.4 A  (0.4  0)1

B) P (0.4  X  1)  0.6 A  (1  0.4)1

1 0

0.4

1

Example – Page 401, #7.6 C). P (0.3  X  0.5)  0.2 A  (0.5  0.3)1

D) P (0.3  X  0.5)  0.2 A  (0.5  0.3)1

1 0

1

E) P (0.226  X  0.713)  0.487 A  (0.713  0.226)1

F) What important fact about continuous random variables does comparing your answer to (c) and (d).

Example – Page 401, #7.6 F) What important fact about continuous random variables does comparing your answer to (c) and (d). Continuous distribution assign probabilities 0 to every individual outcome. In this case, the probabilities in (c) and (d) are the same because the events differ by 2 individual values, 0.3 and 0.5, each of which has a probability 0.

Example – Uniform Density Curve A certain probability density function is made up of two straight line Segments. The first segment begins at the origin and goes to point (1,1). The second segment goes from (1,1) to the point (1.50, 1). A). Sketch the distribution function, and verify that it is a legitimate density curve.

AT  A A 1

Example – Uniform Density Curve B). Find P (0  X  0.5)  0.125

A

bh 2



(0.5)(0.50)  2

C). Find P ( X  1)  0

Example – Uniform Density Curve D). Find P (0  X  1.25)  0.75

A 

bh 2



(1)(1)  0.50 2

A bh  (1.25  1)1  0.25

AT  A A

 0.50  0.25  0.75

E). Is X an example of discrete random variable or a continuous random variable.

Continuous

Normal Distributions 

Normal distributions are probability distributions



N(μ, σ) is a normal distribution with mean μ and standard deviation σ



If X has the N(μ, σ) distribution then x μ z σ

Example – Page 402, #7.8 An SRS of 400 American adult is asked, “What do you think the most serious problem facing our schools?” Suppose that in fact 40% of all adults would answer “violence” if asked this question. The proportion pˆ of the sample who answered “violence” will vary in repeated sampling. In fact, we can assign probabilities to values of pˆ using the normal density curve with mean 0.4 and standard deviation 0.023. Use the density curve to find the probabilities of the following events. A). At least 45% of the sample believes that violence is the schools most serious problem.

let pˆ  violence in schools, where pˆ  0.45,   0.40,   0.023

Example – Page 402, #7.8 A). At least 45% of the sample believes that violence is the schools most serious problem.

P ( pˆ  0.45)  0.0149 normalcdf (0.45, E 99,0.40,0.023)

z

x  μ 0.45  0.4   2.17 σ 0.023

P ( z  2.17)  .0150 normalcdf (2.17, E 99,0,1)

0.4 0.45 0

2.17

pˆ Z

Example – Page 402, #7.8 B). Less than 35% of the sample believes that violence is the most serious problem.

P ( pˆ  0.35)  0.0149 normalcdf ( E 99,0.35,0.40,0.023)

z

x  μ 0.35  0.4   2.17 σ 0.023

P ( z  2.17)  .0150 normalcdf ( E 99, 2.17,0,1)

0.35

0.4

-2.17

0

pˆ Z

Example – Page 402, #7.8 C). The sample proportion is between 0.35 and 0.45

P (0.35  pˆ  0.45)  0.9700 normalcdf (0.35,0.45,0.40,0.023) P ( 2.17  z  2.17)  .9700 normalcdf ( 2.17,2.17,0,1) 0.35 -2.17

0.4

0.45

0

2.17

pˆ Z

Example 1 Some areas of California are particularly earth-quake-prone. Suppose that in one such area, 20% of all homeowners are insured against earthquake damage. Four homeowners are selected at random; let X denote the number among the four who have earthquake insurance. a) Find the distribution of X. (Hint: Let S denotes a homeowner who has insurance and F one who dose not. Then one possible outcome is SFSS, with probability (0.2)(0.8)(0.2)(0.2) and associated x value of 3. There are 15 other outcomes.)

Example 1 Outcomes and Probabilities Outcome Probability X Value SSSS 0.0016 4 FSSS 0.0064 3 SFSS 0.0064 3 SSFS 0.0064 3 SSSF 0.0064 3 FFSS 0.0256 2 FSFS 0.0256 2 FSSF 0.0256 2

Outcome SFFS SFSF SSFF SFFF FSFF FFSF FFFS FFFF

Probability 0.0256 0.0256 0.0256 0.1024 0.1024 0.1024 0.1024 0.4096

X Value 2 2 2 1 1 1 1 0

Example 1 Probability Distribution of X (Homeowners with Earthquake Insurance) X Value 0 1 P(X) Probability Value

2

3

4

0.4096 0.4096 0.1536 0.0256 0.0016

b) What is the most likely value of x? 0 and 1 c) What is the probability that at least two of the four selected homeowners have earthquake insurance? P( X  2)  P(2)  P(3)  P(4)  0.1536  0.0256  0.0016  0.1808

Example 2 Let the random variable X represent the profit made on a randomly selected day by a certain store. Assume that X is normal with mean $460 and standard deviation $75. What is the value of P(X > $525) Let x = store profit, where x = $525,  = $460,  = $75

P( x  525)  0.1931 normalcdf (525, E 99,460,75)

460

525

Example 3 Let the random variable X represent the profit made on randomly selected day by a certain store. Assume X is normal with a mean of $427 and standard deviation $35. The probability is approximately 0.60 that on a randomly selected day the store will make less than Xo amount of profit. Find Xo. Let x = store profit, where x = _____,  = $427,  = $35 xo = 435.87 invnorm(0.60, 427, 35) We have a 60% chance of selecting a day when the store profit will be less than $438.87

427

Xo

Lesson 7.2, Part 1 Means and Variance of Random Variable

Mean of a Random Variable 



 

Is the long-run average outcome of a experiment. As the number of trials of the experiment increases, the average result of the experiment gets closer to the mean of the random variable. Use the notation μX for the mean. The mean of a random variable is also called the expected mean of X.

Mean of Discrete Random Variable The mean of a discrete random variable X, is its weighted average. Each value of X is weighted by its probability. Value of X:

x1

x2

x3

.... xk

Probability:

p1

p2

p3

.... pk

To find the mean of X, multiply each possible value by its probability, then add all the products: μ X  x1p1  x2 p2  ....  xk pk  E ( X )   xi pi

Example – Page 411, #7.22 Example 7.1 gives the distribution of grades (A = 4, B = 3, and so on) in a large class as

Grade : Prob:

0

1

2

3

4

0.10

0.15

0.30

0.30

0.15

Find the average (that is, the mean) grade in this course.

μX  0(0.10)  1(0.15)  2(0.30)  3(0.30)  4(0.15)  2.25

Variance of a Discrete Random Variable If X is a discrete random variable with mean μ, then the variance of X is Value of X: Probability:

x1

x2

x3

.... xk

p1

p2

p3

.... pk

σ 2X   x1  μ X  p1   x2  μ X  p2  ....   xk  μ X  pk 2

2

2

   xi  u x  pi 2

The standard deviation (σX) is the square root of the variance

Example – Page 411, #7.26 Example 7.1 gives the distribution of grades (A = 4, B = 3, and so on) in a large class as

Grade : Prob:

0

1

2

3

4

0.10

0.15

0.30

0.30

0.15

Find the standard deviation σX of the distribution of grades in Exercise 7.22.

σ   0  2.25   0.10   1  2.25   0.15    2  2.25   0.30   2 X

2

2

2

 3  2.25   0.30    4  2.25   0.15   1.3875 2

2

Example – Page 411, #7.26 σ   0  2.25   0.10   1  2.25   0.15    2  2.25   0.30   2 X

2

2

2

 3  2.25   0.30    4  2.25   0.15   1.3875 2

σ X  1.3875  1.178

2

Example – Page 412, #7.24 The Tri-State Pick 3 lottery game offers a choice of several bets. You choose a three-digit number. The lottery commission announces the winning three-digit number, chosen at random, at the end of each day. The “box” pays $83.33 if the number you choose has the same digits as the winning number, in any order. Find the expected payoff for $1 bet on the box. (Assume that you chose a number having three different digits.)

If my number is abc, then of the (10)3 = 1000 three-digit numbers, there are six – abc, acb, bac, bca, cab, cba – for Which you will win the box. 6 P (W )   0.006 1000

P (L )  1  0.006  0.994

Example – Page 412, #7.24 The Tri-State Pick 3 lottery game offers a choice of several bets. You choose a three-digit number. The lottery commission announces the winning three-digit number, chosen at random, at the end of each day. The “box” pays $83.33 if the number you choose has the same digits as the winning number, in any order. Find the expected payoff for $1 bet on the box. (Assume that you chose a number having three different digits.)

6 P (W )   0.006 1000 P (L )  1  0.006  0.994

Payoff X Probability

$0 0.994

$83.33 0.006

Example – Page 412, #7.24 Payoff X Probability

$0 0.994

$83.33 0.006

Find the expected payoff on a $1 bet μX   0  0.994    83.33  0.006   $0.50

The casino keeps 50 cents from each dollar bet in the long run, since the expected payoff is 50 cents. Payoff X

$–1

$83.33

Probability

0.994

0.006

μX  0.50

Law of Large Numbers 



As the number of observations increases, the mean of the observed values of, x , approaches the mean of the population, μ. The more variation in the outcomes, the more trials are need to ensure that x is close to μ.

Example – Page 417, #7.32 A). A gambler knows that red and black are equally likely to occur on each pin of a roulette wheel. He observes five consecutive reds and bets heavily on red at the next spin. Asked why, he says that “red is hot” and that the run of reds is likely to continue. Explain to the gambler what is wrong with this reasoning.

The wheel is not affected by it past outcomes – it has no memory; outcomes are independent. So on any one spin, black and red remain equally likely

Example – Page 417, #7.32 B). After hearing you explain why red and black remain equally probable after five reds on the roulette wheel, the gambler moves to poker game. He is dealt five straight red cards. he remembers what you said and assume that the next card dealt in the same hand it equally likely to red or black. Is the gambler right or wrong? Why?

Removing a card changes the composition of the remaining deck, so successive draws are not independent. If you hold 5 red cards, the deck now contains 5 fewer reds cards, so your chance of another red decreases.

Lesson 7.2, Part 2 Rules for Means and Variance

Rules for Means If X is a random variable and a and b are fixed numbers, then

μa bX  a  bμX If X and Y are random variables, then

μX Y  μX  μY

Rules for Variances If X is a random variable and a and b are fixed numbers, then

σ

2 a  bX

b σ 2

2 X

If X and Y are independent random variables, then

σ

2 X Y

σ σ

σ

2 X Y

σ σ

2 X

2 X

2 Y

2 Y

Example 1 – Page Rules for Means and Variance Given independent random variables with mean and standard deviations are shown, find the means and standard deviations of each of these variables. Mean

A) 0.8Y

SD

0.8Y  0.8(300)  240

X 120

12

2  0.8 Y   0.8  16   163.84

Y 300

16

2

2

 0.8Y  163.84  12.80

2 X 100  2(120)  100  140

B) 2X – 100



2 2 X 100

  2  12   576 2

2

 2 X 100  576  24

Example 1 – Page Rules for Means and Variance Given independent random variables with mean and standard deviations are shown, find the means and standard deviations of each of these variables. Mean

C) X + 2Y

 X  2Y  120  2(300)  720 

2 X  2Y

 12    2  16   1168 2

2

2

X 120

12

Y 300

16

 X  2Y  1168  34.18

D) 3X – Y

3 X Y  3(120)  300  60 

2 3 X Y

  3 12   16   1552 2

2

 3 X Y  1552  39.40

2

SD

Example 1: Rules for Means Suppose the equation Y = 20 + 10X converts a PSAT math score, X, into an SAT math score, Y. Suppose the average PSAT math score is 48. What is the average SAT math score?

 X  48 abx  a  b X 20100 X  20  10(48)  500

Example 2: Rules for Means Let μX = 625 represents the average SAT math score. Let μy = 590 represents the average SAT verbal score.

 X Y   X  Y

represents the average combined

SAT score. Then  X Y   X  Y  625  590  1215 is the average combined total SAT score.

Example 3 Rules for Variances Suppose the equation Y = 20 + 10X converts a PSAT math score, X, into an SAT math score, Y. Suppose the standard deviation for the PSAT math score is 1.5 points. What is the standard deviation for the SAT math score?

  (1.5)  2.25 2 X



2 a bX

2

b  2

2 X 2

 202 100 X  (10) (2.25)  225  X  15

Example – Page 425, #7.36 Laboratory data show that the time required to complete two chemical reactions in a production process varies. The first reaction has a mean time of 40 minutes and a standard deviation of 2 minutes: the second has a mean time of 25 minutes and a standard deviation of 1 minute. The reactions are run in sequence during production. There is fixed period of 5 minutes between them as the product of the first reaction is pumped into the vessel where the second reaction will take place. What is the mean time required for the entire process?

Total Mean  X1  5  X 2  40  5  25  70 minutes

Example – Page 426, #7.40 Use Examples 7.7 (Page 411) and 7.10 (Page 419) concerning a probabilistic projection of sales and profits by an electronic firm, Gain Communications. A). Find the variance and standard deviation of the estimated sales Y of Gain’s civilian unit, using the distribution and mean from Example 7.10 Y = Units sold 300 500 750

μY  445 units

Probability

0.4

0.5

0.1

σY2   300  445   0.4    500  445   0.5    750  445   0.1  19225 2

σY  19225  138.65 units

2

2

Example – Page 426, #7.40 B). Because the military budget and the civilian economy are not closely linked, Gain is willing to assume that its military and civilian sales vary independently. Combine you results from (a) with the results for the military unit from Example 7.10 to obtain the standard deviation of total sales X + Y

μY  445 units σY  138.65 units

X = Units sold 1000

3000

5000 10000

Probability

0.3

0.4

0.1

0.2

μX  5000 units σ 2X  1000  5000   0.1   3000  5000   0.3    5000  5000  0.4  2

 10000  5000   0.2   7,800,000 2

σ X  7800000  2792.85 units

2

2

Example – Page 426, #7.40 B). Because the military budget and the civilian economy are not closely linked, Gain is willing to assume that its military and civilian sales vary independently. Combine you results from (a) with the results for the military unit from Example 7.10 to obtain the standard deviation of total sales X + Y

μY  445 units σY  138.65 units

μX  5000 units σ X  2792.85 units

σ 2X Y  σ 2X  σY2  138.652  2792.852  7,819,225 σ  7819234.95  2796.29

Example – Page 426, #7.40 C). Find the standard deviation of the estimated profit, Z = 2000X + 3500Y

μY  445 units σY  138.65 units

μX  5000 units σ X  2792.85 units

2 2 2 2 2 σ 22000 X 3500Y  σ 22000 X  σ 3500  b σ  b σY Y X

 (2000) 2792.85  (3500) 138.65 2

2

 3.1434  10

13

σ  3.144  10

13

 $5,606,738

2

2