# What is CDF - Cumulative distribution function?

Could someone please explain in layman's terms what CDF is?

If someone could show a real-life example where this could be useful, it would be great.

-
Interesting concept for a question. We can imagine more: "What's a real-life example where groups could be useful?" ... "What's a real-life example where linear independence could be useful?" ... "What's a real-life example where uncountable sets could be useful?" – GEdgar Jul 19 '11 at 14:31
@GEdgar So what's wrong with those questions? They're answerable objectively and would help an amateur understand the topic. – Kshitiz Sharma Dec 12 '14 at 7:41

If you have a quantity $A$ that takes some value at random, the cumulative density function $F(x)$ gives the probability that $X$ is less than or equal to $x$, that is:

$$F(x) = P(A\leq x)$$

So you know several things: that $F(x)$ is bounded below by 0, and bounded above by 1 (because it doesn't make sense to have a probability outside [0,1]) and that it has to be increasing (or at least, non-decreasing) with $x$.

For example, if $A$ is the height of a person selected at random (imagine you knock on someone's door and measure the height of the person who answers) then $F(x)$ is the chance that the person will be shorter than $x$. Maybe $F(\textrm{180 cm}) = 0.8$, which means that there's an 80% chance that a person selected at random will be shorter than 180 cm (or equivalently, a 20% chance that they will be taller than 180cm).

A real-life example comes from finance. One way of measuring the risk of a portfolio (of stocks, for example) is to calculate the 5% daily value-at-risk, or VAR. To say that the 5% daily VAR is $x$ means you expect your loss to be worse than $x$ dollars on only 5% of days. For example, you might report that the 5% daily VAR is \$60,000, meaning that you expect to lose more than \$60,000 on 5% of days, and on the other 95% your loss will be less than \$60,000 (ideally, you will be in profit!) To calculate the 5% VAR we need to know the cumulative distribution function of our losses. If the cumulative distribution function of daily losses is$F(\cdot)$, then the 5% daily VAR is the value of$x\$ that solves the equation

$$F(x) = 0.05$$

The reporting of daily VAR is a requirement in financial institutions worldwide, so this certainly satisfies your requirements of a 'real-life' application!

-

It may be worthwhile to note why one would be interested in the notion of CDF is just one way to describe the distribution of a random variable and that one reason for preferring it is the fact that it works for both continuous and discrete variables.

Taking the example from another answer here about peoples' heights, say you model heights in terms of real numbers (I would say hardly a very controversial notion). While it seems reasonable to assume that you can ascribe a non-zero probability to a person being shorter than some specified height is may not be reasonable that you can assume a non-zero probability of the person being exactly of that height.

Unlike such a model of height (which you would call continuous) another (canonical) example would be a die roll. Here (most people would agree) you can ascribe a non-zero probability to the die landing on exactly some given value. You would here say the die roll has a discrete distribution.

The distribution of the latter example can be described by the probabilities of individual (atomic) events, the former case needs a notion of probability density function. The interesting fact, now, is that both discrete and continuous distributions can be described by their CDF.

I realise this is not completely formally correct or complete, but I hope it gives an idea of why the CDF might be an interesting way of describing distributions of random variables.

-