Winter 2025
Linear regression and t test
(two sides of the same coin)
Two groups (grp-1
and grp-2
) – each with 1000 data points, normally distributed (mu
is -0.1 and 0.1, respectively).
Categorical (factor) variable for Grp
to ease interpretation of lm output.
Work out the math to convince yourself that the below is true.
The linear model uses a single, categorical predictor (Grp
)
Grp
:
Grp
coefficient): difference in means (grp-1 vs. grp-2).