Risk function for vectors How do apply risk functions to vectors?
Here is the problem I have encountered:
Let $X = (X_1, X_2, . . . , X_p)$ be a collection of independent random variables with $X_i \sim N(\mu_i, 1)$
for $i = 1,2,...,p$ and $\mu = (\mu_1,\mu_2,...,\mu_p) \in \mathbb{R}^p$, and $p\geq 3$.  Let $\hat\mu = X$ be the maximum likelihood estimator for $\mu$. Show that $\hat\mu$ has risk
equal to $p$ when using a quadratic loss function.
How do you apply the risk function $$R(\mu,\hat\mu) = \mathbb{E}[(\hat\mu-\mu)^2]$$ to vectors $\mu$ and $\hat\mu$ and end up with a scalar?
 A: I think there is something wrong in the statement "  $\hat{\mu} = X$ is the MLE of $\mu$  ", because MLE cannot be just equal to random variable. If we want to use maximum likelihood, we have a multivariate normal distribution for $X$ with diagonal identity covariance matrix, then we can use the density of multivariate normal distribution in the formula of MLE (product of densities). 
Multivariate normal likelihood for $\mu$ is $\hat{\mu} = \frac{1}{N}\sum x_i$ ($x_i$ are $N$ sampled vectors). So if we have only one vector $x$ in our sample, then indeed $MLE(\mu)=x$.
But here the actual idea is that the value $x$ of random variable $X$ is taken as the estimator ($\xi$) of the mean $\mu$:
$$\hat{\mu}=\xi_{X}(\mu) = x$$
Let $\mu = EX$ and remember that covariance matrix is $E(X-\mu) (X-\mu)^T = I$ and $\| x \|^2 = x^T x$. 
Lets compute the quadratic loss $L(\mu,\hat{\mu}) =\|\mu - \hat{\mu}\|^2 $:
$$EL(\mu,\hat{\mu}) = EL(\mu,x) = E(X-\mu)^T (X-\mu) = p$$
In the last equality note that transpose is different, so we get sum of the diagonal elements instead of identity matrix.
