# Uniform Distribution

Probability distribution gives the corresponding probability to different values of random variable. Distribution can be of different forms such as uniform and normal. Each kind of distribution comes with certain set of properties with them. The uniform distribution of probability implies the probability of certain elements to be same. As the values are same, the curve of the uniform distribution function comes as a straight line. Just like any other distribution, we can find cumulative distribution, expected value and variance of a uniform distribution.

## Uniform Distribution in Probability

Suppose, a coin is tossed and $X$ be a random variable denoted to number of heads we will get. $X$ can have two values, $0$ and $1$, that is, either no head will come or one head will come. Hence, the probabilities will be,

$P(X$ = $0)$ = $0.5$

$P(X$ = $1)$ = $0.5$

Hence, the probability distribution is uniform for all the values of random variable, $X$.

Uniform distribution can be defined as the distribution having constant probability and it has got a straight line as its graph. If the random variable $X$ can attain different values then the probability of getting any value will be $\frac{1}{n}$.

## Probability Distribution Function for Uniform Distribution

If a continuous random variable $X$ has a uniform distribution then the probability distribution function for the random variable is given by,

$f(x)$ = $\frac{1}{(b-a)}$, where $a$ and $b$ are two constants such that $a\ \leq\ x\ \leq\ b$.

The graph of the probability distribution function for continuous random variable for a uniform distribution is as given below.

The length of the rectangular base is $(b - a)$.

As we know that the total area of the under the curve of probability distribution function should be $1$, we have

$(height\ of\ the\ rectangle)\ \times\ (b-a)$ = $1$

$Height\ of\ the\ Rectangle$ = $\frac{1}{b - a}$

The value of probability distribution function is usually obtained by integration but in case of uniform distribution the area is of a rectangular form and hence, the value equals area of the rectangle.

## Cumulative Distribution Function for Uniform Distribution

Cumulative distribution of a random variable $X$ is the probability that the value of the random variable is less than or equal to a certain value. The cumulative distribution function for uniform distribution is given by,

$f(x)$ = $\frac{x-a}{b-a}$

The graph of cumulative distribution function is as given below:

## Uniform Distribution Expected Value

Expected value of a probability distribution gives the central value of the distribution. For a uniform distribution ranging from lower value a to value b, the expected value will be $\frac{b + a }{2}$.

$\int_{b}^{a}$ $\frac{x}{b-a}$ $dx$ = $\frac{1}{b-a}$ $[\frac{x^2}{2}]_{b}^{a}$

Putting values we get,

Expected value = $\frac{b + a }{2}$

For example, the marks of a student in a certain test ranges from $25$ to $33$. He has again written that test. What will be the expected marks?

The lower bound, $a$ = $25$ and upper bound, $b$ = $33$.

The expected value = $\frac{b + a }{2}$ = $\frac{25 + 33}{2}$ = $\frac{58}{2}$ = $29$