Hello all,

I asked here a question not long ago regarding binary clustered data. Now I have a different yet similar question.

I have one sample (one vector), of let's say 40 observations, coming from 30 subjects. If it makes it easier, let's assume 60 observations, each subject gives 2 observations. I want to calculate the mean and variance of this sample.

As far as I understand, the correlation within a subject, shouldn't affect the mean. However, the variance should be somehow adjusted. I would like to know two things:

1. From probability theory point of view, how do I write the relation between the correlation and the variance in such a case ?
2. [and most important], how do I analyze it (note: it's a one sample, not a comparative data which fits regression models of any kind) ?

Thank you !