Access this content offline
Omniguides
Skip to the reading

3.5 Transforming and Combining Random Variables

Section Overview

  • Figure 3.5.1
  • Example 3.5.1
  • Example 3.5.2
  • Gallery 3.5.1 – Prob. Dist. of Rand. Vars.
  • Example 3.5.3
  • Pop Quiz 3.5.1

Transforming Random Variables

In Chapter 1.4, we discussed how the measures of data – shape, center, location, and spread – could be changed when adding by a constant aa, multiplying by a constant bb, or both. Similar principles apply when we attempt to transform random variables. The outcomes for the shape, center, and spread of the probability distribution can be seen in Figure 3.5.1.

Combining Random Variables

A concept that was not covered when dealing with data was combining multiple data sets. It is possible, however, to combine random variables, namely through addition and subtraction. The mean is changed rather predictably when adding or subtracting random variables, but to find the variance of two or more random variables, we must make sure that our random variables are independent. In Chapter 3.2 we defined independence as the probability of an event occurring not depending on the probability of another event occurring.

In this section, we define independence as the values of one random variable not being affected by the values of another random variable. This also applies to Normal random variables. We can again refer to Figure 3.5.1 for how the shape, center, and spread are changed when combining random variables.

If these rules aren’t clear at first, the following example problems will hopefully clear things up:

Figure 3.5.1

Transforming and combining random variables, as printed in Figure 3.5.1.
Random VariableShapeCenterSpread
xx (random variable in probability distribution)shape of prob. distributionμx\mu_xσx\sigma_x
a+xa+xsame as xa+μxa+\mu_xsame as x
bxbxsame as xbμxb\mu_x∣b∣σx|b|\sigma_x
a+bxa+bxsame as xa+bμxa+b\mu_x∣b∣σx|b|\sigma_x
x+yx+yformed from x + yμx+μy\mu_x+\mu_yσx2+σy2\sigma_x^2+\sigma_y^2 (if x + y independent)
x−yx-yformed from x + yμx−μy\mu_x-\mu_yσx2+σy2\sigma_x^2+\sigma_y^2 (if x + y independent)
Source gap (S0281): Source inconsistency: Figure 3.5.1 prints a sum of variances in the “Spread” column for both combined variables, while the other entries use standard deviations. The x − y row also says “formed from x + y” and “if x + y independent.” These entries are retained as captured.

Example 3.5.1

You work for Day Tours and More, a company that recruits, employs, and trains individuals native to popular vacation spots to provide day-long tours to small groups. The tours include four local attractions, three meals, and lodging for the night at the native’s home. You offer reservations for up to 5 people at a time, and the number of people per reservation XX on a randomly selected day has the following probability distribution:

Number of people per reservation X.
# of People12345
Probability0.050.100.250.450.15

a) Find the mean of the probability distribution.

b) Find the standard deviation of the probability distribution.

c) Find the mean and standard deviation of the probability distribution for the total revenue you make in a day. You make $175 for every person on the tour.

d) Find the mean and standard deviation of the probability distribution for the total profit you make in a day after all costs are accounted for. It costs you a flat $150 for every tour.

Example 3.5.1 — recorded answer

a) The mean of the probability distribution of random variable XX can be calculated as follows:

μX=∑xipi=x1p1+x2p2+⋯+xnpn\mu_X=\sum x_i p_i=x_1p_1+x_2p_2+\cdots+x_np_n
=(1)(0.05)+(2)(0.10)+(3)(0.25)+(4)(0.45)+(5)(0.15)=3.55=(1)(0.05)+(2)(0.10)+(3)(0.25)+(4)(0.45)+(5)(0.15)=3.55

You will get an average of 3.55 people on any given day.

b) To find the standard deviation, we will first need to find the variance. The variance of the probability distribution can be calculated as follows:

σX2=∑(xi−μX)2pi\sigma_X^2=\sum(x_i-\mu_X)^2p_i
=(x1−μX)2p1+⋯+(xn−μX)2pn=(x_1-\mu_X)^2p_1+\cdots+(x_n-\mu_X)^2p_n
=(1−3.55)2(0.05)+(2−3.55)2(0.10)+(3−3.55)2(0.25)+(4−3.55)2(0.45)+(5−3.55)2(0.15)=1.0475=(1-3.55)^2(0.05)+(2-3.55)^2(0.10)+(3-3.55)^2(0.25)+(4-3.55)^2(0.45)+(5-3.55)^2(0.15)=1.0475

