Random Variables and Probability Distributions: A Comprehensive Guide with Exercises, Exercises of Statistics

Questions on probability density functions and expected values.

Typology: Exercises

2019/2020

Uploaded on 03/26/2020

Phoenixp
Phoenixp 🇿🇦

4

(1)

5 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CHAPTER 3
RANDOM VARIABLES AND PROBABILITY DISTRIBUTIONS
3.1 Concept of a Random Variable
Random Variable
Arandom variable is a function that associates a real
number with each element in the sample space.
In other words, a random variable is a function
X:S!R,whereSis the sample space of the random
experiment under consideration.
NOTE.By convention, we use a capital letter, say X,
to denote a random variable, and use the corresponding
lower-case letter xto denote the realization (values) of
the random variable.
EXAMPLE 3.1 (Coin).Consider the random experi-
ment of tossing a coin three times and observing the re-
sult (a Head or a Tail) for each toss. Let Xdenote the
total number of heads obtained in the three tosses of the
coin.
(a) Construct a table that shows the values of the ran-
dom variable Xfor each possible outcome of the
random experiment.
(b) Identify the event {X1}in words.
Let Ydenote the difference between the number of heads
obtained and the number of tails obtained.
(c) Construct a table showing the value of Yfor each
possible outcome.
(d) Identify the event {Y=0}in words.
EXAMPLE 3.2. Suppose that you play a certain lottery
by buying one ticket per week. Let Wbe the number of
weeks until you win a prize.
(a) Is Wa random variable? Brief explain.
(b) Identify the following events in words: (i) {W>
1}, (ii) {W10}, and (iii) {15 W<20}
EXAMPLE 3.3. A major metropolitan newspaper asked
whether the paper should increase its coverage of local
news. Let Xdenote the proportion of readers who would
like more coverage of local news. Is Xa random vari-
able? What does it mean by saying 0.6<x<0.7?
EXAMPLE 3.4. Denote Tbe the survival time for the
prostate cancer patients in a local hospital. Explain why
Tis a random variable.
Discrete Random Variable
If a sample space contains a finite number of possibil-
ities or an unending sequence with as many elements
as there are whole numbers (countable), it is called a
discrete sample space. A random variable is called a
discrete random variable if its set of possible outcomes
is countable.
Continuous Random Variable
If a sample space contains an infinite number of pos-
sibilities equal to the number of points on a line seg-
ment, it is called a continuous sample space. When
a random variable can take on values on a continuous
scale, it is called a continuous random variable.
EXAMPLE 3.5. Categorize the random variables in the
above examples to be discrete or continuous.
3.2 Discrete Probability Distributions
The probability distribution of a discrete random vari-
able Xlists the values and their probabilities.
Value of X x1x2x3··· xk
Probability p1p2p3··· pk
where
0pi1and p1+p2+···+pk=1
pf3
pf4
pf5

Partial preview of the text

Download Random Variables and Probability Distributions: A Comprehensive Guide with Exercises and more Exercises Statistics in PDF only on Docsity!

CHAPTER 3

RANDOM VARIABLES AND PROBABILITY DISTRIBUTIONS

3.1 Concept of a Random Variable

Random Variable

A random variable is a function that associates a real number with each element in the sample space.

In other words, a random variable is a function X : S! R, where S is the sample space of the random experiment under consideration.

N OTE. By convention, we use a capital letter, say X, to denote a random variable, and use the corresponding lower-case letter x to denote the realization (values) of the random variable.

E XAMPLE 3.1 (Coin). Consider the random experi- ment of tossing a coin three times and observing the re- sult (a Head or a Tail) for each toss. Let X denote the total number of heads obtained in the three tosses of the coin.

(a) Construct a table that shows the values of the ran- dom variable X for each possible outcome of the random experiment.

(b) Identify the event {X  1 } in words.

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 possible outcome.

(d) Identify the event {Y = 0 } in words.

E XAMPLE 3.2. Suppose that you play a certain lottery by buying one ticket per week. Let W be the number of weeks until you win a prize.

(a) Is W a random variable? Brief explain.

(b) Identify the following events in words: (i) {W > 1 }, (ii) {W  10 }, and (iii) { 15  W < 20 }

