# David's question from Yahoo Answers

#### CaptainBlack

##### Well-known member

2. Let X be a random variable that follows a Uniform(0; 1) distribution.
(a) Show that E(X) = 1/2 and Var(X) = 1/12.
(b) Using Chebyshev's inequality find an upper bound on the prob-
ability that X is more than k standard deviations away from its
expected value.
(c) Compute the exact probability that X is more than k standard
deviations from its expected value.
( d) Compare the bound to the exact probability.

Thanks

• Mr Fantastic and Jameson

#### CaptainBlack

##### Well-known member
(a) By definition of the expectation: $E(X)= \int_{-\infty}^{\infty} x p(x)\; dx$

but $$X \sim U(0,1)$$ so $$p(x)=1$$ for $$x$$ in $$[0,1]$$ and zero otherwise this becomes:
$E(X) = \int_0^1 x dx$

Hence $E(X)= \biggl[ \frac{x^2}{2} \biggr]_0^1= \frac{1^2}{2}-\frac{0^2}{2}=1/2$

Similarly for the variance:

$V(X)=E( (X - \overline{X})^2 ) = \int_0^1 (x-1/2)^2\; dx = \frac{1}{12}$

(b) I don't know what is being asked for here, Chebyshev's inequality is just this:
$P( |X-\overline{X}| \ge k \sigma) \le \frac{1}{k^2}$

(c) There are a number of ways of doing this, the easiest involves a diagram, but that is not convienient to use here, so we take the definition of the required probability:
$P( |X-\overline{X}| \ge k \sigma)= P( X-\overline{X} \le - k \sigma) + P( X-\overline{X} \ge k \sigma)$

Which may be written as a sum of integrals:
$P( X-\overline{X} \le - k \sigma)=P(X \le \overline{X}-k \sigma)=\int_0^{\frac{1}{2}-\frac{k}{\sqrt{12}}} dx$ when $$k < \sqrt{12}/2$$ and zero otherwise, and:

$P( X-\overline{X} \ge - k \sigma)=P(X \ge \overline{X}+k \sigma)=\int_{\frac{1}{2}+\frac{k}{\sqrt{12}}}^1 dx$ when $$k < \sqrt{12}/2$$ and zero otherwise.

CB

• Mr Fantastic and Jameson