# Compute the Risk function

Suppose we are given $$(X_1,...,X_n)$$ random variables which are iid. from $$\mathcal{N}(\mu,\theta)$$ and finite variance. Let $$Y=\frac{1}{n}\sum_{i=1}^n(X_i-\overline X)^2$$ and define a loss function $$L(\theta, d(y))=(\theta-d(y))^2$$, where $$d(y)=by$$ where $$b$$ is constant.

I want to compute $$R(\theta, d)=E_\theta((\theta - by)^2)$$.

This is my first exercise in decision theory, so I am not sure what to do next. I assume, that by $$y$$ we mean a realization of $$Y$$.

The only thing I can think of is doing something like this:

$$R(\theta, d)=E_\theta(\theta^2 -2bY\theta +b^2Y^2)= E_\theta(\theta^2)-2b\theta E_\theta(Y)+b^2E_\theta(Y^2))$$

However, I have no idea on how to compute the actual terms. If we consider $$\theta$$ as random variable, then what is its expectation?

EDIT: Using that $$Y\sim \chi^2(n)\theta$$ I obtain

$$R(\theta, d)= E_\theta(\theta^2)-2b\theta E_\theta(Y)+b^2E_\theta(Y^2))=\theta^2 -2bn\theta^2 +b^2E_\theta[(\theta\chi^2(n))^2]$$

• (1) What does a subscript $\theta$ mean under the expectation operator $E$? (2) "$y$" must be the same as $Y:$ a single realization of a random variable has no probability at all; it's just a value. Observe that the distribution $Y$ is $\sigma^2$ times a $\chi^2(n)$ variable and go from there. It will help to know that the fourth moment of a standard Normal variable is $3.$ (3) Fix the mistakes in your expansion of $R$ in the last formulas. – whuber Oct 13 '19 at 17:29
• @whuber I made the corrections and tried to continue with the example. Is my computation correct so far? How should I compute the last term? – EpsilonDelta Oct 13 '19 at 17:52
• Your uses of "$\theta$" are mysterious and don't seem to be algebraically correct--I can't figure out what it means as a subscript or why it keeps disappearing and reappearing in your equations. – whuber Oct 13 '19 at 17:56
• @whuber I am sorry, I made a mistake. We have that $X_i\sim \mathcal{N}(\mu, \theta)$. For the notation $E_\theta$ I am not entirely sure, as I just used the definition of the risk function from wikipedia. – EpsilonDelta Oct 13 '19 at 18:31