Statistical model & hypothesis test I found the following question in one of the older exam papers,

Protein expression of a certain marker is measured in 2 patients
groups of equal size (n=20) and at 2 different time visits. Assuming
an approximately Gaussian distribution of the marker expression and
homoscedasticity of noise, what would be an appropriate approach to
test the significance of the marker expression difference between both
patient groups while correcting for the effect of the visit? Note that
one ONE p-value should be computed here, not two.

So once I read this I thought that the model might be an unpaired 2 sample t-distribution model where the difference can be taken between the 2 visits for each group and then welch test can be carried out between the groups to find the significance.
But the question goes on to mention,

Hint: First define a statistical model of the form LHS~RHS, where LHS
denotes the expression level of the protein marker and RHS further
variables that should model this expression. In a second step identify
an appropriate statistical hypothesis test for assessing the
significance of the patient group.

Which then made me think it points towards linear regression model where maybe the significance could be calculated by anova.
But I asked my professor about the same question, and he told me:

For this particular question one has to consider two different
statistical effects:

*

*a time effect

*a patient group effect

Hence, a statistical model (more specifically a linear model) should look like:
expression ~ group + time
One can then test the hypothesis H0: beta_group = 0 (i.e. no group
effect) via a one sample t-test.

But I do not understand how a one sample t-test can be carried out here, if anyone can help me understand this, it would be highly appreciated.
 A: The question authors were clearly trying to get you to compare pre-post differences across groups. In that framework where mu was the mean of the group differences, the hypothesis would be that mu[A] = mu[B] and you would do a t-test on the cross-group differences, probably using a pooled estimate of the standard deviations. The regression would be LHS = paired, pre-post differences and the RHS would be intercept (beta[0]) plus group membership (beta[1]).  Depending on the coding used (which might vary across analysis platforms) the intercept would be  the first group trend (or the shared trend) and the beta[1] would be the difference from the first (or from the shared).
Your professor on the other hand was steering you in the directions of a repeated measures AnOVa. In this simple situation the two approaches should yield the same answer. The repeated measures AnOVa would yield an estimate of the overall change in values, and if an interactions were included in the  model would let you test for differences across groups in the amount of change. The test of no difference in change of mean values between groups would not be equivalent to a one-sample t-test, but rather equivalent to a two-sample t-test.
