Random Variables and Probability Distributions

Site: Saylor Academy
Course: MA121: Introduction to Statistics
Book: Random Variables and Probability Distributions
Printed by: Guest user
Date: Sunday, June 16, 2024, 1:52 PM

Description

This section first defines discrete and continuous random variables. Then, it introduces the distributions for discrete random variables. It also talks about the mean and variance calculations.


LEARNING OBJECTIVES

  1. To learn the concept of a random variable.
  2. To learn the distinction between discrete and continuous random variables.


Definition

A random variable is a numerical quantity that is generated by a random experiment.

We will denote random variables by capital letters, such as X or Z, and the actual values that they can take by lowercase letters, such as x and z.

Table 4.1 "Four Random Variables" gives four examples of random variables. In the second example, the three dots indicates that every counting number is a possible value for X. Although it is highly unlikely, for example, that it would take 50 tosses of the coin to observe heads for the first time, nevertheless it is conceivable, hence the number 50 is a possible value. The set of possible values is infinite, but is still at least countable, in the sense that all possible values can be listed one after another. In the last two examples, by way of contrast, the possible values cannot be individually listed, but take up a whole interval of numbers. In the fourth example, since the light bulb could conceivably continue to shine indefinitely, there is no natural greatest value for its lifetime, so we simply place the symbol \infty for infinity as the right endpoint of the interval of possible values.

Table 4.1 Four Random Variables

Experiment Number X Possible Values of X
Roll two fair dice Sum of the number of dots on the top faces 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
Flip a fair coin repeatedly Number of tosses until the coin lands heads 1, 2, 3,4, …
Measure the voltage at an electrical outlet Voltage measured 118 ≤ x ≤ 122
Operate a light bulb until it burns out Time until the bulb burns out 0 ≤ x < ∞


Definition

A random variable is called discrete if it has either a finite or a countable number of possible values. A random variable is called continuous if its possible values contain a whole interval of numbers.

The examples in the table are typical in that discrete random variables typically arise from a counting process, whereas continuous random variables typically arise from a measurement.



Creative Commons License This text was adapted by Saylor Academy under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License without attribution as requested by the work's original creator or licensor.

  • A random variable is a number generated by a random experiment.
  • A random variable is called discrete if its possible values form a finite or countable set.
  • A random variable is called continuous if its possible values contain a whole interval of numbers.

BASIC

1. Classify each random variable as either discrete or continuous.

a. The number of arrivals at an emergency room between midnight and 6:00 a.m.

b. The weight of a box of cereal labeled "18 ounces".

c. The duration of the next outgoing telephone call from a business office.

d. The number of kernels of popcorn in a 1-pound container.

e. The number of applicants for a job.

3. Classify each random variable as either discrete or continuous.

a. The number of boys in a randomly selected three-child family.

b. The temperature of a cup of coffee served at a restaurant.

c. The number of no-shows for every 100 reservations made with a commercial airline.

d. The number of vehicles owned by a randomly selected household.

e. The average amount spent on electricity each July by a randomly selected household in a certain state.

5. Identify the set of possible values for each random variable. (Make a reasonable estimate based on experience, where necessary.)

a. The number of heads in two tosses of a coin.

b. The average weight of newborn babies born in a particular county one month.

c. The amount of liquid in a 12-ounce can of soft drink.

d. The number of games in the next World Series (best of up to seven games).

e. The number of coins that match when three coins are tossed at once.

1.        

a.       discrete

b.       continuous

c.        continuous

d.       discrete

e.       discrete

3.        

a.       discrete

b.       continuous

c.        discrete

d.       discrete

e.       continuous     

5.        

a. \{0.1 .2\}

b. an interval (a, b) (answers vary)

c. an interval (a, b) (answers vary)

d. \{4,5,6,7\}

e. \{2,3\}



LEARNING OBJECTIVES

  1. To learn the concept of the probability distribution of a discrete random variable.
  2. To learn the concepts of the mean, variance, and standard deviation of a discrete random variable, and how to compute them.


Probability Distributions

Associated to each possible value x of a discrete random variable X is the probability P(x) that X will take the value x in one trial of the experiment.