Calculating the square root of the variance, we get:

1.0475=1.0235\sqrt{1.0475}=1.0235

The number of people you get will differ day-by-day by an average of about 1.0235.

c) To find the mean and standard deviation for the total revenue made per day, we multiply the probability distribution of random variable XX by 175. Any time we add or multiply by a constant, we are linearly transforming the probability distribution.

Multiplying by a constant means that we have b=175b=175. Our new random variable becomes RX=175XR_X=175X, where random variable RXR_X is the revenue.

Using Figure 3.5.1 to calculate the mean:

μRX=175μX=175(3.55)=621.25\mu_{R_X}=175\mu_X=175(3.55)=621.25

You will make an average of $621.25 in revenue per day.

Calculating the standard deviation, we get:

σRX=175σRX=175(1.0235)=179.11\sigma_{R_X}=175\sigma_{R_X}=175(1.0235)=179.11

The amount of revenue you make will differ day-by-day by an average of about $179.11.

Source gap (S0283): Source notation: The second standard deviation in this equation is printed as σ with subscript Rₓ, just like the first. The captured notation is retained.

d) To find the mean and standard deviation for the total profit made per day after costs, we multiply the probability distribution of random variable XX by 175 and add by a=−150a=-150.

With linear transformation, our new random variable becomes P=−150+175XP=-150+175X, where random variable PP is the profit.

Using Figure 3.5.1 to calculate the mean:

μP=−150+175μX=−150+175(3.55)=471.25\mu_P=-150+175\mu_X=-150+175(3.55)=471.25

You will make an average of $471.25 per day after costs.

The standard deviation remains unchanged from part (c), so σP=179.11\sigma_P=179.11.

Example 3.5.2

Your friend who lives abroad has also decided to become a tour guide for Day Tours and More. Your friend decides to allow up to 4 people on their day tours and the number of people per reservation YY on a randomly selected day has the following probability distribution:

Number of people per reservation Y.
# of People1234
Probability0.100.250.250.40

a) Find the mean of the probability distribution.

b) Find the standard deviation of the probability distribution.

c) Find the mean and standard deviation for the total revenue your friend makes in a day. They make $200 for every person on the tour.

d) Find the probability that you and your friend on a given day have reservations for a combined total of 7 people.

e) Find the mean for the combined total revenue you and your friend make.

f) Find the standard deviation for the difference in revenue you and your friend make.

Example 3.5.2 — recorded answer

a) The mean of the probability distribution of random variable YY can be calculated as follows:

μY=∑yipi=y1p1+y2p2+⋯+ynpn\mu_Y=\sum y_i p_i=y_1p_1+y_2p_2+\cdots+y_np_n
=(1)(0.10)+(2)(0.25)+(3)(0.25)+(4)(0.40)=2.95=(1)(0.10)+(2)(0.25)+(3)(0.25)+(4)(0.40)=2.95

Your friend will get an average of 2.95 people on any given day.

b) To find the standard deviation, we will first need to find the variance. The variance of the probability distribution can be calculated as follows:

σY2=∑(yi−μY)2pi=(y1−μY)2p1+⋯+(yn−μY)2pn\sigma_Y^2=\sum(y_i-\mu_Y)^2p_i=(y_1-\mu_Y)^2p_1+\cdots+(y_n-\mu_Y)^2p_n
=(1−2.95)2(0.10)+(2−2.95)2(0.25)+(3−2.95)2(0.25)+(4−2.95)2(0.40)=1.0475=(1-2.95)^2(0.10)+(2-2.95)^2(0.25)+(3-2.95)^2(0.25)+(4-2.95)^2(0.40)=1.0475

Calculating the square root of the variance, we get:

1.0475=1.0235\sqrt{1.0475}=1.0235

The number of people your friend gets will differ day-by-day by an average of about 1.0235.

c) To find the mean and standard deviation for the total revenue made per day, we multiply the probability distribution of random variable YY by 200. Any time we add or multiply by a constant, we are linearly transforming the probability distribution. Multiplying by a constant means that we have b=200b=200. Our new random variable becomes RY=200YR_Y=200Y, where random variable RYR_Y is the revenue.

Using Figure 3.5.1 to calculate the mean, we get:

