Random variable $X$ has a continuous distribution with the probability density function below
$$f_X(x) = \begin{cases} \frac{81}{8}x^4e^{-3x}& x > 0 \\ 0 & otherwise \\ \end{cases} $$
(a) Determine the prediction of for a future $X$, if we have decided to predict using the mean of the distribution
(b) Determine the prediction of a future $X$, if we have decided to predict using the mode of the distribution
(c) Calculate the mean-squared error of the predictor in part(b) above.
attempt
I know this is the gamma distribution
(a)
This is $X$ ~ $Gamma(a=5, \lambda=3)$ so $E(X) = \frac{5}{3}$. By definition of Gamma $E(X) = \frac{a}{\lambda}$
(b) $f(x) = \frac{81}{8}x^4e^{-3x}dx$
$f'(x) = \frac{81}{8}x^3e^{-3x}(4-3x) = 0$, so $x = 0, 4/3$
The maximum is given by $x = 4/3$ in the original equation.
$f(4/3) \approx 0.586$
(c)
$MSE(mode) = E(X - \frac{4}{3})^2 = E(X^2 - \frac{8}{3}X + 16/9)$
$E(X^2) - 8/3E(X) + 16/9$
Need to find $E(X^2)$. We know $V(X) = E(X^2) - E(X)^2 \leftrightarrow E(X^2) = V(X) + E(X)^2$ and $V(X) = \frac{a}{\lambda^2} = \frac{5}{9}$ for gamma and $E(X) = \frac{5}{3}$
so $E(X^2) = 5/9 + (5/3)^2 = 10/3$
therefore $MSE(Mode) = E(X^2) - 8/3E(X) + 16/9 = 10/3 - 8/3 \cdot 5/3 + 16/9 = 2/3$
Is this correct?
(a) You are correct to recognize that $X \sim \text{Gamma}(5, 3)$, and your expectation is also correct.
(b) Your mode is correct. A quicker way to do it, however, is to recognize that the mode of random variable following a Gamma distribution with parameters $\alpha$ and $\lambda$ is given by $(\alpha - 1)/\lambda$ for $\alpha \geq 1$. So, in this case, the mode would be at $(5 - 1)/3 = 4/3$, which agrees with what you have.
(c) Yes, it is correct.