Definition

The probability distribution of a discrete random variable X is a list of each possible value of X together with the probability that X takes that value in one trial of the experiment.

The probabilities in the probability distribution of a random variable X must satisfy the following two conditions:

1. Each probability P(x) must be between o and 1: 0 \leq P(x) \leq 1.

2. The sum of all the probabilities is 1: \Sigma P(x)=1.


EXAMPLE 1

A fair coin is tossed twice. Let X be the number of heads that are observed.

a. Construct the probability distribution of X.

b. Find the probability that at least one head is observed.

Solution:

a. The possible values that X can take are 0,1 , and 2 . Each of these numbers corresponds to an event in the sample space S=\{h h, h t, t h, t t\} of equally likely outcomes for this experiment: X=0 to \{t t\}, x=1 to \{h t, t h\}, and X=2 to \{h h\}. The probability of each of these events, hence of the corresponding value of X, can be found simply by counting, to give

x 0 1 2
P(x) 0.25 0.50 0.25

This table is the probability distribution of X.

b. "At least one head" is the event x \geq 1, which is the union of the mutually exclusive events x =1 and X=2. Thus

\begin{align*}
P(X \geq 1)=P(1)+P(2)=0.50+0.25=0.75
\end{align*}

A histogram that graphically illustrates the probability distribution is given in Figure 4.1 "Probability Distribution for Tossing a Fair Coin Twice".

Figure 4.1

Probability Distribution for Tossing a Fair Coin Twice



EXAMPLE 2

A pair of fair dice is rolled. Let X denote the sum of the number of dots on the top faces.

a. Construct the probability distribution of X.

b. Find P(X \geq 9).

c. Find the probability that X takes an even value.

Solution:

The sample space of equally likely outcomes is

11 12 13 14 15 16
21 22 23 24 25 26
31 32 33 34 35 36
41 42 43 44 45 46
51 52 53 54 55 56
61 62 63 64 65 66

a. The possible values for X are the numbers 2 through 12 . X=2 is the event \{11\}, so P(2)=1 / 36 . X=3 is the event \{12,21\}, so P(3)=2 / 36. Continuing this way we obtain the table

\begin{array}{c|ccccccccccc}
x & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 \\
\hline P(x) & \frac{1}{36} & \frac{2}{36} & \frac{3}{36} & \frac{4}{36} & \frac{5}{36} & \frac{6}{36} & \frac{5}{36} & \frac{4}{36} & \frac{3}{36} & \frac{2}{36} & \frac{1}{36}
\end{array}

This table is the probability distribution of X.

b. The event X \geq 9 is the union of the mutually exclusive events X=9, X=10, X=11, and X=12. Thus

\begin{align*}
P(X \geq 9)=P(9)+P(10)+P(11)+P(12)=\frac{4}{36}+\frac{3}{36}+\frac{2}{36}+\frac{1}{36}=\frac{10}{36}=0.2 \overline{7}
\end{align*}

c. Before we immediately jump to the conclusion that the probability that x takes an even value must be 0.5, note that X takes six different even values but only five different odd values. We compute

 \begin{align*}
\begin{aligned}
P(X \text { is even }) &=P(2)+P(4)+P(6)+P(8)+P(10)+P(12) \\
&=\frac{1}{36}+\frac{3}{36}+\frac{5}{36}+\frac{5}{36}+\frac{3}{36}+\frac{1}{36}=\frac{18}{36}=0.5
\end{aligned}
\end{align*}

A histogram that graphically illustrates the probability distribution is given in Figure 4.2

"Probability Distribution for Tossing Two Fair Dice".

Figure 4.2

Probability Distribution for Tossing Two Fair Dice



Definition

The mean (also called the expected value) of a discrete random variable X is the number

\begin{align*}
\mu=E(X)=\Sigma x P(x)
\end{align*}

The mean of a random variable may be interpreted as the average of the values assumed by the random variable in repeated trials of the experiment.


EXAMPLE 3

Find the mean of the discrete random variable X whose probability distribution is

\begin{align*}\begin{array}{c|cccc}x & -2 & 1 & 2 & 3.5 \\\hline P(x) & 0.21 & 0.34 & 0.24 & 0.21\end{array}\end{align*}