E XAMPLE 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- able? What does it mean by saying 0. 6 < x < 0 .7? E XAMPLE 3.4. Denote T be the survival time for the prostate cancer patients in a local hospital. Explain why T is a random variable.

Discrete Random Variable If a sample space contains a finite number of possibil- ities or an unending sequence with as many elements as there are whole numbers (countable), it is called a discrete sample space. A random variable is called a discrete random variable if its set of possible outcomes is countable.

Continuous Random Variable If a sample space contains an infinite number of pos- sibilities equal to the number of points on a line seg- ment, it is called a continuous sample space. When a random variable can take on values on a continuous scale, it is called a continuous random variable. E XAMPLE 3.5. Categorize the random variables in the above examples to be discrete or continuous.

3.2 Discrete Probability Distributions

The probability distribution of a discrete random vari- able X lists the values and their probabilities.

Value of X x 1 x 2 x 3 · · · x (^) k Probability p 1 p 2 p 3 · · · pk

where 0  p (^) i  1 and p 1 + p 2 + · · · + pk = 1

10 Chapter 3. Random Variables and Probability Distributions E XAMPLE 3.6. Determine the value of k so that the function f (x) = k

x 2 + 1

for x = 0 , 1 , 3 , 5 can be a legit- imate probability distribution of a discrete random vari- able. Probability Mass Function (PMF) The set of ordered pairs (x, f (x)) is a probability func- tion, probability mass function, or probability distri- bution of the discrete random variable X if, for each possible outcome x, i). f (x) 0 ,

ii). Â

x f (x) = 1 , iii). P (X = x) = f (x). 3.3 Continuous Probability Distributions 87 x f ( x ) 0 1 2 3 4 1/ 2/ 3/ 4/ 5/ 6/ Figure 3.1: Probability mass function plot. 0 1 2 3 4 x f ( x ) 1/ 2/ 3/ 4/ 5/ 6/ Figure 3.2: Probability histogram. probabilities is necessary for our consideration of the probability distribution of a continuous random variable. The graph of the cumulative distribution function of Example 3.9, which ap- pears as a step function in Figure 3.3, is obtained by plotting the points (x, F (x)). Certain probability distributions are applicable to more than one physical situ- ation. The probability distribution of Example 3.9, for example, also applies to the 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 4 cards are drawn at random from a deck in succession with each card replaced and the deck shued before the next drawing. Special discrete distributions that can be applied to many dierent experimental situations will be considered in Chapter

F(x) x 1/ 1/ 3/ 1 0 1 2 3 4 Figure 3.3: Discrete cumulative distribution function.

3.3 Continuous Probability Distributions

ns 87 x n plot. 0 1 2 3 4 x f ( x ) 1/ 2/ 3/ 4/ 5/ 6/ Figure 3.2: Probability histogram. cessary for our consideration of the probability distribution of a om variable. he cumulative distribution function of Example 3.9, which ap- ction in Figure 3.3, is obtained by plotting the points ( x, F (x)). ability distributions are applicable to more than one physical situ- bility distribution of Example 3.9, for example, also applies to the Y , where Y is the number of heads when a coin is tossed 4 times, ariable W , where W is the number of red cards that occur when at random from a deck in succession with each card replaced and d before the next drawing. Special discrete distributions that can y di erent experimental situations will be considered in Chapter F(x) 1 EXAMPLE 3.7. Refer to Example 3.1 (Coin). Find a formula for the PMF of X when (a) the coin is balanced. (b) the coin has probability 0.2 of a head on any given tosses. (c) the coin has probability p (0  p  1) of a head on any given toss. EXAMPLE 3.8 (Interview). Six men and five women apply for an executive position in a small company. Two of the applicants are selected for interview. Let X denote the number of women in the interview pool. (a) Find the PMF of X, assuming that the selection is done randomly. Plot it. (b) What is the probability that at least one woman is included in the interview pool? Cumulative Distribution Function (CDF) of a disc. r.v. The cumulative distribution function F(x) of a discrete random variable X with probability mass function f (x) is F(x) = P (X  x)

= Â

