StatlectThe Digital Textbook

# Functions of random variables and their distribution

Let be a random variable with known distribution. Let another random variable be a function of :where . How do we derive the distribution of from the distribution of ?

There is no general answer to this question. However, there are several special cases in which it is easy to derive the distribution of . We discuss these cases below.

## Strictly increasing functions

When the function is strictly increasing on the support of (i.e. ), then admits an inverse defined on the support of , i.e. a function such that:Furthermore is itself strictly increasing.

The distribution function of a strictly increasing function of a random variable can be computed as follows:

Proposition (distribution of an increasing function) Let be a random variable with support and distribution function . Let be strictly increasing on the support of . Then, the support of is:and the distribution function of is:

Proof

Of course, the support is determined by and by all the values can take. The distribution function of can be derived as follows:

1. if is lower than than the lowest value can take on, then , so:

2. if belongs to the support of , then can be derived as follows:

3. if is higher than than the highest value can take on, then , so:

Therefore, in the case of an increasing function, knowledge of and of the upper and lower bounds of the support of is all we need to derive the distribution function of from the distribution function of .

Example Let be a random variable with support and distribution function:LetThe function is strictly increasing and it admits an inverse on the support of :The support of is . The distribution function of is:

In the cases in which is either discrete or absolutely continuous there are specialized formulae for the probability mass and probability density functions, which are reported below.

### Strictly increasing functions of a discrete random variable

When is a discrete random variable, the probability mass function of can be computed as follows:

Proposition (probability mass of an increasing function) Let be a discrete random variable with support and probability mass function . Let be strictly increasing on the support of . Then, the support of is:and its probability mass function is:

Proof

This proposition is a trivial consequence of the fact that a strictly increasing function is invertible:

Example Let be a discrete random variable with support and probability mass function Let The support of is:The function is strictly increasing and its inverse is:The probability mass function of is:

### Strictly increasing functions of an absolutely continuous random variable

When is an absolutely continuous random variable and is differentiable, then also is absolutely continuous and its probability density function can be easily computed as follows:

Proposition (density of an increasing function) Let be an absolutely continuous random variable with support and probability density function . Let be strictly increasing and differentiable on the support of . Then, the support of is:and its probability density function is:

Proof

This proposition is a trivial consequence of the fact that the density function is the first derivative of the distribution function: it can be obtained by differentiating the expression for the distribution function found above.

Example Let be an absolutely continuous random variable with supportand probability density function:Let The support of is:The function is strictly increasing and its inverse iswith derivativeThe probability density function of is:

## Strictly decreasing functions

When the function is strictly decreasing on the support of (i.e. ), then admits an inverse defined on the support of , i.e. a function such that:Furthermore is itself strictly decreasing.

The distribution function of a strictly decreasing function of a random variable can be computed as follows:

Proposition (distribution of a decreasing function) Let be a random variable with support and distribution function . Let be strictly decreasing on the support of . Then, the support of is:and the distribution function of is:

Proof

Of course, the support is determined by and by all the values can take. The distribution function of can be derived as follows:

1. if is lower than than the lowest value can take on, then , so:

2. if belongs to the support of , then can be derived as follows:

3. if is higher than than the highest value can take on, then , so:

Therefore, also in the case of a decreasing function, knowledge of and of the upper and lower bounds of the support of is all we need to derive the distribution function of from the distribution function of .

Example Let be a random variable with support and distribution function:LetThe function is strictly decreasing and it admits an inverse on the support of :The support of is . The distribution function of is:where equals when and otherwise (because is always zero except when and ).

We report below the formulae for the special cases in which is either discrete or absolutely continuous.

### Strictly decreasing functions of a discrete random variable

When is a discrete random variable, the probability mass function of can be computed as follows:

Proposition (probability mass of a decreasing function) Let be a discrete random variable with support and probability mass function . Let be strictly decreasing on the support of . Then, the support of is:and its probability mass function is:

Proof

The proof of this proposition is identical to the proof of the proposition for strictly increasing functions. In fact, the only property that matters is that a strictly decreasing function is invertible:

Example Let be a discrete random variable with support and probability mass function Let The support of is:The function is strictly decreasing and its inverse is:The probability mass function of is:

### Strictly decreasing functions of an absolutely continuous random variable

When is an absolutely continuous random variable and is differentiable, then also is absolutely continuous and its probability density function is derived as follows:

Proposition (density of a decreasing function) Let be an absolutely continuous random variable with support and probability density function . Let be strictly decreasing and differentiable on the support of . Then, the support of is:and its probability density function is:

Proof

This proposition is easily derived: 1) remembering that the probability that an absolutely continuous random variable takes on any specific value is and, as a consequence, for any ; 2) using the fact that the density function is the first derivative of the distribution function; 3) differentiating the expression for the distribution function found above.

Example Let be a uniform random variable on the interval , i.e. an absolutely continuous random variable with supportand probability density function:Let where is a constant. The support of is:where we can safely ignore the fact that , because is a zero-probability event (see Absolutely continuous random variables and zero-probability events). The function is strictly decreasing and its inverse iswith derivativeThe probability density function of is:Therefore, has an exponential distribution with parameter (see the lecture entitled Exponential distribution).

## Invertible functions

In the case in which the function is neither strictly increasing nor strictly decreasing, the formulae given in the previous sections for discrete and absolutely continuous random variables are still applicable, provided is one-to-one and hence invertible. We report these formulae below.

### One-to-one functions of a discrete random variable

When is a discrete random variable the probability mass function of is given by the following:

Proposition (probability mass of a one-to-one function) Let be a discrete random variable with support and probability mass function . Let be one-to-one on the support of . Then, the support of is:and its probability mass function is:

Proof

The proof of this proposition is identical to the proof of the propositions for strictly increasing and strictly decreasing functions found above:

### One-to-one functions of an absolutely continuous random variable

When is an absolutely continuous random variable and is differentiable, then also is absolutely continuous and its probability density function is given by the following:

Proposition (density of a one-to-one function) Let be an absolutely continuous random variable with support and probability density function . Let be one-to-one and differentiable on the support of . Then, the support of is:Ifthen the probability density function of is:

Proof

For a proof of this proposition see: Poirier, D. J. (1995) Intermediate statistics and econometrics: a comparative approach, MIT Press.

## Solved exercises

Below you can find some exercises with explained solutions:

1. Exercise set 1 (derive the distribution of a function of a random variable).

The book

Most learning materials found on this website are now available in a traditional textbook format.

Glossary entries
Share