Discrete Uniform Distribution Examples
- 1 Discrete Uniform Distribution Calculator
- 2 How to calculate discrete uniform distribution probabilities?
- 3 How to find Discrete Uniform Distribution Probabilities?
- 4 Definition of Discrete Uniform Distribution
- 5 Mean of Discrete Uniform Distribution
- 6 Variance of Discrete Uniform Distribution
- 7 General discrete uniform distribution
- 8 Discrete Uniform Distribution Example 1
- 9 Discrete Uniform Distribution Example 2
- 10 Discrete Uniform Distribution Example 3
- 11 Discrete Uniform Distribution Example 4
- 12 Discrete Uniform Distribution Example 5
- 13 Conclusion
Discrete Uniform Distribution Calculator
Discrete uniform distribution calculator helps you to determine the probability and cumulative probabilities for discrete uniform distribution with parameter $a$ and $b$.
In this tutorial we will discuss some examples on discrete uniform distribution and learn how to compute mean of uniform distribution, variance of uniform distribution and probabilities related to uniform distribution.
Discrete Uniform Distribution Calculator | |
---|---|
Minimum Value $a$: | |
Maximum Value $b$ | |
Value of x | |
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 probabilities?
How to find Discrete Uniform Distribution Probabilities?
Step 1 – Enter the minimum value $a$
Step 2 – Enter the maximum value $b$
Step 3 – Enter the value of $x$
Step 4 – Click on "Calculate" button to get discrete uniform distribution probabilities
Step 5 – Gives the output probability at $x$ for discrete uniform distribution
Step 6 – Gives the output cumulative probabilities for discrete uniform distribution
Definition of Discrete Uniform Distribution
A discrete random variable $X$ is said to have a uniform distribution if its probability mass function (pmf) is given by
$$ \begin{aligned} P(X=x)&=\frac{1}{N},\;\; x=1,2, \cdots, N. \end{aligned} $$
Mean of Discrete Uniform Distribution
The expected value of discrete uniform random variable is $E(X) =\dfrac{N+1}{2}$.
Variance of Discrete Uniform Distribution
The variance of discrete uniform random variable is $V(X) = \dfrac{N^2-1}{12}$.
General discrete uniform distribution
A general discrete uniform distribution has a probability mass function
$$ \begin{aligned} P(X=x)&=\frac{1}{b-a+1},\;\; x=a,a+1,a+2, \cdots, b. \end{aligned} $$
The expected value of above discrete uniform randome variable is $E(X) =\dfrac{a+b}{2}$.
The variance of above discrete uniform random variable is $V(X) = \dfrac{(b-a+1)^2-1}{12}$.
Discrete Uniform Distribution Example 1
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 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 $X$ is
$$ \begin{aligned} E(X) &=\frac{1+6}{2}\\ &=\frac{7}{2}\\ &= 3.5 \end{aligned} $$
The variance of $X$ is
$$ \begin{aligned} V(X) &=\frac{(6-1+1)^2-1}{12}\\ &=\frac{35}{12}\\ &= 2.9167 \end{aligned} $$
Discrete Uniform Distribution Example 2
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} $$
Discrete Uniform Distribution Example 3
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 of $X$ is
$$ \begin{aligned} P(X=x) &=\frac{1}{11-9+1} \\ &= \frac{1}{3}; x=9,10,11. \end{aligned} $$
Mean of $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 $X$ is
$$ \begin{aligned} V(X) &= E(X^2)-[E(X)]^2\\ &=100.67-[10]^2\\ &=100.67-100\\ &=0.67. \end{aligned} $$
Discrete Uniform Distribution Example 4
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 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 $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 $Y$ is
$$ \begin{aligned} E(Y) &=E(20X)\\ &=20\times E(X)\\ &=20 \times 2.5\\ &=50. \end{aligned} $$
And variance of $Y$ is
$$ \begin{aligned} V(Y) &=V(20X)\\ &=20^2\times V(X)\\ &=20^2 \times 2.92\\ &=1168. \end{aligned} $$
Discrete Uniform Distribution Example 5
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, 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 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 of discrete uniform distribution.
b. The mean of $X$ is
$$ \begin{aligned} E(X) &=\frac{4+8}{2}\\ &=\frac{12}{2}\\ &= 6. \end{aligned} $$
The variance of $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
In this tutorial, you learned about how to calculate mean, variance and probabilities of discrete uniform distribution. You also learned about how to solve numerical problems based on discrete uniform distribution.
To read more about the step by step tutorial on discrete uniform distribution refer the link Discrete Uniform Distribution. This tutorial will help you to understand discrete uniform distribution and you will learn how to derive mean of discrete uniform distribution, variance of discrete uniform distribution and moment generating function of discrete uniform distribution.
To learn more about other discrete probability distributions, please refer to the following tutorial:
Let me know in the comments if you have any questions on Discrete Uniform Distribution Examples and your thought on this article.