μRY=200μY=200(2.95)=590.00\mu_{R_Y}=200\mu_Y=200(2.95)=590.00

Your friend will make an average of $590.00 in revenue per day.

Calculating the standard deviation, we get:

σRY=200σY=200(1.0235)=179.11\sigma_{R_Y}=200\sigma_Y=200(1.0235)=179.11

The amount of revenue your friend makes will differ day-by-day by an average of about $179.11.

Source gap (S0286): Source inconsistency: The printed result 179.11 does not equal the displayed product 200(1.0235). The original equation and conclusion are retained.

d) There are three different ways for you and your friend to get a combined total 7 people: 3 people for you and 4 for your friend, 4 people for you and 3 for your friend, and 5 people for you and 2 for your friend. The event that you get a certain number of people is independent from the event that your friend gets a certain number of people, so we multiply each pair of probabilities together and add them:

(0.25)(0.4)+(0.45)(0.25)+(0.15)(0.25)=0.25(0.25)(0.4)+(0.45)(0.25)+(0.15)(0.25)=0.25

25% of the time, you and your friend on a given day will have reservations for a combined total of 7 people.

e) Using Figure 3.5.1 the mean of combined total revenue you and your friend make can be calculated as follows:

175μX+200μY=621.25+590.00=1211.25175\mu_X+200\mu_Y=621.25+590.00=1211.25

Again, remember that we can do this because the revenue you make is independent from the revenue your friend makes and vice versa.

Together, you and your friend will make a combined average total of $1211.25.

f) To find the standard deviation, we will first need to find the variance. Using Figure 3.5.1, the variance of the difference in revenue you and your friend make can be calculated as follows:

175σX+200σY=32079.7+32079.7=64159.4175\sigma_X+200\sigma_Y=32079.7+32079.7=64159.4

Calculating the square root of the variance, we get:

64159.4=253.3\sqrt{64159.4}=253.3

The revenue you and your friend makes will differ day-by-day by an average of about $253.30.

Source gap (S0287): Source inconsistency: The equation described as a variance uses 175σₓ + 200σᵧ without squares and prints 32079.7 for both terms. The recorded work is preserved without supplying a replacement solution.

See Gallery 3.5.1 for the probability distributions of the various parts in the preceding two examples and the table of values on the preceding page for the preceding two examples.

Source gap (S0287): Source reference: The sentence says “preceding page”; the captured table appears on the following printed page, 127.
Source gap (S0290): Source figure gap: Several Gallery 3.5.1 frames clip parts of their axes and right edges. The captured plots are preserved; their complete probability and value tables are transcribed as native text.
Table of values for the preceding two examples. Dashes denote the source’s empty entries; headers “Value 1” through “Value 8” identify the source’s eight otherwise unlabelled value columns.
Random variable or probabilityValue 1Value 2Value 3Value 4Value 5Value 6Value 7Value 8μ\muσ\sigmaσ2\sigma^2
# People (X)12345———3.551.023471.0475
Probability0.050.100.250.450.15——————
Revenue (Rₓ = 175x), where b = 175175350525700875———621.25179.10832079.7
Profit (P = −150 + 175X), where a = −150, b = 17525200375550725———471.25163.526718
# People (Y)1234————2.951.023471.0475
Probability0.100.250.250.40———————
Revenue (Rᵧ = 200y), where b = 200200400600800————590.00179.10832079.7
# People (X + Y)234567896.51.447412.095
Probability0.00500.02250.06250.15250.23000.25000.21750.0600———
Total Revenue (175X + 200Y)————————1211.25253.29764159.4
Difference (175X − 200Y)————————31.25253.29764159.4
Source gap (S0293): Source inconsistencies: This table prints profit standard deviation 163.5 and variance 26718, while Example 3.5.1 says its standard deviation is unchanged at 179.11. It also repeats the revenue spread 179.108 and variance 32079.7 for Rᵧ = 200y. All table entries remain as captured.

Example 3.5.3

In Example 3.4.1, recall that Ulysses the Unicorn, a popular plushie sold by Cuddly Critters, follows a Normal distribution with mean of 90 grams and a standard deviation of 3 grams.

If a four-pack box that the plushies are packed in can only pack contents weighing between 350 and 375 grams, find the probability that four Ulysses plushies can be packed together.

Example 3.5.3 — recorded answer

The sum of four random variables, the weights of each Ulysses plushie, is calculated as follows:

