Solved Exercises on Transforming Random Variables (Shifting and Scaling)

Master transforming random variables: shifting, scaling, and linear transformations through these 5 detailed exercises.

Solution: Exercises 1 to 3
1 Shifting a Random Variable
Exercise 1
If X has E[X] = 5 and Var(X) = 4, find E[X + 3] and Var(X + 3).
Definition:

Shifting a Random Variable: Adding a constant to a random variable shifts its entire distribution by that constant. For Y = X + c: E[Y] = E[X] + c and Var(Y) = Var(X).

Shifting properties:
  1. Expected value shifts by the constant: E[X + c] = E[X] + c
  2. Variance remains unchanged: Var(X + c) = Var(X)
  3. Standard deviation remains unchanged: SD(X + c) = SD(X)
Given
E[X]=5, Var(X)=4
For X+3
E[X+3]=E[X]+3
Variance
Var(X+3)=Var(X)
Results
8, 4
Step 1: Apply the shifting property for expected value

For Y = X + c: E[Y] = E[X] + c. Therefore, E[X + 3] = E[X] + 3 = 5 + 3 = 8.

Step 2: Apply the shifting property for variance

Adding a constant doesn't change the spread of the distribution: Var(X + c) = Var(X). Therefore, Var(X + 3) = Var(X) = 4.

Step 3: Calculate standard deviation

SD(X + 3) = √Var(X + 3) = √4 = 2.

E[X + 3] = 8, Var(X + 3) = 4
Final answer:

E[X + 3] = 8 and Var(X + 3) = 4.

Applied rules:

• Expected value shifting: E[X + c] = E[X] + c

• Variance invariance: Var(X + c) = Var(X)

• Location shift: Adding constant shifts location but not spread

2 Scaling a Random Variable
Exercise 2
If X has E[X] = 2 and Var(X) = 9, find E[3X] and Var(3X).
Definition:

Scaling a Random Variable: Multiplying a random variable by a constant scales both its location and spread. For Y = aX: E[Y] = aE[X] and Var(Y) = a²Var(X).

Given
E[X]=2, Var(X)=9
For 3X
E[3X]=3E[X]
Variance
Var(3X)=3²Var(X)
Results
6, 81
Step 1: Apply the scaling property for expected value

For Y = aX: E[Y] = aE[X]. Therefore, E[3X] = 3E[X] = 3 × 2 = 6.

Step 2: Apply the scaling property for variance

Multiplying by a constant scales variance by the square of the constant: Var(aX) = a²Var(X). Therefore, Var(3X) = 3²Var(X) = 9 × 9 = 81.

Step 3: Calculate standard deviation

SD(3X) = √Var(3X) = √81 = 9.

E[3X] = 6, Var(3X) = 81
Final answer:

E[3X] = 6 and Var(3X) = 81.

Applied rules:

• Expected value scaling: E[aX] = aE[X]

• Variance scaling: Var(aX) = a²Var(X)

• Spread scaling: Variance scales by the square of the multiplier

3 Linear Transformation
Exercise 3
If X has E[X] = 4 and Var(X) = 5, find E[2X - 7] and Var(2X - 7).
Definition:

Linear Transformation: For Y = aX + b, the expected value is E[Y] = aE[X] + b and the variance is Var(Y) = a²Var(X). The constant b affects the mean but not the variance.

Given
E[X]=4, Var(X)=5
For 2X-7
E[2X-7]=2E[X]-7
Variance
Var(2X-7)=2²Var(X)
Results
1, 20
Step 1: Apply the linear transformation property for expected value

For Y = aX + b: E[Y] = aE[X] + b. Therefore, E[2X - 7] = 2E[X] - 7 = 2 × 4 - 7 = 8 - 7 = 1.

Step 2: Apply the linear transformation property for variance

For Y = aX + b: Var(Y) = a²Var(X). The constant b doesn't affect variance. Therefore, Var(2X - 7) = 2²Var(X) = 4 × 5 = 20.

Step 3: Calculate standard deviation

SD(2X - 7) = √Var(2X - 7) = √20 = 2√5 ≈ 4.472.

E[2X - 7] = 1, Var(2X - 7) = 20
Final answer:

E[2X - 7] = 1 and Var(2X - 7) = 20.

Applied rules:

• Linear transformation: E[aX + b] = aE[X] + b

• Variance scaling: Var(aX + b) = a²Var(X)

• Constant shift: Adding constant affects mean but not variance

Rules and methods, laws,...
\(E[aX + b] = aE[X] + b, \quad \text{Var}(aX + b) = a^2\text{Var}(X)\)
Transformation Properties
Shifting
E[X+c] = E[X]+c
Mean shifts by c
Shifting
Var(X+c) = Var(X)
Variance unchanged
Scaling
E[aX] = aE[X]
Mean scales by a
Scaling
Var(aX) = a²Var(X)
Variance scales by a²
Key definitions:

