Actuarial Notes

Transformations of Random Variables

Study guides: Exam MAS-I, Exam ACIA-CAPSTONE

A Transformation of a Random Variable is a new random variable Y = g(X) defined as a function g of a random variable X. The cdf of Y is found by writing the event Y \le y as an event about X:

F_Y(y) = P\bigl(g(X) \le y\bigr)

  • F_Y(y) is the cdf of Y.

The event g(X) \le y is rewritten as a set of values of X by inverting g, and its probability is found from the cdf F_X of X. When g is decreasing, inverting it reverses the inequality. The density of Y is the derivative of its cdf, f_Y(y) = F_Y'(y).

X is uniform on (0, 1) and Y = 1/X. What is the cdf of Y, and what is P(Y > 4)?

  • The function 1/x is decreasing, so for y > 1 inverting it reverses the inequality: F_Y(y) = P(1/X \le y) = P(X \ge 1/y).
  • For a uniform X on (0, 1), P(X \ge 1/y) = 1 - 1/y, so F_Y(y) = 1 - 1/y for y > 1.
  • The probability is P(Y > 4) = 1 - F_Y(4) = 1/4 = 0.25.

Events about a transformed random variable

A probability about Y = g(X) is found by rewriting the event as a set of values of X. For a payment Y = X - d on a loss above a deductible d, P(X - d > y) = P(X > y + d). For Y = cX with c > 0, P(cX > y) = P(X > y/c). For an inequality that is quadratic in X, the roots of the quadratic split the values of X into intervals, and the event is the union of the intervals where the inequality holds.

X is uniform on (0, 4). What is P(X^2 - 5X + 6 > 0)?

  • The quadratic factors as (X - 2)(X - 3), with roots 2 and 3.
  • The product is positive when X < 2 or X > 3.
  • The probability is P(X < 2) + P(X > 3) = 2/4 + 1/4 = 0.75.

Linear transformations

A percentage increase r on a random amount X multiplies it by 1 + r, and a flat amount c adds to it, so the result is the linear transformation Y = aX + b. Its mean is

E[aX + b] = aE[X] + b

and its variance is

\text{Var}(aX + b) = a^2\,\text{Var}(X)

The standard deviation is |a| times the standard deviation of X, and the shift b does not change it.

Claim costs X have mean 1,000 and standard deviation 400. Next year costs rise by 5%, and a fixed handling cost of 50 is added to each claim. What are the mean and standard deviation of next year's claim cost?

  • Next year's cost is Y = 1.05X + 50.
  • The mean is 1.05 \times 1{,}000 + 50 = 1{,}100.
  • The standard deviation is 1.05 \times 400 = 420.

The expected value of a function

The mean of Y = g(X) does not need the distribution of Y. For a continuous random variable X with density f(x), it is

E[g(X)] = \int_{-\infty}^{\infty} g(x)\,f(x)\,dx

When g has different forms on different intervals, such as \max(X, c), the integral is split at the points where the form changes. The variance of Y is E[g(X)^2] - \bigl(E[g(X)]\bigr)^2, with E[g(X)^2] found by the same integral. For g that is not linear, E[g(X)] is in general not g(E[X]).

X is uniform on (0, 10). What is E[\max(X, 4)]?

  • The function is 4 for X < 4 and X for X \ge 4, and the density is 1/10.
  • The integral over (0, 4) is 4 \times 4/10 = 1.6.
  • The integral over (4, 10) is \int_4^{10} x/10\,dx = (100 - 16)/20 = 4.2.
  • The expected value is 1.6 + 4.2 = 5.8.

The change-of-variable formula

When g is strictly increasing or strictly decreasing on the values X can take, differentiating the cdf of Y gives its density directly:

f_Y(y) = f_X\bigl(g^{-1}(y)\bigr)\left|\frac{d}{dy}g^{-1}(y)\right|

  • g^{-1} is the inverse of g, so X = g^{-1}(Y).
  • f_X is the density of X.

Losses X are exponential with mean 1,000, and next year's losses are Y = 1.1X. What is the density of Y?

  • The inverse is g^{-1}(y) = y/1.1, with derivative 1/1.1.
  • Substituting the inverse gives f_X(y/1.1) = \frac{1}{1{,}000}e^{-y/1{,}100}.
  • Multiplying by 1/1.1 gives f_Y(y) = \frac{1}{1{,}100}e^{-y/1{,}100} for y > 0.
  • Y is exponential with mean 1,100.

Transformations of several random variables

If Y_1 = g_1(X_1, X_2) and Y_2 = g_2(X_1, X_2) is a one-to-one transformation with inverse x_1 = w_1(y_1, y_2) and x_2 = w_2(y_1, y_2), the joint density of Y_1 and Y_2 is

f_{Y_1, Y_2}(y_1, y_2) = f_{X_1, X_2}\bigl(w_1(y_1, y_2), w_2(y_1, y_2)\bigr)\,|J|

  • J is the Jacobian of the inverse transformation.

The Jacobian is the determinant of the matrix of partial derivatives of w_1 and w_2 with respect to y_1 and y_2:

J = \frac{\partial w_1}{\partial y_1}\frac{\partial w_2}{\partial y_2} - \frac{\partial w_1}{\partial y_2}\frac{\partial w_2}{\partial y_1}

The density of Y_1 alone is found by integrating y_2 out of the joint density.

X_1 and X_2 are independent exponential random variables with mean 1. What is the density of Y_1 = X_1 + X_2?

  • Take Y_2 = X_2, so the inverse is x_1 = y_1 - y_2 and x_2 = y_2, with J = 1 \times 1 - (-1) \times 0 = 1.
  • The joint density is e^{-(y_1 - y_2)}e^{-y_2} = e^{-y_1} for 0 < y_2 < y_1.
  • Integrating y_2 from 0 to y_1 gives f_{Y_1}(y_1) = y_1 e^{-y_1} for y_1 > 0, a gamma density with shape 2.

Putting the mean into the function For a function that is not linear, E[g(X)] is not g(E[X]). If the radius R of a circle is uniform on (0, 2), the expected area is \pi E[R^2] = 4\pi/3 = 4.19, not \pi(E[R])^2 = \pi = 3.14.

Practice questions

Actuarial Notes