Solution:

The formula in the definition gives

\begin{align*}
\begin{aligned}
\mu &=\Sigma x P(x) \\
&=(-2) \cdot 0.21+(1) \cdot 0.34+(2) \cdot 0.24+(3.5) \cdot 0.21=1.135
\end{aligned}
\end{align*}


EXAMPLE 4

A service organization in a large town organizes a raffle each month. One thousand raffle tickets are sold for $1 each. Each has an equal chance of winning. First prize is $300, second prize is $200, and third prize is $100. Let X denote the net gain from the purchase of one ticket.

a. Construct the probability distribution of X.

b. Find the probability of winning any money in the purchase of one ticket.

c. Find the expected value of X, and interpret its meaning.

Solution:

a. If a ticket is selected as the first prize winner, the net gain to the purchaser is the $300 prize less the $1 that was paid for the ticket, hence X=300-1=299. There is one such ticket, so P(299)=0.001. Applying the same "income minus outgo" principle to the second and third prize winners and to the 997 losing tickets yields the probability distribution:

\begin{align*}\begin{array}{c|cccc}x & 299 & 199 & 99 & -1 \\\hline P(x) & 0.001 & 0.001 & 0.001 & 0.997\end{array}\end{align*}

b. Let W denote the event that a ticket is selected to win one of the prizes. Using the table

\begin{align*}
P(W)=P(299)+P(199)+P(99)=0.001+0.001+0.001=0.003
\end{align*}

c. Using the formula in the definition of expected value,

\begin{align*}
E(X)=299 \cdot 0.001+199 \cdot 0.001+99 \cdot 0.001+(-1) \cdot 0.997=-0.4
\end{align*}

The negative value means that one loses money on the average. In particular, if someone were to buy tickets repeatedly, then although he would win now and then, on average he would lose 40 cents per ticket purchased.

The concept of expected value is also basic to the insurance industry, as the following simplified example illustrates.


EXAMPLE 5

A life insurance company will sell a $200,000 one-year term life insurance policy to an individual in a particular risk group for a premium of $195. Find the expected value to the company of a single policy if a person in this risk group has a 99.97% chance of surviving one year.

Solution:

Let X denote the net gain to the company from the sale of one such policy. There are two possibilities: the insured person lives the whole year or the insured person dies before the year is up. Applying the { }^{\prime \prime} income minus outgo" principle, in the former case the value of X is 195-0; in the latter case it is 195-200,000=-199,805. Since the probability in the first case is 0.9997 and in the second case is 1-0.9997=0.0003, the probability distribution for X is:

\begin{align*}\begin{array}{c|cc}x & 195 & -199,805 \\\hline P(x) & 0.9997 & 0.0003\end{array}\end{align*}

Therefore

\begin{align*}
E(X)=\Sigma x P(x)=195 \cdot 0.9997+(-199,805) \cdot 0.0003=135
\end{align*}

Occasionally (in fact, 3 times in 10,000) the company loses a large amount of money on a policy, but typically it gains $195, which by our computation of E(X) works out to a net gain of $135 per policy sold, on average.


Definition

The variance, \sigma^{2}, of a discrete random variable X is the number

\begin{align*}
\sigma^{2}=\Sigma(x-\mu)^{2} P(x)
\end{align*}

which by algebra is equivalent to the formula

\begin{align*}
\sigma^{2}=\left[\Sigma x^{2} P(x)\right]-\mu^{2}
\end{align*}


Definition

The standard deviation, \sigma, of a discrete random variable X is the square root of its variance, hence is given by the formulas

\begin{align*}
\sigma=\sqrt{\Sigma(x-\mu)^{2} P(x)}=\sqrt{\left[\Sigma x^{2} P(x)\right]-\mu^{2}}
\end{align*}

The variance and standard deviation of a discrete random variable X may be interpreted as measures of the variability of the values assumed by the random variable in repeated trials of the experiment. The units on the standard deviation match those of X.


EXAMPLE 6

A discrete random variable X has the following probability distribution:

