Sampling distributions
Draw sample after sample and watch where the slopes land.
A regression gives you one slope from one sample. A different sample would give a different slope. This tool draws sample after sample, so you can see where all those slopes land.
It opens on a regression slope. To see any other statistic, from a z-score to an F-ratio, use the menu What are we computing?
Press +1 to draw a sample, then +50 or +500 to draw many. Click any dot to see the sample behind it.
This is a tool to play with, not an assignment.
Things to try
Each link opens the tool ready to go. Before you press anything, predict what will happen.
- What is a standard error? Slopes from samples of 20. Each dot is one estimate of the slope, and they center on the true slope of 0.40. In the table, SD of b is the standard error. Now set Observations per sample to 80 and press +500. What happens to that SD?
- A null world for a slope. Set the true slope to 0. X and Y are unrelated here, yet about 5% of samples land beyond the cutoffs. Each of those is a false positive.
- A real slope. Set the true slope to 0.5. Now the share beyond the cutoffs is the power of the test.
- A yes/no predictor. Compare two groups. When X is 0 or 1, the slope is the difference between two group means, as in Section 1.1 of the Week 2 reading.
- Does the population have to be normal? Means from a skewed population. With 2 observations, the means are still skewed. Set Observations per sample to 30 and draw again.
- Why t and not z? First use z, with the true σ. About 5% of samples land beyond ±1.96. Then use t, with an estimate of σ. In the table, look at Beyond ±1.96. Then raise the number of observations and watch the problem fade.
Credit
This tool was written for EDUC 15 and adapted for this course. It was inspired by Kristoffer Magnusson’s p-value visualization at R Psychologist.