Section 2.5 Linear Combinations of Random Variables (P5)
When we sample data, we're picking a value from the probability distribution of a random variable. But it's not usually the case that we do this one at a time. When we take a sample of size \(n\text{,}\) this is \(n\) values of the random variable. So we're naturally interested in dealing with multiple random variables at once. In this section we address sums, differences and scaling of random variables.
Exploration 2.5.1. Sum of Dice.
We saw in Exploration 2.4.3 the distribution, mean and variance of the outcome of a die roll, \(X\text{.}\) Consider rolling a pair of die, a blue and green one as in Activity 2.2.7. Consider the possible pairs of outcomes.
Let \(Y\) denote the sum of both die.
(a)
What are the possible values of \(Y\)
(b)
For each possible sum (\(Y_i\)), find the probability that the sum of the die will give that value (\(P(Y=Y_i)\)).
(c)
Compute \(E(Y)\) and \(Var(Y)\text{.}\)
How do these values compare to \(E(X), Var(X)\) found in Activity 2.4.5?
(d)
Run the following code to simulate 1,000 blue and green die rolls and plot a histogram of their sum.
(e)
Run the following code to find the mean and variance of these dierolls.
How do these values compare to the what you found in (c)?
Remark 2.5.1.
Given independent random variables \(X, Y\) and a constant \(c\text{,}\) the random variable \(X+Y\) has:
and the random variable \(cX\) has
What was computed in Exploration 2.5.1 is the expectation and variance of \(Y=X_B+X_G\) the sum of the blue and green die rolls. Note that both \(X_B, X_G\) have the same expectation and variance as a single die roll \(X\) as in Activity 2.4.5.
Activity 2.5.2. Difference of Dice.
W Consider rolling a pair of die, a blue and green one as in Exploration 2.5.1. Consider the possible pairs of outcomes.
Let \(Z\) denote the difference of the green die subtracted from the blue die (\(Z=X_B-X_G\)). Note that \(Z=X_B+(-1)X_G\text{.}\)
(a)
Use Remark 2.5.1 to rewrite
and compute \(E(X_B+(-1)X_G).\)
(b)
Use Remark 2.5.1 to rewrite
and compute \(Var(X_B+(-1)X_G).\)
(c)
Run the following code to simulate 1,000 blue and green die rolls and plot a histogram of their differences.
(d)
Run the following code to find the mean and variance of these dierolls.
How do these values compare to the what you found in (a) and (b)?
Activity 2.5.3. Fast Food Group Order.
Recall the fast food orders of Activity 2.4.6. Suppose a group of ten friends order together, and let the cost of their order be \(G=X_1+\ldots X_{10}\) where each \(X_i\) is the cost of an individual order as in Activity 2.4.6. Also suppose these orders will be independent of each other.
(a)
Use Remark 2.5.1 and the fact that
to find \(E(G), Var(G)\text{.}\)
(b)
Run the following code to simulate 200 groups of ten and plot a histogram of their purchase amounts.
(c)
Run the following code to find the mean and variance of the purchase amounts.
How do these values compare to the what you found in (a)?
Activity 2.5.4. Ice Cream.
Suppose that a box of Ice Cream comes with on average 60 oz of ice cream, but because theyre not all packed evenly, with a standard deviation of 2 oz. Suppose a scoop of ice cream is 3oz, but with standard deviation of 0.15oz.
(a)
Let \(B\) denote the number of oz in a box of ice cream and find \(E(B), Var(B)\text{.}\) (Hint: recall Remark 2.4.5 and the relationship between standard deviation and variance.)
(b)
Let \(S\) denote the number of oz in a scoop of ice cream and find \(E(S), Var(S)\text{.}\)
(c)
Let \(R\) denote the amount of ice cream remaining in a box after I take 2 scoops out, note that \(R=B-S_1-S_2=B+(-1)S_1+(-1)S_2\text{.}\)
Find \(E(R), Var(R)\text{.}\)
(d)
Run the following code to simulate 1000 boxes of icecream with 2 scoops removed.
(e)
Run the following code to find the mean and variance of these remains.
How do these values compare to the what you found in (c)?