This section of the site contains miscellaneous examples, explanations, and materials I have found useful in teaching statistics. When I find myself explaining something often, but it is not specifically covered in my courses, I may add it to this list so I can refer students here for extra information.

R Logo

R Workshop Videos

Keywords: data processing, plot, programming, R, regression, software, video

This page presents video recordings from one of my workshops introducing the R statistical computing environment for practical data analysis. Specifically, I ran an eight-hour workshop in Spring 2020 and then split the footage into numerous shorter videos. The next several resources listed below on the current page relate to parts of this workshop, or similar workshops like it that I have run in the past.

R Logo

Introduction to R Workshop Summary [pdf]

Keywords: programming, R, software, workshop materials

This document summarizes the first three units of my workshop series introducing new users to the R statistical computing environment. The full workshop series focuses on statistical computing tasks commonly employed by psychologists, but I have revised this summary for a more general audience. The summary makes reference to example data and syntax files, which can be downloaded as a zip archive here: R Workshop Example Data and Syntax.

R Logo

Cheat Sheet for Beginning R Users [pdf]

Keywords: programming, R, software

This document provides a one-page (front and back) summary of some of the basic functions and commands in R. It focuses on statistical computing tasks commonly employed by psychologists. It is designed to accompany my "R for Psychologists" workshop series, but it should also be comprehensible on its own.

Plot Demo Icon

Introduction to R Workshop Plotting Demo [pdf]

Keywords: bar plot, box plot, plot, programming, R, scatterplot, software, workshop materials

This document provides examples of several kinds of plots in base R. Please see the step-by-step walkthrough in the associated text file: Base R Plotting Demo. I created these examples for my Introduction to R Workshop Series.

Main Effects vs. Interaction Icon

Tutorial on Main Effects vs. Interaction in a Regression Model

Keywords: covariate, interaction, main effect, R, regression, simple linear regression, video

On December 18, 2020, I held a live Zoom session explaining the difference between a linear regression model with two main effects and the same model with an interaction, using a silly dog-related example. I split the recording of the session into eight videos in a Youtube playlist. The R code used in these videos is available here: Regression Main Effects vs. Interaction [text].

Types of Main Effects Icon

Types of Main Effects in Factorial ANOVA Models

Keywords: ANOVA, F-test, interaction, main effect, R, regression

This page answers questions about types of main effects (or types of sums of squares) in factorial ANOVA models. Why do tests of main effects sometimes differ between software packages? What do "Type II" and "Type III" mean? What are the various ways that a main effect can be defined in the context of an interaction? Unfortunately, the answers are not always straightforward. Defining main effects is often harder than defining the highest-order interaction in a model.

Skew Icon

What are Positive Skew and Negative Skew?

Keywords: distribution, histogram, skew

This page clarifies what positive and negative skew "look like." Students sometimes find it difficult to remember which is which, so the plots on this page are accompanied by descriptions that explain in general terms what skew is and how to recognize it.

T Distribution Icon

Expected Values of t and F Statistics

Keywords: distribution, expected value, F-test, t-test

This image illustrates the expected values of a t-distributed random variable and an F-distributed random variable. Under the null hypothesis, the expected value of t is 0, but the expected value of F is 1. This is sometimes confusing for students given that F is t squared.

Chi-Squared Icon

Binary Outcomes: Chi-Squared Test of Independence or Goodness of Fit? [pdf]

Keywords: binary outcome, chi-squared, expected distribution, goodness of fit, independence

To test whether a categorical variable is related to the presence of a binary characteristic, the appropriate chi-squared test is a test of independence (or association). Some students might be curious why we cannot run a chi-squared test of goodness of fit. After all, the null hypothesis assumes that the characteristic in question will be evenly distributed across the categorical variable, and this sounds very much like an "expected distribution." This document explains why the test of independence is more appropriate and what happens if you run a goodness-of-fit test instead.

Variance Icon

Combined Variance of Two Groups with Equal Numbers of Observations [pdf]

Keywords: combined variance, repeated measures, SPSS

If we have two groups of n observations each, and we know the mean and sample variance of each group separately, how can we calculate the mean and sample variance of the combination of the two groups? This can become an issue when trying to report means and standard deviations for the main effects in a repeated-measures or mixed-model ANOVA using SPSS. SPSS does not include as part of its typical descriptive statistics the standard deviation of the dependent variable across multiple levels of a repeated-mesures factor.

A common heuristic for interpreting three-way interaction plots is to look at the "simple" two-way interaction in the left half of the plot and the "simple" two-way interaction in the right half of the plot separately. If these two-way interactions "look different," then we say that there is a three-way interaction. This heuristic does not always work, and this document explains why using an example.

Beta-hat-star Icon

Notation Conventions for Regression Slopes [pdf]

Keywords: B, beta, coefficient, estimate, notation, regression, slope

The notation for regression coefficients is often inconsistent. Sometimes, students with prior experience in statistics classes find the notation conventions common in psychology confusing, and vice versa. This table illustrates some of the different symbols that are used to refer to regression coefficients.

Standardized Slope Icon

Standardized Simple Linear Regression Slopes: Swapping the Predictor and Outcome Variables

Keywords: correlation, regression, simple linear regression, slope, standardize, Z-score

When students learn that the least-squares line drawn through standardized versions of two variables has a slope equal to the correlation between those variables, they sometimes wonder how it can be that it does not matter which variable is presented as the predictor and which is presented as the outcome. After all, the unstandardized slope depends on which variable is the predictor and which is the outcome, so why would correlation (standardized slope) be the same regardless? The images on this page attempt to make this concept more intuitive.

Missingness Indicators Icon

Missingness Indicators in Linear Regression [pdf]

Keywords: categorical variable, indicator, missing data, numeric variable, regression

Many researchers will happily treat missing values in a categorical variable as their own distinct category, but balk at doing the same for a numeric variable. This document explains what it means to include a missingness indicator in a linear regression model. The implications of using one variable to indicate the missingness of another are often misunderstood. Although this approach must be used cautiously, learning about it helps illustrate general principles about regression.