How do you find the distribution of a function of a random variable?

Quick Overview

Asks how to derive the distribution of a transformed random variable from the known distribution of the original one. Tests the CDF method, the change-of-variables formula and its conditions, functions that are not one-to-one, discrete variables, and cases where no density exists.

How do you find the distribution of a function of a random variable?

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Other

How do you find the distribution of a function of a random variable? That is, given a random variable $X$ with a known distribution and a function $g$, how do you find the distribution of $Y = g(X)$? Describe the general method, the shortcuts, and when each one applies. ```hint Start from an event Write the event $\{g(X) \le y\}$ as an event about $X$ alone, and see what you can compute from there. ``` ```hint Watch the shape of g Check what happens when $g$ is decreasing, and when two different values of $x$ map to the same $y$. ``` ### What a Strong Answer Covers - A general method that works for any $g$, with its steps - The shortcut formula for a monotone, differentiable $g$, including why an absolute value appears - How to handle a $g$ that is not one-to-one, and a discrete $X$ - At least one worked example carried through to a named distribution - Cases where $Y$ has no density or a closed form is hard, and what to do then ### Follow-up Questions - If $X \sim \text{Uniform}(0, 1)$, what is the distribution of $-\ln X$, and how is that result used to generate random numbers? - How does the method change for a function of two random variables, such as $X_1 + X_2$ or $X_1 / X_2$? - $X$ is standard normal and $Y = \max(X, 0)$. Does $Y$ have a density? - How would you approximate the mean and variance of $g(X)$ when the exact distribution is hard to derive?

Overview: Asks how to derive the distribution of a transformed random variable from the known distribution of the original one. Tests the CDF method, the change-of-variables formula and its conditions, functions that are not one-to-one, discrete variables, and cases where no density exists.

Nov 24, 2026
mediumData ScientistOtherStatistics & Math
0
0

How do you find the distribution of a function of a random variable?

That is, given a random variable XX with a known distribution and a function gg, how do you find the distribution of Y=g(X)Y = g(X)? Describe the general method, the shortcuts, and when each one applies.

What a Strong Answer Covers Guidance

  • A general method that works for any gg , with its steps
  • The shortcut formula for a monotone, differentiable gg , including why an absolute value appears
  • How to handle a gg that is not one-to-one, and a discrete XX
  • At least one worked example carried through to a named distribution
  • Cases where YY has no density or a closed form is hard, and what to do then

Follow-up Questions Guidance

  • If X∼Uniform(0,1)X \sim \text{Uniform}(0, 1) , what is the distribution of −ln⁡X-\ln X , and how is that result used to generate random numbers?
  • How does the method change for a function of two random variables, such as X1+X2X_1 + X_2 or X1/X2X_1 / X_2 ?
  • XX is standard normal and Y=max⁡(X,0)Y = \max(X, 0) . Does YY have a density?
  • How would you approximate the mean and variance of g(X)g(X) when the exact distribution is hard to derive?