From Wikibooks, open books for an open world
< Statistics‎ | Distributions
Jump to: navigation, search

Continuous Uniform Distribution[edit]

Probability density function
PDF of the uniform probability distribution using the maximum convention at the transition points.
Using maximum convention
Cumulative distribution function
CDF of the uniform probability distribution.
Notation \mathcal{U}(a, b)
Parameters -\infty < a < b < \infty \,
Support x \in [a,b]
PDF \begin{cases}
                  \frac{1}{b - a} & \text{for } x \in [a,b]  \\
                  0               & \text{otherwise}
CDF \begin{cases}
                  0               & \text{for } x < a \\
                  \frac{x-a}{b-a} & \text{for } x \in [a,b) \\
                  1               & \text{for } x \ge b
Mean \tfrac{1}{2}(a+b)
Median \tfrac{1}{2}(a+b)
Mode any value in [a,b]
Variance \tfrac{1}{12}(b-a)^2
Skewness 0
Ex. kurtosis -\tfrac{6}{5}
Entropy \ln(b-a) \,
MGF \frac{\mathrm{e}^{tb}-\mathrm{e}^{ta}}{t(b-a)}
CF \frac{\mathrm{e}^{itb}-\mathrm{e}^{ita}}{it(b-a)}

The (continuous) uniform distribution, as its name suggests, is a distribution with probability densities that are the same at each point in an interval. In casual terms, the uniform distribution shapes like a rectangle.

Mathematically speaking, the probability density function of the uniform distribution is defined as


f\left(x\right)={1 \over {b-a}}

And the cumulative distribution function is:

0, & \mbox{if } x \le a \\
{{x-a} \over {b-a}}, & \mbox{if } a < x < b\\
1, & \mbox{if } x \ge b


We derive the mean as follows.

\operatorname{E}[X] = \int^\infin_{-\infin}xf(x) dx

As the uniform distribution is 0 everywhere but [a, b] we can restrict ourselves that interval

\operatorname{E}[X] = \int^b_a {1 \over {b-a}} x dx
\operatorname{E}[X] = \left.{1 \over (b-a)}{1 \over 2} x^2 \right|^b_a
\operatorname{E}[X] = {1 \over 2(b-a)}\left[ b^2-a^2 \right]
\operatorname{E}[X] = {b+a \over 2}


We use the following formula for the variance.

\operatorname{Var}(X) = \operatorname{E}[X^2]-(\operatorname{E}[X])^2
\operatorname{Var}(X) = \left[\int^\infin_{-\infin}f(x) \cdot x^2 dx\right]-\left({b+a \over 2}\right)^2
\operatorname{Var}(X) = \left[\int^b_a {1 \over {b-a}} x^2 dx\right]-{(b+a)^2 \over 4}
\operatorname{Var}(X) = \left. {1 \over {b-a}}{1 \over 3} x^3 \right|^b_a-{(b+a)^2 \over 4}
\operatorname{Var}(X) = {1 \over 3(b-a)}[b^3-a^3] -{(b+a)^2 \over 4}
\operatorname{Var}(X) = {4(b^3-a^3)-3(b+a)^2(b-a) \over 12(b-a)}
\operatorname{Var}(X) = {(b-a)^3 \over 12(b-a)}
\operatorname{Var}(X) = {(b-a)^2 \over 12}

External links[edit]