so I got questions a + b right but when I got to c I made a couple of mistakes. Can someone tell me how to do c? I thought I was doing it right but I got the degree of freedom wrong and the symbols.

- 361
-
1There seem to be errors and inconsistent comments in your handwritten note. I hope my Answer helps clarify some of the issues. – BruceET Aug 21 '16 at 09:03
1 Answers
The sum $U = \sum_{i=1}^5(X_i - \bar X)^2,$ where $\bar X$ is the mean of the five observations, has $U \sim Chisq(\nu = 4).$ You say you have shown that.
Also, $X_6^2 \sim Chisq(\nu = 1).$ Then $T = U + X_6^2 \sim Chisq(\nu = 5),$ which can easily be shown using moment generating functions.
For a visual demonstration, the following R program generates a million realizations of $U$ and $T.$ One indication that they have chi-squared distributions with degrees of freedom 4 and 5, respectively, is that $E(U) = 4$ and $E(T) = 5$ are well approximated by the simulations.
[Note: Perhaps surprisingly, the sample mean $A = \bar X$ and the sample variance $S^2 = U/(n-1)$ are stocastically independent (for normal data only), even though they are not functionally independent ($\bar X$ appears in the formula for $U$). This is indicated in the simulation because $Cor(A, U) = 0$ is well approximated.]
m = 10^6; n = 5; x = rnorm(m*n)
DTA = matrix(x, nrow=m) # each row a sample of five
u = (n-1)*apply(DTA, 1, var) # numerators of m sample variances
a = rowMeans(DTA) # vector of m sample means
v = rnorm(m)^2; t = u + v
mean(u); mean(t)
## 3.998416 # aprx E(U) = 4
## 4.999412 # aprx E(T) = 5
cor(a, v)
## -0.0003179211 #aprx C(A, U) = 0
Another verification is that the density curves of $Chisq(4)$ and $Chisq(5)$ fit the histograms of the respective simulated distributions.
Here is the R code for the figure, in case it is of any interest to you.
par(mfrow=c(1,2)) # 2 panels per plot
hist(u, prob=T, col="wheat", ylim=c(0,.2), main="U ~ CHISQ(4)")
curve(dchisq(x,4), lwd=2, col="blue", add=T)
hist(t, prob=T, col="wheat", main="T ~ CHISQ(5)")
curve(dchisq(x,5), lwd=2, col="blue", add=T)
par(mfrow=c(1,1)) # return to default plot mode
Caution: Finally, you refer to 'subtraction' in your title. Just so there will be no confusion: It is true that if $X \sim Chisq(m)$ and independently $Y \sim Chisq(n),$ then $X + Y \sim Chisq(m+n),$ for positive integers $m$ and $n.$ However, it is not true that $X - Y \sim Chisq(m - n),$ even if $m > n.$
- 51,500
-
Thank you so much for this. I got really confused because I assumed the form it'd appear in and this really helped. – NookLines Aug 21 '16 at 18:06

