Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

StatLect
Index > Fundamentals of probability

Functions of random variables and their distribution


by Marco Taboga, PhD

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.

1 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

Strictly increasing functions


When the function is strictly increasing on the support of (i.e. ),
then admits an inverse de�ned 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

2 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

Proof

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

Let

The function is strictly increasing and it admits an inverse on the support of :

3 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

The support of is . The distribution function of is

In the cases in which is either discrete or 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

4 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

and its probability mass function is

Proof

Example Let be a discrete random variable with support

and probability mass function

Let

The support of is

5 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

The function is strictly increasing and its inverse is

The probability mass function of is

Strictly increasing functions of a continuous random variable


When is a continuous random variable and is di�erentiable, then also is continuous and its
probability density function can be easily computed as follows.

Proposition (density of an increasing function) Let be a continuous random variable with


support and probability density function . Let be strictly increasing and di�erentiable
on the support of . Then, the support of is

6 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

and its probability density function is

Proof

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

Example Let be a continuous random variable with support

and probability density function

7 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

Let

The support of is

The function is strictly increasing and its inverse is

with derivative

The probability density function of is

Strictly decreasing functions

8 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

When the function is strictly decreasing on the support of (i.e. ),


then admits an inverse de�ned 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

9 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

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

Let

The function is strictly decreasing and it admits an inverse on the support of :

The support of is . The distribution function of is

10 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

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 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.

11 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

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

Example Let be a discrete random variable with support

and probability mass function

Let

12 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

The support of is

The function is strictly decreasing and its inverse is

The probability mass function of is

Strictly decreasing functions of a continuous random variable


When is a continuous random variable and is di�erentiable, then also is continuous and its
probability density function is derived as follows.

Proposition (density of a decreasing function) Let be a continuous random variable with

13 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

support and probability density function . Let be strictly decreasing and


di�erentiable on the support of . Then, the support of is

and its probability density function is

Proof

Example Let be a uniform random variable on the interval , i.e., a continuous random variable
with support

and probability density function

Let

14 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

where is a constant. The support of is

where we can safely ignore the fact that , because is a zero-probability event (see
Continuous random variables and zero-probability events). The function is strictly decreasing and
its inverse is

with derivative

The probability density function of is

Therefore, has an exponential distribution with parameter (see the lecture entitled Exponential
distribution).

15 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

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 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

16 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

Proof

One-to-one functions of a continuous random variable


When is a continuous random variable and is di�erentiable, then also is continuous and its
probability density function is given by the following proposition.

Proposition (density of a one-to-one function) Let be a continuous random variable with


support and probability density function . Let be one-to-one and di�erentiable on
the support of . Then, the support of is

If

17 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

then 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 �nd some exercises with explained solutions.

Exercise 1
Let be a continuous random variable with support

18 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

and probability density function

Let

Find the probability density function of .

Solution

The support of is

The function is strictly increasing and its inverse is

with derivative

The probability density function of is

19 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

Exercise 2
Let be a continuous random variable with support

and probability density function

Let

Find the probability density function of .

Solution

The support of is

20 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

The function is strictly decreasing and its inverse is

with derivative

The probability density function of is

Exercise 3
Let be a discrete random variable with support

and probability mass function

21 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

Let

Find the probability mass function of .

Solution

The support of is

The function is strictly increasing and its inverse is

The probability mass function of is

22 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

23 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

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

LEARN MORE

Featured pages Main sections Glossary entries


Conditional probability Mathematical tools Posterior probability

Set estimation Fundamentals of probability Power function

Central Limit Theorem Probability distributions Critical value

Combinations Asymptotic theory Integrable variable

Student t distribution Fundamentals of statistics IID sequence

24 of 25 10/4/19, 12:38
Functions of random variables and their distribution https://www.statlect.com/fundamentals-of-probability/functions-of-rando...

Gamma distribution Glossary Continuous mapping theorem

Explore About Share


Score test About Statlect Like 1 Share
Law of Large Numbers Contacts

F distribution Cookies, privacy and terms of use

25 of 25 10/4/19, 12:38

You might also like