tx f (t), for • < x < •. 0 1 2 3 4^ x 1/ 2/ 3/ Figure 3.1: Probability mass function plot. 0 1 2 3 4 x 1/ 2/ 3/ Figure 3.2: Probability histogram. probabilities is necessary for our consideration of the probability distribution of a continuous random variable. The graph of the cumulative distribution function of Example 3.9, which ap- pears as a step function in Figure 3.3, is obtained by plotting the points (x, F (x)). Certain probability distributions are applicable to more than one physical situ- ation. The probability distribution of Example 3.9, for example, also applies to the 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 4 cards are drawn at random from a deck in succession with each card replaced and the deck shued before the next drawing. Special discrete distributions that can be applied to many dierent experimental situations will be considered in Chapter

F(x) x 1/ 1/ 3/ 1 0 1 2 3 4 Figure 3.3: Discrete cumulative distribution function.

3.3 Continuous Probability Distributions

A continuous random variable has a probability of 0 of assuming exactly any of its values. Consequently, its probability distribution cannot be given in tabular form. EXAMPLE 3.9. Given that the CDF F(x) =

0 , x < 1 1 / 3 , 1  x < 2 1 / 2 , 2  x < 4 4 / 7 , 4  x < 7 3 / 4 , 7  x < 10 1 , x 10 Find (a) P (X  4 ), P (X < 4 ) and P (X = 4 ) (b) P (X  8 ), P (X < 8 ) and P (X = 8 ) (c) P (X > 2 ) and P (X > 6 ) (d) P ( 3 < X  5 ) (e) P (X  7 |X > 4 ) EXAMPLE 3.10. Refer to Example 3.8 (Interview). (a) Find the CDF of X. (b) Use the CDF to find the probability that exactly two women are included in the interview pool. (c) Use the CDF to verify 3.8 (b). STAT-3611 Lecture Notes 2015 Fall X. Li

12 Chapter 3. Random Variables and Probability Distributions

E XAMPLE 3.15 (Home). Data supplied by a company in Duluth, Minnesota, resulted in the contingency table displayed as below for number of bedroom and number of bathrooms for 50 homes currently for sale. Suppose that one of these 50 homes is selected at random. Let X and Y denote the number of bedrooms and the number of bathrooms, respectively, of the home obtained.

x 2 3 4

y

(a) Determine and interpret f ( 3 , 2 ).

(b) Obtain the joint PMF of X and Y.

(c) Find the probability that the home obtained has the same number of bedrooms and bathrooms, i.e., P (X = Y ).

(d) Find the probability that the home obtained has more bedrooms than bathrooms, i.e., P (X > Y ).

(e) Interpret the event {X +Y 8 } and find its prob- ability.

Marginal Probability Mass Function (Marginal PMF) The marginal distributions of X alone and Y along are, respectively

g(x) = Â

y

f (x, y) and h(y) = Â

x

f (x, y).

E XAMPLE 3.16. Refer to Example 3.15 (Home).

(a) Find the marginal distribution of X alone.

(b) Find the marginal distribution of Y alone.

E XAMPLE 3.17 (Moive). Two movies are randomly selected from a shelf containing 5 romance movies , 3 action movies, and 2 horror movies. Denote X be the number of romance movies selected and Y be the num- ber of action movies selected.

(a) Find the joint PMF of X and Y.

(b) Construct a table that gives the joint and marginal PMFs of X and Y.

(c) Express that event that no horror movies are se- lected in terms of X and Y , and then determine its probability.

Conditional Probability Mass Function (Conditional PMF) Let X and Y be two discrete random variables. The conditional distribution of Y given that X = x is

f (y|x) = P (Y = y|X = x)

=

P (X = x,Y = y) P (X = x)

= f (x, y) g(x)

provided P (X = x) = g(x) > 0. Similarly, the conditional distribution of X given that Y = y is

f (x|y) = P (X = x|Y = y)

= P (X = x,Y = y) P (Y = y)

=

f (x, y) h(y)

provided P (Y = y) = h(y) > 0.

E XAMPLE 3.18. Refer to Example 3.15 (Home).

(a) Find the distribution of X|Y = 2?

(b) Use the result to determine f ( 3 | 2 ) = P (X = 3 |Y = 2 ).

E XAMPLE 3.19. Refer to Example 3.17 (Movie). Find the conditional distribution of Y , given that X = 1.

