Discrete Uniform Distribution Calculator
Discrete uniform distribution calculator can help you to determine the probability and cumulative probabilities for discrete uniform distribution with parameter $a$ and $b$.
A discrete random variable has a discrete uniform distribution if each value of the random variable is equally likely and the values of the random variable are uniformly distributed throughout some specified interval.
Use this discrete uniform distribution calculator to find probability and cumulative probabilities.
Calculator
Discrete Uniform Distribution Calculator | |
---|---|
Minimum Value $a$: | |
Maximum Value $b$ | |
Value of x | |
Discrete Uniform Distribution Results | |
Probability : P(X=x) | |
Cumulative Probability : P(X ≤ x) | |
Cumulative Probability : P(X < x) | |
Cumulative Probability : P(X ≥ x) | |
Cumulative Probability : P(X > x) | |
How to calculate discrete uniform distribution?
Step 1 - Enter the minumum value (a)
Step 2 - Enter the maximum value (b)
Step 3 - Enter the value of x
Step 4 - Click on “Calculate” for discrete uniform distribution
Step 5 - Calculate Probability
Step 6 - Calculate cumulative probabilities
Discrete Uniform Distribution Definition
A discrete random variable $X$ is said to have uniform distribution with parameter $a$ and $b$ if its probability mass function (pmf) is given by
$$f(x; a,b) = \frac{1}{b-a+1}; x=a,a+1,a+2, \cdots, b $$
Discrete Uniform Probability Function
$$P(X\leq x) = F(x) = \frac{x-a+1}{b-a+1}; a\leq x\leq b $$
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 (MGF) 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 discrete uniform distribution expected valeu for above random variable $X$ is
$E(X) =\dfrac{a+b}{2}$.
The variance of discrete uniform distribution of above random variable $X$ is
$V(X) = \dfrac{(b-a+1)^2-1}{12}$.
Below are the few solved examples on Discrete Uniform Distribution with step by step guide on how to find probability and mean or variance of discrete uniform distribution.
Example 1 - Calculate Mean and Variance of Discrete Uniform Distribution
Roll a six faced fair die. Suppose $X$ denote the number appear on the top of a die.
a. Find the probability that an even number appear on the top, b. Find the probability that the number appear on the top is less than 3. c. Compute mean and variance of $X$.
Solution
Let $X$ denote the number appear on the top of a die. Then the random variable $X$ take the values $X=1,2,3,4,5,6$ and $X$ follows $U(1,6)$ distribution.
The probability mass function (pmf) of random variable $X$ is
$$ \begin{aligned} P(X=x)&=\frac{1}{6-1+1}\\ &=\frac{1}{6}, \; x=1,2,\cdots, 6. \end{aligned} $$
a. The probability that an even number appear on the top of the die is
$$ \begin{aligned} P(X=\text{ even number }) &=P(X=2)+P(X=4)+P(X=6)\\ &=\frac{1}{6}+\frac{1}{6}+\frac{1}{6}\\ &=\frac{3}{6}\\ &= 0.5 \end{aligned} $$
b. The probability that the number appear on the top of the die is less than 3 is
$$ \begin{aligned} P(X < 3) &=P(X=1)+P(X=2)\\ &=\frac{1}{6}+\frac{1}{6}\\ &=\frac{2}{6}\\ &= 0.3333 \end{aligned} $$
c. The mean of discrete uniform distribution $X$ is
$$ \begin{aligned} E(X) &=\frac{1+6}{2}\\ &=\frac{7}{2}\\ &= 3.5 \end{aligned} $$
The variance of discrete uniform distribution $X$ is
$$ \begin{aligned} V(X) &=\frac{(6-1+1)^2-1}{12}\\ &=\frac{35}{12}\\ &= 2.9167 \end{aligned} $$
Example 2 - Discrete Uniform Distribution
A telephone number is selected at random from a directory. Suppose $X$ denote the last digit of selected telephone number. Find the probability that the last digit of the selected number is
a. 6
b. less than 3
c. greater than or equal to 8
Solution
Let $X$ denote the last digit of randomly selected telephone number. The possible values of $X$ are $0,1,2,\cdots, 9$.
All the numbers $0,1,2,\cdots, 9$ are equally likely. Thus the random variable $X$ follows a discrete uniform distribution $U(0,9)$.
The probability mass function of $X$ is
$$ \begin{aligned} P(X=x) &=\frac{1}{9-0+1} \\ &= \frac{1}{10}; x=0,1,2\cdots, 9 \end{aligned} $$
a. The probability that the last digit of the selected number is 6
$$ \begin{aligned} P(X=6) &=\frac{1}{10}\\ &= 0.1 \end{aligned} $$
b. The probability that the last digit of the selected telecphone number is less than 3
$$ \begin{aligned} P(X < 3) &=P(X\leq 2)\\ &=P(X=0) + P(X=1) + P(X=2)\\ &=\frac{1}{10}+\frac{1}{10}+\frac{1}{10}\\ &= 0.1+0.1+0.1\\ &= 0.3 \end{aligned} $$
c. The probability that the last digit of the selected telecphone number is greater than or equal to 8
$$ \begin{aligned} P(X\geq 8) &=P(X=8) + P(X=9)\\ &=\frac{1}{10}+\frac{1}{10}\\ &= 0.1+0.1\\ &= 0.2 \end{aligned} $$
Example 3 - Compute Mean and Variance of Discrete Uniform Distribution
Let the random variable $X$ have a discrete uniform distribution on the integers $9\leq x\leq 11$. Determine mean and variance of $X$.
Solution
Let the random variable $X$ have a discrete uniform distribution on the integers $9\leq x\leq 11$.
All the integers $9, 10, 11$ are equally likely. The probability mass function (pmf) of $X$ is
$$ \begin{aligned} P(X=x) &=\frac{1}{11-9+1} \\ &= \frac{1}{3}; x=9,10,11. \end{aligned} $$
Mean of discrete uniform distribution $X$ is
$$ \begin{aligned} E(X) &=\sum_{x=9}^{11}x \times P(X=x)\\ &= \sum_{x=9}^{11}x \times\frac{1}{3}\\ &=9\times \frac{1}{3}+10\times \frac{1}{3}+11\times \frac{1}{3}\\ &= \frac{9+10+11}{3}\\ &=\frac{30}{3}\\ &=10. \end{aligned} $$
For variance, we need to calculate $E(X^2)$.
$$ \begin{aligned} E(X^2) &=\sum_{x=9}^{11}x^2 \times P(X=x)\\ &= \sum_{x=9}^{11}x^2 \times\frac{1}{3}\\ &=9^2\times \frac{1}{3}+10^2\times \frac{1}{3}+11^2\times \frac{1}{3}\\ &= \frac{81+100+121}{3}\\ &=\frac{302}{3}\\ &=100.67. \end{aligned} $$
Now, Variance of discrete uniform distribution $X$ is
$$ \begin{aligned} V(X) &= E(X^2)-[E(X)]^2\\ &=100.67-[10]^2\\ &=100.67-100\\ &=0.67. \end{aligned} $$
Example 4 - Discrete Uniform Distribution
Let the random variable $X$ have a discrete uniform distribution on the integers $0\leq x\leq 5$. Let the random variable $Y=20X$. Determine mean and variance of $Y$.
Solution
Let the random variable $X$ have a discrete uniform distribution on the integers $0\leq x\leq 5$.
All the integers $0,1,2,3,4,5$ are equally likely. The probability mass function (pmf) of $X$ is
$$ \begin{aligned} P(X=x) &=\frac{1}{5-0+1} \\ &= \frac{1}{6}; x=0,1,2,3,4,5. \end{aligned} $$
Mean of $X$ is
$$ \begin{aligned} E(X) &=\sum_{x=0}^{5}x \times P(X=x)\\ &= \sum_{x=0}^{5}x \times\frac{1}{6}\\ &=\frac{1}{6}(0+1+2+3+4+5)\\ &=\frac{15}{6}\\ &=2.5. \end{aligned} $$
For variance, we need to calculate $E(X^2)$.
$$ \begin{aligned} E(X^2) &=\sum_{x=0}^{5}x^2 \times P(X=x)\\ &= \sum_{x=0}^{5}x^2 \times\frac{1}{6}\\ &=\frac{1}{6}( 0^2+1^2+\cdots +5^2)\\ &= \frac{55}{6}\\ &=9.17. \end{aligned} $$
Now, Variance of Discrete Uniform Distribution $X$ is
$$ \begin{aligned} V(X) &= E(X^2)-[E(X)]^2\\ &=9.17-[2.5]^2\\ &=9.17-6.25\\ &=2.92. \end{aligned} $$
Let $Y=20X$. Then the mean of discrete uniform distribution $Y$ is
$$ \begin{aligned} E(Y) &=E(20X)\\ &=20\times E(X)\\ &=20 \times 2.5\\ &=50. \end{aligned} $$
And variance of discrete uniform distribution $Y$ is
$$ \begin{aligned} V(Y) &=V(20X)\\ &=20^2\times V(X)\\ &=20^2 \times 2.92\\ &=1168. \end{aligned} $$
Example 5 - Discrete Uniform Distribution
A random variable $X$ has a probability mass function $P(X=x)=k$ for $x=4,5,6,7,8$, where $k$ is constant.
a. Find the value of $k$. b. Find the mean and variance of $X$. c. Find the probability that $X\leq 6$.
Solution
As the given function is a probability mass function (pmf), we have
$$ \begin{aligned} & \sum_{x=4}^8 P(X=x) =1\\ \Rightarrow & \sum_{x=4}^8 k =1\\ \Rightarrow & k \sum_{x=4}^8 =1\\ \Rightarrow & k (5) =1\\ \Rightarrow & k =\frac{1}{5} \end{aligned} $$
Thus the probability mass function (pmf) of $X$ is
$$ \begin{aligned} P(X=x) =\frac{1}{5}, x=4,5,6,7,8 \end{aligned} $$
which is the probability mass function (pmf) of discrete uniform distribution.
b. The mean of discrete uniform distribution $X$ is
$$ \begin{aligned} E(X) &=\frac{4+8}{2}\\ &=\frac{12}{2}\\ &= 6. \end{aligned} $$
The variance of discrete uniform distribution $X$ is
$$ \begin{aligned} V(X) &=\frac{(8-4+1)^2-1}{12}\\ &=\frac{25-1}{12}\\ &= 2 \end{aligned} $$
c. The probability that $X$ is less than or equal to 6 is
$$ \begin{aligned} P(X \leq 6) &=P(X=4) + P(X=5) + P(X=6)\\ &=\frac{1}{5}+\frac{1}{5}+\frac{1}{5}\\ &= \frac{3}{5}\\ &= 0.6 \end{aligned} $$
Conclusion
Hope you like article on Discrete Uniform Distribution. You can refer below recommended articles for discrete uniform distribution theory with step by step guide on mean of discrete uniform distribution,discrete uniform distribution variance proof.
Read more about other Statistics Calculator on below links
- Descriptive Statistics Calculators
- Hypothesis Testing Calculators
- Probability Distribution
- Confidence Interval Calculators
- Correlation Regression Calculators
- Probability Theory Calculators
- Sample Size and Power Calculators