\begin{align*}\begin{array}{c|cccc}x & -1 & 0 & 1 & 4 \\\hline P(x) & 0.2 & 0.5 & a & 0.1\end{array}\end{align*}

A histogram that graphically illustrates the probability distribution is given in Figure 4.3 "Probability Distribution of a Discrete Random Variable".

Figure 4.3

Probability Distribution of a Discrete Random Variable


Compute each of the following quantities.

a. a.

b. P(0).

c. P(X>0).

d. P(X \geq 0).

e. P(X \leq-2)

f. The mean \mu of X.

g. The variance \sigma^{2} of X.

h. The standard deviation \sigma of X.

Solution:

a. Since all probabilities must add up to 1, a=1-(0.2+0.5+0.1)=0.2.

b. Directly from the table, P(0)=0.5.

c. From the table, P(X>0)=P(1)+P(4)=0.2+0.1=0.3.

d. From the table, P(X \geq 0)=P(0)+P(1)+P(4)=0.5+0.2+0.1=0.8.

e. Since none of the numbers listed as possible values for X is less than or equal to -2, the event X \leq -2 is impossible, so P(X \leq-2)=0

f. Using the formula in the definition of \mu,

\begin{align*}\mu=\Sigma x P(x)=(-1) \cdot 0.2+0 \cdot 0.5+1 \cdot 0.2+4 \cdot 0.1=0.4\end{align*}

g. Using the formula in the definition of \sigma^{2} and the value of \mu that was just computed,

\begin{align*}\begin{aligned}\sigma^{2} &=\Sigma(x-\mu)^{2} P(x) \\&=(-1-0.4)^{2} \cdot 0.2+(0-0.4)^{2} \cdot 0.5+(1-0.4)^{2} \cdot 0.2+(4-0.4)^{2} \cdot 0.1 \\&=1.84\end{aligned}\end{align*}

h. Using the result of part (g), \sigma=\sqrt{1.84}=1.3565.

  • The probability distribution of a discrete random variable X is a listing of each possible value x taken by X along with the probability P(x) that X takes that value in one trial of the experiment. 
  • The mean \mu of a discrete random variable X is a number that indicates the average value of X over numerous trials of the experiment. It is computed using the formula \mu=\Sigma x P(x)
  • The variance \sigma^{2} and standard deviation \sigma of a discrete random variable X are numbers that indicate the variability of X over numerous trials of the experiment. They may be computed using the formula \sigma^{2}=\left[\Sigma x^{2} P(x)\right]-\mu^{2}, taking the square root to obtain \sigma.


BASIC

1. Determine whether or not the table is a valid probability distribution of a discrete random variable. Explain fully.

a.

\begin{align*}
    \begin{array}{c|cccc}
    x & -2 & 0 & 2 & 4 \\
    \hline P(x) & 0.3 & 0.5 & 0.2 & 0.1
    \end{array}
    \end{align*}

b.

\begin{align*}
    \begin{array}{c|ccc}
    x & 0.5 & 0.25 & 0.25 \\
    \hline P(x) & -0.4 & 0.6 & 0.8
    \end{array}
    \end{align*}

c.

\begin{align*}\begin{array}{c|ccccc}
    x & 1.1 & 2.5 & 4.1 & 4.6 & 5.3 \\
    \hline P(x) & 0.16 & 0.14 & 0.11 & 0.27 & 0.22
    \end{array}\end{align*}


3. A discrete random variable X has the following probability distribution:

\begin{align*}
\begin{array}{c|ccccc}
x & 77 & 78 & 79 & 80 & 81 \\
\hline P(x) & 0.15 & 0.15 & 0.20 & 0.40 & 0.10
\end{array}
\end{align*}

Compute each of the following quantities.

a. P(80).

b. P(X>80).

c. P(X \leq 80).

d. The mean \mu of X.

e. The variance \sigma^{2} of X.

f. The standard deviation \sigma of X.

5. If each die in a pair is "loaded" so that one comes up half as often as it should, six comes up half again as often as it should, and the probabilities of the other faces are unaltered, then the probability distribution for the sum X of the number of dots on the top faces when the two are rolled is