3.4.2 Joint, Marginal and Conditional PDFs

Joint Probability Density Function (Joint PDF) The function f (x, y) is a joint probability density func- tion of the continuous random variables X and Y if

i). f (x, y) 0 for all (x, y),

ii).

Z (^) •

Z (^) •

f (x, y) dx dy = 1 ,

iii). P [(X,Y ) 2 A] =

Z Z

A

f (x, y) dx dy, for any region

A in the xy plane.

Marginal Probability Density Function (Marginal PDF) The marginal distributions of X alone and Y along are, respectively,

g(x) =

Z (^) •

f (x, y) dy

STAT-3611 Lecture Notes 2015 Fall X. Li

Section 3.4. Joint Probability Distributions 13

and

h(y) =

Z (^) •

f (x, y) dx.

Conditional Probability Density Function (Condi- tional PDF) Let X and Y be two continuous random variables. The conditional distribution of Y |X = x is

f (y|x) =

f (x, y) g(x)

, provided g(x) > 0.

Similarly, the conditional distribution of X|Y = y is

f (x|y) = f (x, y) h(y)

, provided h(y) > 0.

E XAMPLE 3.20. Consider the joint probability density function of the random variables X and Y :

f (x, y) =

3 x y 9 , if 1 < x < 3, 1 < y < 2 0 , elsewhere

(a) Verify that

Z (^) •

Z (^) •

f (x, y) dx dy = 1.

(b) Find the marginal distribution of X alone.

(c) Find P ( 1 < X < 2 ).

(d) Find the conditional distribution of Y |X = x.

(e) Find P ( 0. 5 < Y < 1 |X = 2 ).

E XAMPLE 3.21. Consider the joint density function of the random variables X and Y :

f (x, y) =

ke (^3 x+^4 y)^ if x > 0, y > 0 0 otherwise

(a) Determine k.

(b) Find P ( 0 < X < 1 ,Y > 0 ).

(c) Find the marginal distribution of X alone.

(d) Find P ( 0 < X < 1 ).

(e) Find the marginal distribution of Y alone.

(f) Find P ( 0 < X < 1 |Y = 1 ).

3.4.3 Statistical Independence

For two variables 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 random variables X and Y are said to be statistically independent if and only if f (x, y) = g(x)h(y) for all (x, y) within their range. E XAMPLE 3.22. Determine whether the variables X and Y in Example 3.21 are statistically independent. N OTE. We can also determine whether X and Y are sta- tistically independent or not by checking if the following holds: f (x|y) = g(x) or f (y|x) = h(y) E XAMPLE 3.23. Determine whether the variables X and Y in Example 3.20 are statistically independent. N OTE. If you wish to show X and Y are NOT statisti- cally independent, it suffices to give a pair of (a, b) such that f (a, b) 6 = g(a)h(b). However, you must formally verify the definition f (x, y) = g(x)h(y) for ALL the pairs (x, y) to claim the statistical independence. E XAMPLE 3.24. Revisit Examples 3.15 (Home). Do you think that X and Y are statistically independent? E XAMPLE 3.25. Consider that the variables X and Y have the following joint probability distribution.

x 0 1 2 y

Determine if X and Y are statistically independent.

For three or more variables Let X 1 , X 2 ,... , Xn be n random variables, discrete or continuous, with joint probability distribution f (x 1 , x 2 ,... , xn ) and marginal distribution f 1 (x 1 ), f 2 (x 2 ),... , f (^) n (x (^) n ), re- spectively. The random variables X 1 , X 2 ,... , Xn are said to be mutually statistically independent if and only if f (x 1 , x 2 ,... , x (^) n ) = f 1 (x 1 ) f 2 (x 2 ) · · · f (^) n (x (^) n ) for all (x 1 , x 2 ,... , x (^) n ) within their range. E XAMPLE 3.26. The joint PMF of the random vari- ables X, Y and Z is given by

f (x, y, z) = e(l^ +μ+k)^

l x^ μ y^ k z x!y!z!

, x, y, z = 0 , 1 , 2 ,...

and f (x, y, z) = 0 otherwise. Are X, Y and Z of statistical independence?

X. Li 2015 Fall STAT-3611 Lecture Notes