Note: The following questions are from the 23th question of the 2005 Chinese Graduate Mathematical Entrance Examination (first set):
Suppose $X_{1}, X_{2}, \cdots, X_{n}(n>2)$ is a simple random sample from population $\mathrm{N}(0,1)$, and $\bar{X}$ is the sample mean ($\bar{X}=\frac{X_1+X_2+\cdots+X_n}{n}$), $Y_{i}=X_{i}-\bar{X}$, $i=1,2, \cdots, n $.
Now we need to solve the following problems:
(1) The variance $D Y_{i}$ of $Y_{i}$,$i=1,2, \cdots, n $.
(2) the covariance $\operatorname{Cov}\left(Y_{1}, Y_{n}\right)$ of $Y_{1}$ and $Y_{n}$.
I use n = 10
as a special case to solve this problem:
Y1 = TransformedDistribution[x[1] - Sum[x[i], {i, 1, 10}]/10,
Table[x[i] \[Distributed] NormalDistribution[], {i, 1, 10}]]
Variance[Y1]
Y10 = TransformedDistribution[x[10] - Sum[x[i], {i, 1, 10}]/10,
Table[x[i] \[Distributed] NormalDistribution[], {i, 1, 10}]]
Variance[Y10]
Covariance[Y1, Y10]
Correlation[Y1, Y10]
But the above code can't get the covariance of Y1
and Y10
correctly (the reference answer is $-\frac{1}{10}$). How can I use the function Covariance
to solve this problem?