Statistics for Sociologists

A Model-Based Approach

Author

Stephen Vaisey

Preface

This book is the first in a two-course sequence designed to help you become a competent quantitative researcher in sociology. This includes learning proper decision making, explanation, computation, visualization, and interpretation.

It is built around one idea: a statistical model is a compact description of a process, and most of what we call statistics is the business of proposing such descriptions, fitting them, and comparing them against each other.

AI note

Most of the words here are mine. I did use Claude to pull together some disparate elements from various iterations of this course over the years and there is still some “Claude-ese” in the verbal connective tissue. I’m working to replace all of that.

Who this is for

Some readers are first-year sociology PhD students who need a working command of probability and inference before going on to the models their research will actually require. Others are undergraduates who have chosen a rigorous data-analysis track and want the real thing rather than a simplified survey.

The book assumes no prior statistics background. Where something is genuinely hard, I try to go slow. When something is easier, I will go more quickly.

What is in scope

We will cover probability, inference, and basic models. We work our way from describing a single variable, through sampling distributions and the logic of inference, to regression models with a couple of predictors and an interaction between them. We finish with outcomes that are not continuous: tables, binary outcomes, and counts.

What is not here is causal inference. Nothing about matching, instrumental variables, difference-in-differences, or research design for identifying an effect. They are the subject of the course that follows this one. Keeping them out is deliberate: the machinery in this book has to be solid before questions about causation can be asked well.

How to read it

The code is in tidyverse style, to fit my own and my students’ preferred usage.

Every chapter that produces a figure produces it twice, once with tinyplot and once with ggplot2, in tabs you can switch between. Use whichever you prefer; they are (basically) the same figure. I wanted a reason to fool around systematically with tinyplot. I am generally a ggplot2 person, but I am intrigued by this package. And now, thanks to Claude (and a few hours of my own tinkering), there are ggplot2 versions of almost all the plots as well.

Most concepts here are demonstrated using simulations rather than derived analytically. If you want to know how a sample mean behaves, the most direct route is to draw a great many samples and look. I think this is easier for people who don’t have a strong math background, and it happens to be how many working researchers actually think.

Start with Setting up, which installs what you need and builds the data files the rest of the book uses.