# How to find variance and probability from a uniformly distributed random variable?

Let $x$ be a random variable that describes the weight in pounds of a potato. Assume $X\sim U(.5,1.5)$; that is, $X$ is uniformly distributed between $0.5$ and $1.5$ with average value $1$ pound.

a) Find the variance $V(X)$;

b) Find the probability that a sack of 100 potatoes will weigh less than $97$ pounds?

So to get the variance I need to find the expected value. And that would be...

$$fx(t)dt = ft(x) = \begin{cases} 0.5, \quad x < 0.5, \\ 1.5, \quad 0.5 < x < 1.5\quad (?) \end{cases}$$

Sorry. I've only done the uniform distribution of $(0,1)$.

• As a check, your question says the average or expected value of one potato should be $1$ pound. And so of one hundred potatoes $100$ pounds. Your formula would be easier to read using $\LaTeX$ – Henry Aug 4 '16 at 14:24

One may recall that the PDF of the continuous uniform distribution over $[a,b]$ is $$f(x)=\begin{cases} \frac{1}{b - a} & \mathrm{for}\ a \le x \le b, \\[8pt] 0 & \mathrm{for}\ x<a\ \mathrm{or}\ x>b, \end{cases}$$ hence $$E(X)=\int_a^bxf(x)dx=\int_a^b \frac{x}{b-a}dx=?$$ $$V(X)=\int_a^bx^2f(x)dx-(E(X))^2=\int_a^b \frac{x^2}{b-a}dx-(E(X))^2=?$$

Here $a=\frac12$, $b=\frac32$.

Can you take it from here?

• So for a uniform distribution to have a value in the middle which is 1, then 2.25/2 - 0.25/2 is 1? Then the variance should be (x^3)/3 integrated between a and b =3.375/3- .125/3 - 1^2? – Benny Onabach Aug 4 '16 at 14:42
• @Benny Onabach You may check your results here: en.wikipedia.org/wiki/… – Olivier Oloa Aug 4 '16 at 14:52
• Ohhh that really does simplifies everything. Thanks. Helps to know the proof too for double checking. – Benny Onabach Aug 4 '16 at 15:05
• @Benny Onabach You are welcome. – Olivier Oloa Aug 4 '16 at 15:07
• $P(X\le 0.97)=\int_{0.5}^{0.97} \frac{1}{1}dx=0.47$. – Olivier Oloa Aug 4 '16 at 15:17

Hint:

If $a>0$ and $U$ has uniform distribution on $(0,1)$ then $X:=aU+b$ has uniform distribution on $(b,a+b)$.

Backwards: if $X$ has uniform distribution on $(b,a+b)$ then $U:=\frac{X-b}{a}$ has uniform distribution on $(0,1)$.