\begin{aligned}
&\begin{array}{c|cccccc}
x & 2 & 3 & 4 & 5 & 6 & 7 \\
\hline P(x) & \frac{1}{144} & \frac{4}{144} & \frac{8}{144} & \frac{12}{144} & \frac{16}{144} & \frac{22}{144}
\end{array}\\
&\begin{array}{c|ccccc}
x & 8 & 9 & 10 & 11 & 12 \\
\hline P(x) & \frac{24}{144} & \frac{20}{144} & \frac{16}{144} & \frac{12}{144} & \frac{9}{144}
\end{array}

\end{aligned}

Compute each of the following.

a. P(5 \leq X \leq 9).

b. P(X \geq 7).

c. The mean \mu of X. (For fair dice this number is 7 .)

d. The standard deviation \sigma of X. (For fair dice this number is about 2.415.)


APPLICATIONS

7. In a hamster breeder's experience the number X of live pups in a litter of a female not over twelve months in age who has not borne a litter in the past six weeks has the probability distribution

\begin{align*}
\begin{array}{c|ccccccc}
x & 3 & 4 & 5 & 6 & 7 & 8 & 9 \\
\hline P(x) & 0.04 & 0.10 & 0.26 & 0.31 & 0.22 & 0.05 & 0.02
\end{array}
\end{align*}

a. Find the probability that the next litter will produce five to seven live pups.

b. Find the probability that the next litter will produce at least six live pups.

c. Compute the mean and standard deviation of X. Interpret the mean in the context of the problem.

9. Let X denote the number of boys in a randomly selected three-child family. Assuming that boys and girls are equally likely, construct the probability distribution of X.

11. Five thousand lottery tickets are sold for $1 each. One ticket will win $1,000, two tickets will win $500 each, and ten tickets will win $100 each. Let X denote the net gain from the purchase of a randomly selected ticket.

a. Construct the probability distribution of X.

b. Compute the expected value E(X) of X . Interpret its meaning.

c. Compute the standard deviation \sigma of X.

13. An insurance company will sell a $90,000 one-year term life insurance policy to an individual in a particular risk group for a premium of $478. Find the expected value to the company of a single policy if a person in this risk group has a 99.62% chance of surviving one year.

15. An insurance company estimates that the probability that an individual in a particular risk group will survive one year is 0.9825. Such a person wishes to buy a $150,000 one-year term life insurance policy. Let C denote how much the insurance company charges such a person for such a policy.

a. Construct the probability distribution of X. (Two entries in the table will contain C.)

b. Compute the expected value E(X) of X.

c. Determine the value C must have in order for the company to break even on all such policies (that is, to average a net gain of zero per policy on such policies).

d. Determine the value C must have in order for the company to average a net gain of $250 per policy on all such policies.

17. A roulette wheel has 38 slots. Thirty-six slots are numbered from 1 to 36 ; half of them are red and half are black. The remaining two slots are numbered 0 and 00 and are green. In a $1 bet on red, the bettor pays $1 to play. If the ball lands in a red slot, he receives back the dollar he bet plus an additional dollar. If the ball does not land on red he loses his dollar. Let X denote the net gain to the bettor on one play of the game.

a. Construct the probability distribution of X.

b. Compute the expected value E(X) of X, and interpret its meaning in the context of the problem.

c. Compute the standard deviation of X.

19. The time, to the nearest whole minute, that a city bus takes to go from one end of its route to the other has the probability distribution shown. As sometimes happens with probabilities computed as empirical relative frequencies, probabilities in the table add up only to a value other than 1.00 because of round-off error.

\begin{align*}
\begin{array}{c|cccccc}
x & 42 & 43 & 44 & 45 & 46 & 47 \\
\hline P(x) & 0.10 & 0.23 & 0.34 & 0.25 & 0.05 & 0.02
\end{array}
\end{align*}

a. Find the average time the bus takes to drive the length of its route.

b. Find the standard deviation of the length of time the bus takes to drive the length of its route.


ADDITIONAL EXERCISES

21. The number X of nails in a randomly selected 1-pound box has the probability distribution shown. Find the average number of nails per pound.

