# Question about the correct variance to use

• Apr 5th 2011, 08:34 AM
noob mathematician
Question about the correct variance to use
I am currently analysing a longitudinal study regarding a treatment group and measurements were taken over 5 intervals. (for example week 1, week 2, week 3, week 4 week 5 etc). There are in fact 10 subjects (for example 10 rats) in this group and I am interested to find out:

$H_0:\bar Y_{week2}-\bar Y_{week1}=0$, where $\bar Y_i$ is the mean weight of the rat at week i

I have done a proc mixed in SAS with unstructured covariance matrix as defined below:

Row Col1 Col2 Col3 Col4 Col5
1 21.5756 33.0196 31.5821 27.9476 23.2321
2 33.0196 68.7274 69.0607 60.7339 52.9107
3 31.5821 69.0607 94.7690 109.63 116.16
4 27.9476 60.7339 109.63 166.91 190.55
5 23.2321 52.9107 116.16 190.55 249.72

with $\bar Y_{week1}=54, \bar Y_{week2}=78.5$ What should I do to test the hypothesis?

This is what I have done:

$\frac{78.5-54}{\sqrt{21.5756+68.7274-2(33.0196)}}=\frac{24.5}{\sqrt{24.2638}}=4.974$

Am I right to define the denominator as above? Is this a Z-test or t-test?

*Note that I have simplied my question to direct it to my doubt*
• Apr 5th 2011, 03:40 PM
pickslides
As your sample size is quite small this should be a t-test. To formulate your test statistic you will have to test if you variances are equal first.

Going back a step i'm not really sure what the data represents. Can you explain further?
• Apr 5th 2011, 06:24 PM
theodds
A couple of quick points:

(1) Your null hypothesis makes no sense. Hypotheses are formulated about parameters, not statistics. It should probably read $\mu_1 - \mu_2 = 0$ where \mu_i is the mean during the i'th week.

(2) Run this as a paired T-Test, not a two sample T-Test. I don't think you can push through the usual distributional results with that general covariance structure for the two sample test, but the paired T-Test should be unaffected (and it should be more powerful in general, anyways).
• Apr 5th 2011, 08:53 PM
noob mathematician
Quote:

Originally Posted by theodds
A couple of quick points:

(1) Your null hypothesis makes no sense. Hypotheses are formulated about parameters, not statistics. It should probably read $\mu_1 - \mu_2 = 0$ where \mu_i is the mean during the i'th week.

(2) Run this as a paired T-Test, not a two sample T-Test. I don't think you can push through the usual distributional results with that general covariance structure for the two sample test, but the paired T-Test should be unaffected (and it should be more powerful in general, anyways).

Hi thanks for the input,

I do agree with the first point.

However I have some difficulties understanding your point in the second point. Can I do a paired T-test even though normal distribution is not assumed and variances for 2 groups are unequal? What about the degree of freedom? The samples size are different

Care to share with numerical example with regards to this simple hypothesis?
• Apr 5th 2011, 09:02 PM
noob mathematician
Quote:

Originally Posted by pickslides
As your sample size is quite small this should be a t-test. To formulate your test statistic you will have to test if you variances are equal first.

Going back a step i'm not really sure what the data represents. Can you explain further?

Thanks for the input,

Note that we take into consideration the correlation of the measurement of different timing (e.g. week), therefore I can't assume that they are independent.

The data presented are the covariance structure that is used to generate the REML (restricted maximum likelihood) for the parameters which I never show
• Apr 6th 2011, 06:35 AM
theodds
Quote:

Originally Posted by noob mathematician
Hi thanks for the input,

I do agree with the first point.

However I have some difficulties understanding your point in the second point. Can I do a paired T-test even though normal distribution is not assumed and variances for 2 groups are unequal? What about the degree of freedom? The samples size are different

Care to share with numerical example with regards to this simple hypothesis?

If you aren't assuming a normal distribution then you can't really do any T tests. You asked if a T-Test was okay, so I assumed you had normality.

How are sample sizes different? You have 10 rats that you are taking repeated measures on. Are some rats dying between weeks? You should have 1 observation for each rat for each week. It's fine that the variance differs between weeks because the differences in the weights of the rats will be iid with the same variance, i.e. the change in Rat 1's weight should be equal in distribution to the change in Rat 2's weight, and these guys should be independent. And normally distributed if you are assuming normality, which would give you a paired T-Test. Your new data becomes the differences over the first week, and you just test whether this is equal to zero.