<<

CHAPTER 3

RANDOM VARIABLES AND DISTRIBUTIONS

3.1 Concept of a Random EXAMPLE 3.3. A major metropolitan newspaper asked whether the paper should increase its coverage of local news. Let X denote the proportion of readers who would like more coverage of local news. Is X a random vari- A random variable is a function that associates a real able? What does it by saying 0.6 < x < 0.7? number with each element in the sample space. EXAMPLE 3.4. Denote T be the survival time for the prostate cancer patients in a local hospital. Explain why In other words, a random variable is a function T is a random variable. X : S R,whereS is the of the random ! under consideration. Discrete Random Variable NOTE. By convention, we use a capital letter, say X, to denote a random variable, and use the corresponding If a sample space contains a finite number of possibil- lower-case letter x to denote the realization (values) of ities or an unending with as many elements the random variable. as there are whole numbers (countable), it is called a discrete sample space. A random variable is called a EXAMPLE 3.1 (Coin). Consider the random experi- discrete random variable if its of possible outcomes ment of tossing a coin three times and observing the re- is countable. sult (a Head or a Tail) for each toss. Let X denote the total number of heads obtained in the three tosses of the Continuous Random Variable coin. If a sample space contains an infinite number of pos- (a) Construct a table that shows the values of the ran- sibilities equal to the number of points on a line seg- dom variable X for each possible of the ment, it is called a continuous sample space. When random experiment. a random variable can take on values on a continuous scale, it is called a continuous random variable. (b) Identify the event X 1 in words. {  } EXAMPLE 3.5. Categorize the random variables in the above examples to be discrete or continuous. Let Y denote the difference between the number of heads obtained and the number of tails obtained.

(c) Construct a table showing the value of Y for each 3.2 Discrete Probability Distributions possible outcome. The of a discrete random vari- (d) Identify the event Y = 0 in words. { } able X lists the values and their . EXAMPLE 3.2. Suppose that you play a certain lottery Value of X x x x x by buying one ticket per week. Let W be the number of 1 2 3 ··· k Probability p p p p weeks until you win a prize. 1 2 3 ··· k where (a) Is W a random variable? Brief explain. 0 p 1 and p + p + + p = 1 (b) Identify the following events in words: (i) W >  i  1 2 ··· k { 1 , (ii) W 10 , and (iii) 15 W < 20 } {  } {  } 3.3 Continuous Probability Distributions 87

f (x) f (x) 6/16 6/16 5/16 5/16 4/16 4/16

3/16 3/16

2/16 2/16 10 Chapter 3. Random Variables and Probability Distributions 1/16 1/16

x x 01234 01234 EXAMPLE 3.6. Determine the value of k so that the (a) Find the PMF of X, assuming that the selection is function f (x)=k x2 + 1 for x = 0,1,3,5 can be a legit- done randomly. Plot it. imate probability distributionFigure of a discrete 3.1: Probability random vari- mass function plot. Figure 3.2: Probability . able. (b) What is the probability that at least one woman is included in the interview pool? probabilities is necessary for our consideration of the probability distribution of a Probability Mass Function (PMF) continuous random variable. The graphCumulative of the cumulative Distribution distribution Function function (CDF) of of Example a disc. r.v. 3.9, which ap- The set of ordered pairs (x, f (x)) is a probabilitypears func- as a in Figure 3.3, is obtained by plotting the points (x, F (x)). The cumulative distribution function F(x) of a discrete tion, probability mass function, or probabilityCertain distri- probability distributions are applicable to more than one physical situ- random variable X with probability mass function f (x) bution of the discrete random variable X if,ation. for each The probability distribution of Example 3.9, for example, also applies to the is possible outcome x, random variable Y , where Y is the number of heads when a coin is tossed 4 times, or to the random variable W , where W is the number of red cards that occur when i). f (x) 0, F(x)=P(X x) 4 cards are drawn at random from a deck in succession with each card replaced and the deck shued before the= next f drawing.(t), for Special• < discretex < •. distributions that can ii).  f (x)=1, t x x be applied to many dierent experimental situations will be considered in Chapter 5. iii). P(X = x)= f (x). 3.3 Continuous Probability Distributions 87 F(x)

