Why Shifts and Scales Matter
Expected values are often reported in a different form from the original random quantity. A randomly varying amount may be converted to another currency, a measurement may be expressed in new units, or a cost may combine a fixed charge with a price per unit. When each change is a fixed addition or a constant multiplication, the expected value can be calculated directly from the original expected value.
This rule is useful because it does not require a new probability calculation for every possible value of the transformed quantity. It does, however, depend on the transformation being affine: a constant times the random variable, plus a constant. The constants must be fixed rather than random, and the original expected value must exist.
The constants \(a\) and \(b\) may be positive, negative, or zero. If \(a=0\), the transformed quantity is the constant \(b\), whose expected value is \(b\). If \(a\) is negative, the scale reverses direction, but the same formula applies. In practical applications, the units of \(a\) and \(b\) must make the transformed quantity's units consistent.
Why the Formula Holds
The rule follows from the definition of expectation and the fact that probabilities, or probability density, sum or integrate to one. For a discrete random variable with possible values \(x_j\) and probabilities \(p_j\), where the sums converge, the expected value of the transformed variable is
because \(\sum_j p_j=1\). For a continuous random variable with density \(f_X\), the same reasoning uses integration: \(\int (ax+b)f_X(x)\,dx=a\int xf_X(x)\,dx+b\int f_X(x)\,dx\), and \(\int f_X(x)\,dx=1\). The finite-expectation condition ensures these expectations are well-defined. More generally, \(E[|aX+b|]\leq |a|E[|X|]+|b|<\infty\), so the transformed variable also has a finite expected absolute value.
Applying the Rule in Context
A reliable calculation begins by writing the transformed quantity in the form \(aX+b\), identifying the units of each term, and then substituting \(E[X]\). If a problem gives a distribution rather than \(E[X]\), first calculate \(E[X]\) under that distribution. Do not apply the affine rule to a formula that is not affine, such as \(X^2\), without an additional result.
Worked Example: Converting a Random Payment to Dollars
A hypothetical research grant makes a payment of \(X\) euros, where \(E[X]=240\) euros. Assume the exchange rate is fixed at 1.10 U.S. dollars per euro, and a processing fee of $18 is charged on every payment. Let \(C\) be the total cost in U.S. dollars. Find \(E[C]\).
Method and model. The exchange rate and fee are fixed, so the dollar cost is the affine transformation \(C=1.10X+18\). The only randomness is in \(X\), and its expected value is given as 240 euros.
Step 1: Check units. The product \(1.10X\) is in dollars because \(X\) is in euros and the exchange rate is dollars per euro. The fee is also in dollars, so the terms can be added.
Step 2: Apply the affine expectation rule.
Check. The expected converted payment before the fee is $264; adding the fixed $18 fee gives $282. The result is in dollars, as required. The method avoids recalculating every possible payment, and it assumes the conversion rate and fee do not vary with \(X\).
Worked Example: Changing Measurement Units and Correcting a Reading
A sensor records a temperature \(X\) in degrees Celsius. Its expected reading is \(E[X]=18\) degrees Celsius. The reading is converted to Fahrenheit using \(F=\frac{9}{5}X+32\), and a fixed calibration correction of 0.5 degrees Fahrenheit is then subtracted. Let \(R\) be the corrected Fahrenheit reading. Find \(E[R]\).
Method and model. The conversion and calibration correction are deterministic. Thus \(R=\frac{9}{5}X+32-0.5=\frac{9}{5}X+31.5\), an affine transformation of \(X\). The expected Celsius reading is finite and is given.
Step 1: Combine the fixed Fahrenheit terms.
Step 2: Apply the expectation rule.
Check. Converting the expected Celsius value alone gives \(1.8(18)+32=64.4\) degrees Fahrenheit; subtracting the 0.5-degree correction gives 63.9. The method avoids applying the correction with the wrong sign, and the final answer is expressed in Fahrenheit.
Worked Example: Expected Cost From a Discrete Activity Model
A hypothetical workshop's number of machine-hours \(X\) in a shift has the probability distribution below. The workshop's net operating cost in dollars is \(C=7.50+2.25X-4\): it pays a fixed setup charge, incurs a cost per machine-hour, and receives a fixed $4 credit on every shift. Find \(E[C]\).
| Machine-hours \(x\) | Probability \(P(X=x)\) |
|---|---|
| 8 | 0.20 |
| 12 | 0.50 |
| 20 | 0.30 |
Method and model. The probabilities are nonnegative and sum to \(0.20+0.50+0.30=1.00\), so they specify a discrete distribution. First find \(E[X]\) from the probability mass function; then use the affine cost formula. The setup charge and credit apply on every shift.
Step 1: Calculate the expected machine-hours.
Step 2: Write the cost as an affine function.
Step 3: Calculate the expected cost.
Check. The three possible costs are \(7.50+2.25(8)-4=\$21.50\), \(7.50+2.25(12)-4=\$30.50\), and \(7.50+2.25(20)-4=\$48.50\). Weighting them by their probabilities gives \(0.20(21.50)+0.50(30.50)+0.30(48.50)=4.30+15.25+14.55=\$34.10\), which agrees. The method avoids omitting the fixed credit or applying it only to some outcomes.
Common Mistakes and Exam Traps
The main risk is not the algebra; it is translating the context into the correct affine expression. The constant term is included once, not multiplied by the scale factor. For the currency example, the incorrect calculation
treats the $18 fee as though it were in euros and were subject to the exchange rate. The correct expression is \(1.10(240)+18=\$282\), because the fee is already stated in dollars and is added after conversion.
- Scaling the shift: From \(E[aX+b]=aE[X]+b\), not \(a(E[X]+b)\). The fixed amount \(b\) is not multiplied by \(a\).
- Changing the sign of a correction: If a fixed amount is subtracted, include it as a negative term. For example, \(aX+c-r\) has expected value \(aE[X]+c-r\).
- Mixing units: Add terms only after converting them to compatible units. A dollar fee cannot be treated as part of a euro amount without an explicit conversion.
- Using the rule for a nonlinear formula: The result \(E[aX+b]=aE[X]+b\) does not imply \(E[g(X)]=g(E[X])\) for an arbitrary function \(g\). The affine form is essential here.
- Treating a varying quantity as fixed: If the exchange rate, fee, or correction is itself random, it is not automatically a constant \(a\) or \(b\). The affine rule in this form does not settle that different model.
Check Your Understanding
For each problem, write the transformed quantity clearly before calculating its expected value.
- A hypothetical stipend \(X\) is measured in euros, with \(E[X]=14\) euros. A fixed conversion rate of 1.20 dollars per euro applies, followed by a $5 administrative fee. What is the expected dollar amount? (Answer: $21.80)
- A length measurement \(X\) has expected value 52 centimeters. A report records \(Y=0.8X-6\), with \(Y\) in centimeters. Find \(E[Y]\). (Answer: 35.6 centimeters)
- A hypothetical service's net charge is \(C=4.25+1.75X-2\) dollars, where \(X\) is the number of service units and \(E[X]=16\). The $2 credit applies on every job. Find \(E[C]\). (Answer: $30.25)
- A sensor has expected temperature \(E[X]=-4.5\) degrees Celsius. Its reported Fahrenheit value is \(F=\frac{9}{5}X+32\), with no additional correction. Find \(E[F]\). (Answer: 23.9 degrees Fahrenheit)
- A machine's operating time \(X\), in hours, has probabilities \(P(X=3)=0.25\), \(P(X=7)=0.50\), and \(P(X=11)=0.25\). A hypothetical charge is \(C=12+4X\) dollars. Find \(E[C]\) by first calculating \(E[X]\). (Answer: \(E[X]=7\) hours and \(E[C]=\$40\))