μ=μ1+μ2+μ3+μ4=90+90+90+90=360 grams\mu=\mu_1+\mu_2+\mu_3+\mu_4=90+90+90+90=360\text{ grams}

We can also assume that the weight of one plushie is independent from the weight of another plushie, so the variance can be calculated:

σ2=σ12+σ22+σ32+σ42=32+32+32+32=36 grams\sigma^2=\sigma_1^2+\sigma_2^2+\sigma_3^2+\sigma_4^2=3^2+3^2+3^2+3^2=36\text{ grams}

Taking the square root of the standard deviation, we get:

σ=36=6 grams\sigma=\sqrt{36}=6\text{ grams}

If we want to find the probability that the four plushies’ collective weight is between 350 and 375 grams, we find the corresponding z-values for 350 and 375 grams:

z=350−3606=−1.67z=\frac{350-360}{6}=-1.67
z=375−3606=2.50z=\frac{375-360}{6}=2.50

Using the z-table to look up the corresponding probabilities for each z-value, and subtracting the probabilities, we get:

P(−1.67≤Z≤2.50)=0.9938−0.0475=0.9463P(-1.67\le Z\le2.50)=0.9938-0.0475=0.9463

There is a 94.63% chance that the four Ulysses plushies can be packed together.

Source gap (S0294): Source terminology and units: The variance equation is labelled “36 grams” and the next sentence says “square root of the standard deviation.” Both are retained exactly as recorded.

Pop Quiz 3.5.1

Question 1 of 5

If the mean cost of a gallon of regular unleaded gasoline is $3.45/liter with a standard deviation of $0.20 and a law is passed increasing the price by $0.10, the new mean and standard deviation of a liter of gas will be:

Source gap (S0296): Source units: The question says “gallon” and then gives the price and requested result per liter. The captured units are retained.
Question 2 of 5

From question 1, if the law is passed that instead increases the price of gas by 5%, the new mean and standard deviation of a liter of gas will be:

Question 3 of 5

If W=3X−Y+2ZW=3X-Y+2Z, and considering that XX, YY and ZZ are independent random variables, what is the mean of WW? The mean of XX, YY and ZZ is 3, 1 and 2 respectively.

Question 4 of 5

Which of the following are independent?

Question 5 of 5

If the standard deviation for independent variables Y1Y_1 and Y2Y_2 is 8 then the standard deviation of Z=Y1+Y22Z=\frac{Y_1+Y_2}{2} is:

Source gap (S0300): Source answer gap: All five quiz prompts and choices are captured, but no selected, checked, or feedback state is shown. No quiz answer key has been supplied.
Glossary and deeper reading · 5 refreshers

These editorial refreshers supplement the reading. Definitions and examples are added guidance; original source wording and recorded answers remain in their original context.

  • Probability distribution

    A probability distribution describes a random variable’s possible values and their probabilities. A discrete distribution lists probability masses, while a continuous distribution describes probabilities through areas under a density. For example, a distribution can list the probabilities of 0, 1, 2, or 3 red cards in three draws.

    Read more: Probability distribution in the captured Statistics reading →

  • Variance

    Variance is the square of the standard deviation. It measures spread in squared units, with the precise averaging rule depending on whether it describes a sample or a probability distribution. For example, a standard deviation of 3 centimeters corresponds to a variance of 9 square centimeters.

    Read more: Variance in the captured Statistics reading →

  • Random variable

    A random variable assigns a numerical value to each outcome of a chance process. Its value is uncertain before the outcome is observed, and its distribution gives the probabilities of possible values. For example, the number of red cards in three draws is a random variable.

    Read more: Random variable in the captured Statistics reading →

  • Statistical independence

    Statistical independence means that learning one outcome does not change the probability distribution of another. For two events, it implies that the probability of both occurring equals the product of their probabilities. For example, independent draws with replacement keep the second draw’s color probabilities unchanged by the first.

    Read more: Statistical independence in the captured Statistics reading →

  • Normal distribution

    A Normal distribution is a continuous, symmetric bell-shaped distribution determined by its mean and standard deviation. Many symmetric distributions are not Normal, so symmetry by itself is insufficient. For example, a Normal model centered at 50 with standard deviation 5 places most values relatively close to 50.

    Read more: Normal distribution in the captured Statistics reading →

Search lessons, terms and problems