f (x) f (x) 1 6/16 6/16 3/4 5/16 5/16 4/16 4/16 1/2

3/16 3/16 1/4 2/16 2/16 x 1/16 1/16 0 123 4

x x 01234 Figure01234 3.3: Discrete cumulative distribution function. 3.3 Continuous Probability Distributions 87 EXAMPLE 3.9. Given that the CDF Figure 3.1: Probability mass function plot. Figure 3.2: Probability histogram. f (x) f (x) 0, x < 1 6/16 1/3, 1 x < 2 6/16 3.3probabilitiesContinuous is necessary for our Probability consideration of the Distributions probability8 distribution of a 5/16 continuous random variable. >1/2, 2 x < 4 5/16 F(x)=>  The graph of theAcontinuousrandomvariablehasaprobabilityof0ofassuming cumulative distribution function of Example> 3.9, which ap- exactly any of its 4/16 >4/7, 4 x < 7 4/16 <>  pears as a step functionvalues. in Figure Consequently, 3.3, is obtained its probability by plotting the3 distribution/4 points, 7 (xx,< Fcannot10(x)). be given in tabular form. 3/16 3/16 Certain probability distributions are applicable to more than> one physical situ- ation. The probability distribution of Example 3.9, for example,>1, also appliesx 10 to the 2/16 > 2/16 random variable Y , where Y is the number of heads when a> coin is tossed 4 times, :> 1/16 1/16 or to the random variable W , where WFindis the number of red cards that occur when 4 cards are drawn at random from a deck in succession with each card replaced and x x 01234 01234the deck shued before the next drawing.(a) SpecialP(X discrete4),P(X distributions< 4) and P(X that= 4) can be applied to many dierent experimental situations will be considered in Chapter 5. (b) P(X 8),P(X < 8) and P(X = 8) Figure 3.1: Probability mass function plot. EXAMPLEFigure3.7. Refer 3.2: Probability to Example histogram.3.1 (Coin). Find a  formula for the PMF of X when (c) P(X > 2) and P(X > 6) F(x) probabilities is necessary for our consideration of the probability distribution of a 1 (d) P(3 < X 5) continuous random variable. (a) the coin is balanced.  The graph of the cumulative distribution function of Example 3.9, which ap- (b) the coin has probability 0.2 of a head on3/4 any given (e) P(X 7 X > 4) pears as a step function in Figure 3.3, is obtained by plotting the points (x, F (x)).  | tosses. Certain probability distributions are applicable to more than one physical1/2 situ- EXAMPLE 3.10. Refer to Example 3.8 (Interview). ation. The probability distribution(c) ofthe Example coin has 3.9, probability for example,p (0 alsop applies1) of to a the head random variable Y , where Y is the number of heads when a coin is tossed 4 times, on any given toss. 1/4 (a) Find the CDF of X. or to the random variable W , where W is the number of red cards that occur when 4 cards are drawn at random from a deck in succession with each card replaced and x EXAMPLE 3.8 (Interview). Six men and five women0 12(b) Use3 the CDF4 to find the probability that exactly the deck shued before the nextapply drawing. for an executive Special positiondiscrete indistributions a small company. that can Two two women are included in the interview pool. be applied to many dierent experimental situations will be considered in Chapter of the applicants are selected for interview.Figure Let 3.3:X denote Discrete cumulative distribution function. 5. the number of women in the interview pool. (c) Use the CDF to verify 3.8 (b).

F(x) STAT-3611 Lecture Notes 2015 Fall X. Li 1 3.3 Continuous Probability Distributions

3/4 Acontinuousrandomvariablehasaprobabilityof0ofassumingexactly any of its values. Consequently, its probability distribution cannot be given in tabular form. 1/2

1/4

x 0 123 4

Figure 3.3: Discrete cumulative distribution function.

3.3 Continuous Probability Distributions

Acontinuousrandomvariablehasaprobabilityof0ofassumingexactly any of its values. Consequently, its probability distribution cannot be given in tabular form. Section 3.4. Joint Probability Distributions 11

