Fall 2024
T test and linear regression
(two sides of the same coin)
Two groups (grp-1 and grp-2) – each with 1000 data points, normally distributed with mean of -0.1 and 0.1, respectively.
Categorical (factor) variable for Grp to ease interpretation of lm output.
The linear model uses a single, categorical predictor (Grp)
Grp:
Grp coefficient): the difference between the means of grp-1 and grp-2.Work out the math (OLS optimization) to see why the above must be true.