# Distribution function

What is the probability that the realization of a random variable will be less than or equal to a certain threshold value?

The distribution function of a random variable allows us to answer exactly this question.

Its value at a given point is equal to the probability of observing a realization of the random variable below that point or equal to that point.

## Synonyms

The distribution function is also often called cumulative distribution function (abbreviated as cdf).

## Definition

The following is a formal definition.

Definition If is a random variable, its distribution function is a function such thatwhere is the probability that is less than or equal to .

## Example

Suppose that a random variable can take only two values (0 and 1), each with probability 1/2.

Its distribution function is

Here is a plot of the function.

## Properties

Every distribution function enjoys the following four properties:

1. Increasing. is increasing, i.e.,

2. Right-continuous. is right-continuous, i.e.,for any ;

3. Limit at minus infinity. satisfies

4. Limit at plus infinity. satisfies

Concise proofs of these properties can be found here and in Williams (1991).

## Proper distribution function

Any distribution function enjoys the four properties above.

Moreover, for any given function enjoying these four properties, it is possible to define a random variable that has the given function as its distribution function (for a proof, see Williams 1991, Sec. 3.11).

The practical consequence of this fact is that, when we need to check whether a given function is a proper distribution function, we just need to verify that it satisfies the four properties above.

## How to derive the cdf in the discrete case

When the random variable is discrete, the cdf can be derived aswhere:

This can be quickly done with a table.

### Example

Suppose that the probability mass function of is

Then, we can set up a table that has three rows.

In the first row, we write the possible values of , sorted from smallest to largest.

In the second row, we write the probabilities of the single values.

The third row contains the values of the cdf.

The leftmost cell in the third row is equal to the cell immediately above.

Then, we go from left to right and the value in each cell is set equal to the sum of:

1. the probability in the cell immediately to the left;

2. the probability in the cell immediately above.

Thus, the distribution function is

## How to derive the cdf in the continuous case

When the random variable is continuous, its cdf can be computed aswhere is the probability density function of .

### Example

The simplest example is probably the cdf of the uniform distribution.

The probability density function of a random variable having uniform distribution on the interval iswhere is an indicator function that takes value 1 on the interval and value 0 everywhere else.

There are three cases:

1. if , then

2. if , then

3. if , then

Therefore, the cdf is

## More details

More details about the distribution function can be found in the lecture on Random variables.

## References

Williams, D., 1991. Probability with martingales. Cambridge university press.

Previous entry: Discrete random vector

Next entry: Estimator