\begin{align*}
\begin{array}{c|ccc}
x & 100 & 101 & 102 \\
\hline P(x) & 0.01 & 0.96 & 0.03
\end{array}
\end{align*}

23. Two fair dice are rolled at once. Let X denote the difference in the number of dots that appear on the top faces of the two dice. Thus for example if a one and a five are rolled, X=4, and if two sixes are rolled, X= 0 .

a. Construct the probability distribution for X.

b. Compute the mean \mu of X.

c. Compute the standard deviation \sigma of X.

25. A manufacturer receives a certain component from a supplier in shipments of 100 units. Two units in each shipment are selected at random and tested. If either one of the units is defective the shipment is rejected. Suppose a shipment has 5 defective units.

a. Construct the probability distribution for the number X of defective units in such a sample. (A tree diagram is helpful.)

b. Find the probability that such a shipment will be accepted.

27. The owner of a proposed outdoor theater must decide whether to include a cover that will allow shows to be performed in all weather conditions. Based on projected audience sizes and weather conditions, the probability distribution for the revenue X per night if the cover is not installed is

Weather x P(x)
Clear $3,000 0.61
Threatening $2,800 0.17
Light rain $1,975 0.11
Show-cancelling rain $0 0.11

The additional cost of the cover is $410,000. The owner will have it built if this cost can be recovered from the increased revenue the cover affords in the first ten 90-night seasons.

a. Compute the mean revenue per night if the cover is not installed.

b. Use the answer to (a) to compute the projected total revenue per 90-night season if the cover is not installed.

c. Compute the projected total revenue per season when the cover is in place. To do so assume that if the cover were in place the revenue each night of the season would be the same as the revenue on a clear night.

d. Using the answers to (b) and (c), decide whether or not the additional cost of the installation of the cover will be recovered from the increased revenue over the first ten years. Will the owner have the cover installed

1.

a. no: the sum of the probabilities exceeds 1

b. no: a negative probability

c. no: the sum of the probabilities is less than 1

3.

a. 0.4

b. 0.1

c. 0.9

d. 79.15

e. σ2=1.5275

f. σ = 1.2359

5.

a. 0.6528

b. 0.7153

c. μ = 7.8333

d. σ2=5.4866

e. σ = 2.3424

7.

a. 0.79

b. 0.60

c. μ = 5.8, σ = 1.2570

9.

\begin{align*}\begin{array}{c|cccc}x & 0 & 1 & 2 & 3 \\\hline P(x) & 1 / 8 & 3 / 8 & 3 / 8 & 1 / 8\end{array}\end{align*}

11.

a. 

\begin{align*}\begin{array}{c|cccc}x & -1 & 999 & 499 & 99 \\\hline P(x) & \frac{4987}{5000} & \frac{1}{5000} & \frac{2}{5000} & \frac{10}{5000}\end{array}\end{align*}

b. −0.4

c. 17.8785

13. 136

15.

a. 

\begin{align*}\begin{array}{c|cc}x & C & C-150,000 \\\hline P(x) & 0.9825 & 0.0175\end{array}\end{align*}

b. C−2625

c. C ≥ 2625

d. C ≥ 2875

17.

a. 

\begin{align*}\begin{array}{c|cc}x & -1 & 1 \\\hline P(x) & \frac{20}{38} & \frac{18}{38}\end{array}\end{align*}

b. E(X)=−0.0526 In many bets the bettor sustains an average loss of about 5.25 cents per bet.

c. 0.9986

19.

a. 43.54

b. 1.2046

21. 101.02

23.

a. 

\begin{align*}\begin{array}{c|cccccc}x & 0 & 1 & 2 & 3 & 4 & 5 \\\hline P(x) & \frac{6}{36} & \frac{10}{36} & \frac{8}{36} & \frac{6}{36} & \frac{4}{36} & \frac{2}{36}\end{array}\end{align*}

b. 1.9444

c. 1.4326

25.

a. 

\begin{align*}\begin{array}{c|ccc}x & 0 & 1 & 2 \\\hline P(x) & 0.902 & 0.096 & 0.002\end{array}\end{align*}

b. 0.902

27.

a. 2523.25

b. 227,092.5

c. 270,000

d. The owner will install the cover.