Shifting: Adding a constant to a random variable, Y = X + c. This moves the entire distribution without changing its shape or spread.

Scaling: Multiplying a random variable by a constant, Y = aX. This stretches or compresses the distribution.

Linear Transformation: A combination of shifting and scaling, Y = aX + b. This changes both location and scale.

Expected Value Properties: E[aX + b] = aE[X] + b. Linear transformations preserve linearity.

Variance Properties: Var(aX + b) = a²Var(X). The constant term doesn't affect variance.

Complete methodology:
  1. Identify the transformation: Determine if it's shifting, scaling, or linear
  2. Apply expected value property: Use E[aX + b] = aE[X] + b
  3. Apply variance property: Use Var(aX + b) = a²Var(X)
  4. Calculate standard deviation: SD = √Var if needed
  5. Verify results: Check if the results make sense
  6. Interpret: Understand the practical meaning
Tip 1: Adding a constant shifts the mean but doesn't change the variance or standard deviation.
Tip 2: Multiplying by a constant scales the mean by the same factor and the variance by the square of the factor.
Tip 3: For standard deviation: SD(aX + b) = |a|SD(X).
Tip 4: The constant in variance transformation is always squared.
Common errors: Forgetting to square the constant in variance, confusing standard deviation scaling with variance scaling, misapplying transformation properties.
Key insight: Linear transformations preserve the shape of the distribution but change its location and scale.
Essential formulas:

• Linear transformation: E[aX + b] = aE[X] + b

• Variance scaling: Var(aX + b) = a²Var(X)

• Standard deviation scaling: SD(aX + b) = |a|SD(X)

• Shifting: E[X + c] = E[X] + c, Var(X + c) = Var(X)

• Scaling: E[aX] = aE[X], Var(aX) = a²Var(X)

Solution: Exercises 4 to 5
4 Temperature Conversion
Exercise 4
If the daily temperature in Celsius has mean 20°C and standard deviation 5°C, find the mean and standard deviation in Fahrenheit (F = (9/5)C + 32).
Definition:

Linear Transformation Application: Converting temperature from Celsius to Fahrenheit follows the linear transformation F = (9/5)C + 32. Apply transformation properties to find new mean and standard deviation.

Given
E[C]=20, SD(C)=5
For F=(9/5)C+32
E[F]=(9/5)E[C]+32
SD(F)
(9/5)SD(C)
Results
68°F, 9°F
Step 1: Identify the transformation

The conversion from Celsius to Fahrenheit is: F = (9/5)C + 32, where a = 9/5 and b = 32.

Step 2: Apply transformation to expected value

E[F] = (9/5)E[C] + 32 = (9/5)(20) + 32 = 36 + 32 = 68°F.

Step 3: Apply transformation to standard deviation

SD(F) = |a|SD(C) = |9/5|SD(C) = (9/5)(5) = 9°F.

Step 4: Calculate variance if needed

Var(F) = (9/5)²Var(C) = (81/25)(25) = 81°F².

Mean = 68°F, SD = 9°F
Final answer:

The mean temperature in Fahrenheit is 68°F and the standard deviation is 9°F.

Applied rules:

• Linear transformation: E[aX + b] = aE[X] + b

• Standard deviation scaling: SD(aX + b) = |a|SD(X)

• Real-world application: Temperature conversion

5 Multiple Transformations
Exercise 5
If X has mean 10 and variance 16, and Y = 3X - 5, find the mean and variance of Z = -2Y + 7.
Definition:

Composition of Transformations: When multiple transformations are applied sequentially, we can either work step-by-step or find the overall transformation and apply it directly.

Given
E[X]=10, Var(X)=16
Step 1: Y=3X-5
E[Y]=25, Var(Y)=144
Step 2: Z=-2Y+7
E[Z]=-43, Var(Z)=576
Overall
Z=-6X+17
Step 1: Find properties of Y = 3X - 5

E[Y] = 3E[X] - 5 = 3(10) - 5 = 25. Var(Y) = 3²Var(X) = 9(16) = 144.

Step 2: Find properties of Z = -2Y + 7

E[Z] = -2E[Y] + 7 = -2(25) + 7 = -50 + 7 = -43. Var(Z) = (-2)²Var(Y) = 4(144) = 576.

Step 3: Verify with overall transformation

Z = -2Y + 7 = -2(3X - 5) + 7 = -6X + 10 + 7 = -6X + 17. E[Z] = -6(10) + 17 = -60 + 17 = -43. Var(Z) = (-6)²Var(X) = 36(16) = 576. ✓

E[Z] = -43, Var(Z) = 576
Final answer:

E[Z] = -43 and Var(Z) = 576.

Applied rules:

• Step-by-step approach: Apply transformations sequentially

• Composition property: Transformations can be combined algebraically

• Verification: Both approaches yield the same result

Comprehensive Summary: Transforming Random Variables (Shifting and Scaling)
\(E[aX + b] = aE[X] + b, \quad \text{Var}(aX + b) = a^2\text{Var}(X)\)
Key Transformation Properties
Key definitions:

Shifting: Adding a constant to a random variable, Y = X + c. This moves the entire distribution without changing its shape or spread.

Scaling: Multiplying a random variable by a constant, Y = aX. This stretches or compresses the distribution.

Linear Transformation: A combination of shifting and scaling, Y = aX + b. This changes both location and scale.

Expected Value Properties: E[aX + b] = aE[X] + b. Linear transformations preserve linearity.

Variance Properties: Var(aX + b) = a²Var(X). The constant term doesn't affect variance.

Standard Deviation Properties: SD(aX + b) = |a|SD(X). The absolute value ensures non-negativity.

Complete methodology:
  1. Identify the transformation: Determine if it's shifting (X + c), scaling (aX), or linear (aX + b)
  2. Apply expected value property: Use E[aX + b] = aE[X] + b
  3. Apply variance property: Use Var(aX + b) = a²Var(X)
  4. Calculate standard deviation: SD = √Var if needed
  5. Handle compositions: Apply transformations sequentially or combine algebraically
  6. Verify results: Check if the results make practical sense
Tip 1: Adding a constant shifts the mean but doesn't change the variance or standard deviation.
Tip 2: Multiplying by a constant scales the mean by the same factor and the variance by the square of the factor.
Tip 3: For standard deviation: SD(aX + b) = |a|SD(X). Note the absolute value.
Tip 4: The constant in variance transformation is always squared: Var(aX) = a²Var(X).
Tip 5: When composing transformations, you can work step-by-step or find the overall transformation first.
Common errors: Forgetting to square the constant in variance, confusing standard deviation scaling with variance scaling, misapplying transformation properties to non-linear transformations, forgetting the absolute value in standard deviation scaling.
Memorization aid: "Mean scales and shifts, Variance scales by square, SD scales by absolute value".
Advanced insight: These properties extend to more complex transformations and are fundamental to statistical inference.
Essential formulas and properties:

• Linear transformation: E[aX + b] = aE[X] + b

• Variance scaling: Var(aX + b) = a²Var(X)

• Standard deviation scaling: SD(aX + b) = |a|SD(X)

• Shifting: E[X + c] = E[X] + c, Var(X + c) = Var(X)

• Scaling: E[aX] = aE[X], Var(aX) = a²Var(X)

• Composition: If Y = aX + b and Z = cY + d, then Z = caX + cb + d

Example progression (Simple to Complex):

• Simple: Pure shifting (X + c)

• Intermediate: Pure scaling (aX)

• Advanced: Linear transformation (aX + b)

• Complex: Composition of transformations

Key takeaways for memorization:

• Shifting affects mean only: E[X + c] = E[X] + c, Var(X + c) = Var(X)

• Scaling affects both: E[aX] = aE[X], Var(aX) = a²Var(X)

• Linear: E[aX + b] = aE[X] + b, Var(aX + b) = a²Var(X)

• Variance always scales by the square of the multiplier

• Standard deviation scales by the absolute value of the multiplier

Questions & Answers

Question: Why does the constant in variance transformation get squared?

Answer: Variance measures squared deviations from the mean:

  • Var(X) = E[(X - E[X])²]
  • When we transform Y = aX, the deviations become (aX - aE[X]) = a(X - E[X])
  • So Var(Y) = E[(a(X - E[X]))²] = E[a²(X - E[X])²] = a²E[(X - E[X])²] = a²Var(X)

The squaring in the variance definition causes the multiplier to be squared.

Question: Why do we use absolute value for standard deviation scaling?

Answer: Standard deviation is always non-negative:

  • SD(X) = √Var(X), so it's always ≥ 0
  • If a is negative, then SD(aX) = √Var(aX) = √(a²Var(X)) = √(a²)√Var(X) = |a|SD(X)
  • For example, if a = -2, then SD(-2X) = |-2|SD(X) = 2SD(X), not -2SD(X)

The absolute value ensures standard deviation remains positive.

Question: Do these transformation properties work for non-linear transformations like X² or log(X)?

Answer: No, these simple linear transformation properties only apply to linear transformations of the form aX + b:

  • For non-linear transformations: E[g(X)] ≠ g(E[X]) in general
  • Example: E[X²] ≠ (E[X])² unless Var(X) = 0
  • For X²: Need to use E[X²] = Var(X) + (E[X])²
  • For log(X): No simple formula exists; requires more advanced techniques

Linear transformations have special properties that make them particularly tractable.