# A random variable X has range from $(0,a)$. Show that $Var(X)\le a^2/4$

A random variable X has range from $$(0,a)$$. Show that $$Var(X)\le a^2/4$$.
The given hint is to show $$E[X^2]\le aE[X]$$ first, and use that to show $$Var(X)\le a^2[\beta(1-\beta)]$$, where $$\beta=E[X]/a$$.
I don't know how to start. I've tried using Cheyshev's inequality but it doesn't work. Can anyone give me a hint how to start? Any concept I've been missing?

• is that all the information in the question? – Siong Thye Goh Nov 27 '18 at 1:12
• @SiongThyeGoh I've edited some typos. And yes, that is all – Yibei He Nov 27 '18 at 1:19

$$E[aX-X^2]=E[X(a-X)]\ge 0$$
$$Var(X)=E[X^2]-E[X]^2\le aE[X]-E[X]^2$$
You know that $$Var(X)=\int_0^a(x-\mu)^2dx=\int_0^ax^2p(x)dx-\left(\int_0^axp(x)dx\right)^2$$, where $$p(x)\geq0$$ is the probability distribution and $$\mu=E(X)$$. Hence, $$Var(X)\leq a\int_0^axp(x)dx-\mu^2=\mu(a-\mu)=a^2\beta(1-\beta)=-a^2(\beta^2-\beta+1/4-1/4)=-a^2(\beta-1/2)^2+a^2/4\leq a^2/4$$ since $$0\leq x\leq a$$.