Demystifying Statistical Analysis 2: The Independent t-Test Expressed in Linear Regression

YS Chng
4 min readSep 2, 2018

Group comparison analyses such as the independent t-test and ANOVA may seem quite different from linear regression, but if we take a look at the cheat sheet in the first part of this series, we will notice that they actually fall under the same column of predicting a continuous dependent variable. The main difference is that t-tests and ANOVAs involve the use of categorical predictors, while linear regression involves the use of continuous predictors. When we start to recognise whether our data is categorical or continuous, selecting the correct statistical analysis becomes a lot more intuitive.

Categorical predictors (e.g. Male vs Female, Children vs Teens vs Adults, etc.) can be expressed in a linear regression using dummy or contrast codes. In fact, statistical packages such as SPSS automatically creates coded predictors in the background before running the appropriate statistical analysis, hence the term General Linear Model. In the next few parts of this series, I will attempt to illustrate how some of the popular group comparison analyses are represented in linear regression analysis, with the help of the textbook “Data Analysis: A Model Comparison Approach” by Carey Ryan, Charles M. Judd, and Gary H. McClelland. I hope that by drawing the connections between the various statistical analyses, it will become easier to identify when each statistical analysis should be used.

--

--

YS Chng

A curious learner sharing knowledge on science, social science and data science. (learncuriously.wordpress.com)