Why Affine Transformations Matter
A shift changes the location of a distribution, while multiplication by a nonzero constant changes its scale and may reverse its order. These operations occur in unit conversions, centered variables, and standardization. Their formulas are simple, but the sign of the scale factor matters: when it is negative, events defined by an inequality reverse direction, and the support reverses with them.
Let \(X\) be a real-valued random variable and define \(Y=a+bX\), where \(a\in\mathbb{R}\) and \(b\ne 0\). This is a one-to-one transformation, so every possible value \(x\) of \(X\) maps to exactly one value \(a+bx\) of \(Y\). The transformation results below apply to discrete, continuous, and mixed distributions, with additional density formulas when \(X\) is absolutely continuous.
The CDF: The Sign Determines the Formula
Write \(F_X(x)=P(X\le x)\), and let \(t=(y-a)/b\). When \(b>0\), the event \(a+bX\le y\) is the event \(X\le t\). When \(b<0\), dividing by \(b\) reverses the inequality, so the event is \(X\ge t\). For a general distribution, the latter probability is \(1-F_X(t-)\), where \(F_X(t-)=P(X<t)\); using the left limit correctly includes any mass at \(t\).
Indeed, for \(b>0\), \(P(Y\le y)=P(X\le t)=F_X(t)\). For \(b<0\), \(P(Y\le y)=P(X\ge t)=1-P(X<t)=1-F_X(t-)\). This argument does not require \(X\) to have a density, so it covers atoms as well as continuous parts.
Worked Example: A Negative Affine Map of a Discrete Variable
Let \(P(X=0)=0.2\), \(P(X=1)=0.5\), and \(P(X=3)=0.3\). Define \(Y=2-2X\). The possible transformed values are \(2\), \(0\), and \(-4\), respectively, with their probabilities unchanged. In increasing order, \(Y\) has mass \(0.3\) at \(-4\), \(0.5\) at \(0\), and \(0.2\) at \(2\).
For example, at \(y=0\), \(t=(0-2)/(-2)=1\). The negative-scale formula gives \(F_Y(0)=1-F_X(1-)=1-0.2=0.8\), matching \(P(Y\le0)=0.3+0.5=0.8\). If one incorrectly used \(F_X(1)=0.7\), the mass at \(X=1\) would be excluded even though it maps to \(Y=0\).
Density and Support Transformations
If \(X\) has a density \(f_X\) with respect to Lebesgue measure, the affine transformation also has a density. The formula uses the absolute value of \(b\), so the result is nonnegative for either sign. The support must be transformed along with the formula: the density is zero outside the image of the original support.
For \(b>0\), differentiating the CDF expression gives \(f_Y(y)=f_X(t)/b\) wherever the derivative exists. For \(b<0\), the CDF is \(1-F_X(t-)\); at points where the density formula applies, its derivative is \(-f_X(t)(1/b)=f_X(t)/|b|\). Equivalently, the one-dimensional change-of-variables formula gives \(dy=|b|\,dx\), hence the factor \(1/|b|\). The density integrates to one: substituting \(x=(y-a)/b\) in its integral gives $$ \int_{\mathbb R}\frac{1}{|b|}f_X\!\left(\frac{y-a}{b}\right)\,dy =\int_{\mathbb R}f_X(x)\,dx=1. $$
Worked Example: Reflecting and Shifting a Uniform Distribution
Suppose \(X\sim\operatorname{Uniform}(0,1)\) and \(Y=3-2X\). The support \((0,1)\) maps to \((1,3)\): the endpoints map to \(3\) and \(1\), so their order reverses. Since \(f_X(x)=1\) for \(0<x<1\), $$ f_Y(y)=\frac12 f_X\!\left(\frac{3-y}{2}\right) =\frac12,\qquad 1<y<3, $$ and \(f_Y(y)=0\) outside this interval. The density integrates to \(\frac12(3-1)=1\). The transformed CDF is \(0\) for \(y\le1\), \(1-(3-y)/2=(y-1)/2\) for \(1<y<3\), and \(1\) for \(y\ge3\). This agrees with the uniform density on \((1,3)\).
For a discrete variable, the density formula does not apply, but the probability at each value is transported directly: \(P(Y=a+bx)=P(X=x)\). Because the map is one-to-one, distinct values of \(X\) remain distinct values of \(Y\). More generally, any atom at \(x\) becomes an atom of the same probability at \(a+bx\); this is why a mixed distribution’s continuous part and discrete masses must both be tracked.
Means and Variances
Moment transformations follow from substituting \(Y=a+bX\) into the definitions. The mean requires \(E[|X|]<\infty\); the variance formula requires \(E[X^2]<\infty\). These assumptions ensure the quantities are well-defined.
By linearity of expectation, \(E[Y]=E[a+bX]=a+bE[X]\). For the variance, center \(Y\) at its expectation: $$ Y-E[Y]=a+bX-(a+bE[X])=b(X-E[X]). $$ Squaring and taking expectations gives $$ \operatorname{Var}(Y)=E[(Y-E[Y])^2] =b^2E[(X-E[X])^2] =b^2\operatorname{Var}(X). $$ The square is essential: a negative \(b\) reverses direction but cannot make variance negative. \(\square\)
Worked Example: Standardizing an Exponential Variable
Let \(X\sim\operatorname{Exponential}(\lambda)\), with rate \(\lambda>0\), density \(f_X(x)=\lambda e^{-\lambda x}\) for \(x>0\), mean \(1/\lambda\), and variance \(1/\lambda^2\). Standardize using \(Z=(X-E[X])/\sqrt{\operatorname{Var}(X)}=\lambda X-1\). Since \(X>0\), the support of \(Z\) is \((-1,\infty)\).
Here \(a=-1\), \(b=\lambda>0\), so the density transformation gives $$ f_Z(z)=\frac1\lambda f_X\!\left(\frac{z+1}{\lambda}\right) =\frac1\lambda\lambda e^{-(z+1)} =e^{-(z+1)},\qquad z>-1, $$ and \(f_Z(z)=0\) for \(z\le-1\). Its integral is \(\int_{-1}^{\infty}e^{-(z+1)}\,dz=1\). The moment formulas verify \(E[Z]=\lambda(1/\lambda)-1=0\) and \(\operatorname{Var}(Z)=\lambda^2(1/\lambda^2)=1\). Standardization makes the mean zero and variance one; it does not make this distribution normal or change its one-sided support.
Standardization and Its Limits
If \(X\) has finite mean \(\mu=E[X]\) and positive finite variance \(\sigma^2=\operatorname{Var}(X)\), its standardized version is $$ Z=\frac{X-\mu}{\sigma}. $$ The denominator is the positive standard deviation \(\sigma=\sqrt{\operatorname{Var}(X)}\), not the variance. The moment result gives \(E[Z]=0\) and \(\operatorname{Var}(Z)=1\). Standardization is an affine transformation with \(a=-\mu/\sigma\) and \(b=1/\sigma>0\); it preserves the order of values and maps the support \(S\) to \((S-\mu)/\sigma\).
Worked Example: Standardizing a Normal Variable
Let \(X\sim N(10,9)\), where the second parameter is the variance. Thus \(E[X]=10\), \(\operatorname{Var}(X)=9\), and \(\sigma=3\). Set \(Z=(X-10)/3\). The support remains the whole real line. Its density is $$ f_Z(z)=3f_X(10+3z) =\frac{3}{3\sqrt{2\pi}}\exp\!\left(-\frac{(3z)^2}{2\cdot9}\right) =\frac{1}{\sqrt{2\pi}}e^{-z^2/2},\qquad z\in\mathbb R. $$ Therefore \(Z\sim N(0,1)\). The support remains \(\mathbb R\); the transformation changes the location and scale, not the family’s full support.
The distribution-specific calculation above identifies the standardized normal law. For an arbitrary variable, however, zero mean and unit variance do not determine a distribution. For example, if \(X\sim\operatorname{Uniform}(0,1)\), then \(E[X]=1/2\) and \(\operatorname{Var}(X)=1/12\). Its standardized form is \(Z=\sqrt{12}(X-1/2)\), with support \((-\sqrt{3},\sqrt{3})\), mean zero, and variance one. It is still uniform on a bounded interval, not normal.
Common Mistakes
- Ignoring a negative scale. When \(b<0\), the inequality reverses in the CDF calculation and support endpoints switch order. Use \(1-F_X(t-)\), not \(F_X(t)\).
- Using \(b\) instead of \(|b|\) in a density. A density cannot be negative. The change-of-variables factor is \(1/|b|\).
- Forgetting the support. A transformed density formula is only nonzero on the image of the original support. Standardizing an exponential variable, for example, does not give support \(\mathbb R\).
- Claiming standardization makes a variable normal. It guarantees mean zero and variance one when those moments exist and the variance is positive; it does not otherwise specify the distribution.
- Using standardization when variance is zero or undefined. If the variance is zero, division by the standard deviation is impossible; if it is infinite or undefined, the usual standardization is not defined.
Check Your Understanding
For each question, pay attention to the sign of the scale and to the support.
- If \(Y=5-3X\), write \(F_Y(y)\) in terms of \(F_X\), including the correct left limit.
- If \(X\) has density \(2x\) on \(0<x<1\) and zero elsewhere, find the support and density of \(Y=1+2X\).
- If \(E[X]=4\) and \(\operatorname{Var}(X)=7\), find the mean and variance of \(Y=2-5X\).
- A variable has mean \(6\) and variance \(16\). State its standardized variable and the mean and variance of that variable.
- Does a variable with mean zero and variance one have to be normally distributed? Explain briefly.