# confused about unbiasedness of sample mean

Recently, in a different thread, I was convinced by others ( after claiming that they were wrong ) that the sample mean is unbiased for the mean of its underlying distribution. But the case of the chi-squared confuses me. Suppose one has a sample of $$n$$ chi-squared random variables.

Then $$E(X_{i}) = 1$$. So, $$E(\bar{X}) = \frac{n}{n} = 1$$.

Now the sample has a chi-squared($$n$$) distribution so it's expectation is $$n$$. So, how can the sample mean whose expectation equals $$1$$ be unbiased for $$n$$ ?

Should the statement be re-stated and stated as the "the sample mean is always unbiased for the mean of one observation of the random variable ".

• Why the expected value of $X_{i}$ is equal to 1?? Does $X_{i}$ comes from a chi-squared(n) distribution?? Aug 11 '21 at 21:05
• yes. the chi-squared rv can be viewed as a special case of a gamma r v. wiklpedia has a nice blurb on it. Aug 12 '21 at 20:15
• A chi-squared distribution with $k$ degrees of freedom has mean $k$ rather than $1$. Aug 14 '21 at 10:33

Hold on here

If $$X \sim \chi^2_{k}$$ then $$E(X) = k$$. This means that

$$E(\bar{X}) = E \left( \dfrac{1}{n} \sum_i^n X_i \right) = \dfrac{1}{n} \sum_i^n E (X_i) = \dfrac{1}{n} nk = k$$

Here, I've used linearity of the expectation. I think you've just confused $$n$$ as the degrees of freedom and $$n$$ as the sample size.

• yes. I think I'm okay now. The sum of the $x_i$ is chi-squared(n) but each individual $x_i$ is still chi squared(1). So the expected value of the mean is equal to the expected value of $x_i$ which is 1. thanks for clarification. Aug 12 '21 at 15:19

Suppose one has a sample of $$n$$ chi-squared random variables.

Then $$\mathbb{E}[X_i]=1$$. So, $$\mathbb{E}[\overline{X}_n] = \frac{n}{n} = 1$$

Now the sample has a chi-squared($$n$$) distribution so it's expectation is $$n$$. So, how can the sample mean whose expectation equals 1 be unbiased for $$n$$?

The confusion is possibly caused by the simultaneous use of $$n$$ to refer to the sample size/number of the chi-squared distributed random variables $$X_1, \dots X_n$$ in the sample, and also to the parameter of the chi-squared distribution.

Note that $$\mathbb{E}[X_i] = 1$$ would imply a chi-squared distribution with $$1$$-degree of freedom, so $$X_1, \dots, X_n \sim \chi^2(1)$$. But then you say that "the sample has a chi-squared($$n$$) distribution so it's expectation is $$n$$", which symbolically means $$X_1, \dots X_n \sim \chi^2(n)$$ and so $$\mathbb{E}[X_i] = n$$. As it stands, this is a contradiction when $$n \neq 1$$.

[...] the case of the chi-squared confuses me.

Let $$X_1, \dots X_n \sim \chi^2(k)$$ be i.i.d. random variables with a chi-square distribution with $$k$$ degrees of freedom. The wikipedia article on chi-squared distributions says that the mean $$\mathbb{E}[X_i] = k$$, and therefore we have

$$\mathbb{E}[\overline{X}_n] = \frac{1}{n}\sum^n_{i=1} \mathbb{E}[X_i] = \frac{1}{n} \cdot(nk) = k = \mathbb{E}[X_i].$$

Should the statement be re-stated and stated as the "the sample mean is always unbiased for the mean of one observation of the random variable ".

No, due to the proof and explanation supplied by Lucas Prates in this recent answer here.