# density function

Let $X$ be a discrete random variable with sample space $\{x_{1},x_{2},\ldots\}$. Let $p_{k}$ be the probability of $X$ taking the value $x_{k}$.

 $f(x)=\ \begin{cases}p_{k}&\text{if }x=x_{k}\\ 0&\text{otherwise}\end{cases}$

It must hold:

 $\sum_{j=1}^{\infty}f(x_{j})=1$

If the density function for a random variable is known, we can calculate the probability of $X$ being on certain interval:

 $P[a

The definition can be extended to continuous random variables in a direct way: The probability of $x$ being on a given interval is calculated with an integral instead of using a summation:

 $P[a

For a more formal approach using measure theory, look at probability distribution function entry.

 Title density function Canonical name DensityFunction Date of creation 2013-03-22 13:02:49 Last modified on 2013-03-22 13:02:49 Owner drini (3) Last modified by drini (3) Numerical id 12 Author drini (3) Entry type Definition Classification msc 60E05 Synonym probability function Synonym density Synonym probabilities function Related topic DistributionFunction Related topic CumulativeDistributionFunction Related topic RandomVariable Related topic Distribution  Related topic GeometricDistribution2