3.3 Continuous Probability Distri- (a) Determine the value k that makes f be a legitimate butions density function. (b) Evaluate P(0 X 1).   Probability Density Function (PDF) EXAMPLE 3.13. Consider the density function

2x The function f (x) is a probability density function 2e if x > 0 (pdf) for the continuous random variable X,defined h(x)= . (0, otherwise over the set of real numbers, if Find i). f (x) 0 for all x R. 3.3 Continuous Probability Distributions 2 89 • (a) P(0 < X < 1) bounded byii). the x axisf ( isx)= equal1. to 1 when computed over the of X for which • (b) P(X > 5) f(x) is defined.Z Should this range of X be a finite , it is always possible to extend the interval to include the entireb set of real numbers by defining f(x)to be zero atiii). all pointsP(a in< theX < extendedb)= portionsf (x) dx of. the interval. In Figure 3.5, theCumulative Distribution Function (CDF) of a con- probability that X assumes a valueZ betweena a and b is equal to the shaded area under the density function between the ordinates at x = a and x = b, and fromtinuous r.v. calculus is given by The cumulative distribution function F(x) of a contin- b uous random variable X with probability density func- P (a

NOTE. A random variable is continuous if and only if its CDF is an everywhere . x a b EXAMPLE 3.14. Find the CDF’s of the random vari- ables in Examples 3.11, 3.12 and 3.13. Graph them. Figure 3.5: P (a 2.5) x y 2 2 3 x x 2 8 1 f(x) dx = dx = 1 = + =1. (c) P(X = 2). 1 3 9 | 9 9 iii). P(X = x,Y = y)= f (x,y). Z Z EXAMPLE 3.12. Consider For any region A in the xy plane, kx2, if 1 x < 2 P[(X,Y) A]=ÂÂf (x,y). f (x)=  . 2 A (0, elsewhere

X. Li 2015 Fall STAT-3611 Lecture Notes 12 Chapter 3. Random Variables and Probability Distributions

EXAMPLE 3.15 (Home). Data supplied by a company Mass Function (Conditional in Duluth, Minnesota, resulted in the PMF) displayed as below for number of bedroom and number Let X and Y be two discrete random variables. The of bathrooms for 50 homes currently for sale. Suppose conditional distribution of Y given that X = x is that one of these 50 homes is selected at random. Let X and Y denote the number of bedrooms and the number f (y x)=P(Y = y X = x) of bathrooms, respectively, of the home obtained. | | P(X = x,Y = y) = P(X = x) x f (x,y) 23 4 = , 2 3 14 2 g(x) 3 0 12 11 y provided P(X = x)=g(x) > 0. 4 02 5 5 00 1 Similarly, the conditional distribution of X given that Y = y is

(a) Determine and interpret f (3,2). f (x y)=P(X = x Y = y) | | P(X = x,Y = y) (b) Obtain the joint PMF of X and Y. = P(Y = y) (c) Find the probability that the home obtained has f (x,y) = , the same number of bedrooms and bathrooms, i.e., h(y) P(X = Y). provided P(Y = y)=h(y) > 0. (d) Find the probability that the home obtained has more bedrooms than bathrooms, i.e., P(X > Y). EXAMPLE 3.18. Refer to Example 3.15 (Home).

(e) Interpret the event X +Y 8 and find its prob- { } (a) Find the distribution of X Y = 2? ability. | (b) Use the result to determine f (3 2)=P(X = 3 Y = 2). | | Marginal Probability Mass Function (Marginal PMF) EXAMPLE 3.19. Refer to Example 3.17 (Movie). Find the conditional distribution of Y, given that X = 1. The marginal distributions of X alone and Y along are, respectively 3.4.2 Joint, Marginal and Conditional PDFs g(x)=Â f (x,y) and h(y)=Â f (x,y). y x Joint Probability Density Function (Joint PDF)

EXAMPLE 3.16. Refer to Example 3.15 (Home). The function f (x,y) is a joint probability density func- tion of the continuous random variables X and Y if (a) Find the of X alone. i). f (x,y) 0 for all (x,y), (b) Find the marginal distribution of Y alone. • • ii). f (x,y) dx dy = 1, • • EXAMPLE 3.17 (Moive). Two movies are randomly Z Z selected from a shelf containing 5 romance movies , 3 iii). P[(X,Y) A]= f (x,y) dx dy, for any region action movies, and 2 horror movies. Denote X be the 2 number of romance movies selected and Y be the num- ZZA in the plane. ber of action movies selected. A xy

