## Discrete Uniform Distribution

A discrete random variable $X$ is said to have a uniform distribution if its probability mass function (pmf) is given by

### $P(X=x)=\frac{1}{N},;; x=1,2, \cdots, N$

## Mean of Discrete Uniform Distribution

The expected value of discrete uniform random variable $X$ is

### $E(X) =\frac{N+1}{2}$.

## Variance of Discrete Uniform Distribution

The variance of discrete uniform random variable $X$ is

### $V(X) = \dfrac{N^2-1}{12}$.

## Moment generation function of discrete uniform distribution

### $M_X(t) = \dfrac{e^t (1 - e^{tN}}{N (1 - e^t)}$.

## General discrete uniform distribution

A general discrete uniform distribution has a probability mass function

### $P(X=x)=\frac{1}{b-a+1},;; x=a,a+1,a+2, \cdots, b$

Distribution function of general discrete uniform random variable $X$ is

### $F(x) = P(X\leq x)=\dfrac{x-a+1}{b-a+1}; a\leq x\leq b$

The expected value of above discrete uniform random variable $X$ is

### $E(X) =\dfrac{a+b}{2}$.

The variance of above discrete uniform random variable $X$ is