Question:easy

Consider a distribution with the following probability density function
\[ f(x) = \begin{cases} 0.5, & 0 < x < 2 \\ 0.0, & \text{Otherwise} \end{cases} \]
Given that the mean of the above probability distribution is 1, the variance (rounded off to two decimal places) is ______.

Show Hint

This is a uniform distribution on (0,2); use Var(X) = (b-a)^2/12 or E[X^2] - (E[X])^2.
Updated On: Jul 28, 2026
Show Solution

Correct Answer: 0.32

Solution and Explanation

Step 1: Recognize the distribution type.
A constant density of $0.5$ over $0 < x < 2$ describes a continuous uniform distribution on the interval $[a, b]$ with $a = 0$ and $b = 2$. Its height must equal $\dfrac{1}{b-a}$, and here $\dfrac{1}{2-0} = 0.5$, which matches, confirming this reading.

Step 2: Recall the standard variance formula for a uniform distribution.
For $X$ uniform on $[a, b]$, the mean and variance have closed forms:
$$ E[X] = \frac{a+b}{2}, \qquad \text{Var}(X) = \frac{(b-a)^2}{12} $$
Check the mean first, as a consistency check on $a$ and $b$: $E[X] = \dfrac{0+2}{2} = 1$, which matches the value given in the question.

Step 3: Apply the variance formula directly.
$$ \text{Var}(X) = \frac{(2-0)^2}{12} = \frac{4}{12} = \frac{1}{3} $$

Step 4: Convert to a decimal.
$$ \frac{1}{3} = 0.3333\ldots $$
Rounded to two decimal places, this is $0.33$.

Step 5: Cross-check with the integral method.
Using $\text{Var}(X) = E[X^2] - (E[X])^2$, $E[X^2] = \int_0^2 x^2(0.5)\,dx = \dfrac{4}{3}$, so $\text{Var}(X) = \dfrac{4}{3} - 1 = \dfrac{1}{3}$, the same result, confirming the shortcut formula was used correctly.
$$ \boxed{0.33} $$
Was this answer helpful?
0

Questions Asked in GATE MT exam