(a) Find the joint PMF of X and Y. Marginal Probability Density Function (Marginal (b) Construct a table that gives the joint and marginal PDF) PMFs of X and Y. The marginal distributions of X alone and Y along are, respectively, (c) Express that event that no horror movies are se- lected in terms of X and Y, and then determine its • g(x)= f (x,y) dy probability. • Z

STAT-3611 Lecture Notes 2015 Fall X. Li Section 3.4. Joint Probability Distributions 13

and 3.4.3 Statistical Independence

• h(y)= f (x,y) dx. For two variables Z • Let X and Y be two random variables, discrete or con- tinuous, with joint probability distribution f (x,y) and marginal distributions g(x) and h(y),respectively.The Conditional Probability Density Function (Condi- random variables X and Y are said to be statistically tional PDF) independent if and only if Let X and Y be two continuous random variables. The f (x,y)=g(x)h(y) conditional distribution of Y X = x is | for all (x,y) within their range. f (x,y) EXAMPLE 3.22. Determine whether the variables X f (y x)= , provided g(x) > 0. | g(x) and Y in Example 3.21 are statistically independent. NOTE. We can also determine whether X and Y are sta- Similarly, the conditional distribution of X Y = y is | tistically independent or not by checking if the following holds: f (x,y) f (x y)= , provided h(y) > 0. | h(y) f (x y)=g(x) or f (y x)=h(y) | | EXAMPLE 3.23. Determine whether the variables X and Y in Example 3.20 are statistically independent. EXAMPLE 3.20. Consider the joint probability density function of the random variables X and Y: NOTE. If you wish to show X and Y are NOT statisti- cally independent, it suffices to give a pair of (a,b) such 3x y , if 1 < x < 3, 1 < y < 2 that f (a,b) = g(a)h(b). However, you must formally f (x,y)= 9 . 6 8 verify the definition f (x,y)=g(x)h(y) for ALL the pairs <0, elsewhere (x,y) to claim the statistical independence. EXAMPLE 3.24. Revisit Examples 3.15 (Home). Do : • • (a) Verify that f (x,y) dx dy = 1. you think that X and Y are statistically independent? • • Z Z EXAMPLE 3.25. Consider that the variables X and Y (b) Find the marginal distribution of X alone. have the following joint probability distribution. x (c) Find P(1 < X < 2). 012 0 1/18 1/9 1/6 (d) Find the conditional distribution of Y X = x. y | 1 1/9 2/9 1/3 (e) Find P(0.5 < Y < 1 X = 2). | Determine if X and Y are statistically independent. EXAMPLE 3.21. Consider the joint density function of the random variables X and Y: For three or more variables

Let X1,X2,...,Xn be n random variables, discrete or ke (3x+4y) if x > 0, y > 0 f (x,y)= . continuous, with joint probability distribution f (x1,x2,...,xn) (0 otherwise and marginal distribution f1(x1), f2(x2),..., fn(xn),re- spectively. The random variables X1,X2,...,Xn are said (a) Determine k. to be mutually statistically independent if and only if f (x1,x2,...,xn)= f1(x1) f2(x2) fn(xn) (b) Find P(0 < X < 1,Y > 0). ··· for all (x1,x2,...,xn) within their range. (c) Find the marginal distribution of X alone. EXAMPLE 3.26. The joint PMF of the random vari- ables X, Y and Z is given by (d) Find P(0 < X < 1). x y z (l+µ+k) l µ k f (x,y,z)=e , x,y,z = 0,1,2,... x!y!z! (e) Find the marginal distribution of Y alone. and f (x,y,z)=0 otherwise. Are X, Y and Z of statistical (f) Find P(0 < X < 1 Y = 1). independence? |

X. Li 2015 Fall STAT-3611 Lecture Notes This page is intentionally blank.