tmonk
- 3
- 0
I am attempting to derive the formula for the variance of a continuous uniform distribution where f(x) = \left\{ \begin{array}{ll}<br />
\frac{1}{b-a} & \mbox{$a \leq $x$ \leq b$};\\<br />
0 & \mbox{otherwise}.\end{array} \right.
I was successful, but only after using Wolfram Alpha to factorise the cubic.
By using Var[x] = \int_a^b \! x^{2}f(x)\, \mathrm{d}x - \mu^{2}
I got this:\frac{b^{3} - a^{3} + 3a^{2}b - 3ab^{2}}{12(b-a)}
The numerator just factorises to give (b-a)3, which gives the correct formula of \frac {(b-a)^{2}}{12}
I tried using algebraic division to divide by the common factor of b-a, but I don't think I did it right. Is there an easy way to factorise the cubic?
I was successful, but only after using Wolfram Alpha to factorise the cubic.
By using Var[x] = \int_a^b \! x^{2}f(x)\, \mathrm{d}x - \mu^{2}
I got this:\frac{b^{3} - a^{3} + 3a^{2}b - 3ab^{2}}{12(b-a)}
The numerator just factorises to give (b-a)3, which gives the correct formula of \frac {(b-a)^{2}}{12}
I tried using algebraic division to divide by the common factor of b-a, but I don't think I did it right. Is there an easy way to factorise the cubic?