The second moment of the uniform distribution is given by the formula,
E(X2)= (b2+ba+a2)/3.
Let X be a random variable following uniform distribution with values lying between ‘a’ and ‘b’. The pdf of X is given by the formula,
f(x) = 1/(b-a) where, a≤x≤b.
Proof:
E(X2) = a∫bx2f(x)dx = a∫bx2 * 1/(b-a) dx.
E(X2) = 1/(b-a) a∫bx2 dx = 1/(b-a) * [(b3 -a3)/3].
E(X2) = 1/(b-a) * (b -a)(b2+ba+a2)/3 = (b2+ba+a2)/3.
To summarize we have,
Proof (Using MGF) :
In order to find the second random moment of the uniform distribution using the MGF we should differentiate the moment generating function twice and then set t=0.
The MGF (Moment Generating Function) of the uniform distribution is given as,
On differentiating it twice we get,
Putting t=0 on both sides we get that,