5 Sampling distributions in R

If we can describe the shape of a probability distribution for a random variable like temperature we can make predictions about the world. Sinister? Maybe. These are temperatures that I simulated from the Hudson River using historical data to estimate parameters of a multivariate normal distribution (muwahahaha).


In this Chapter, we’ll talk about probability and probability distributions as a backdrop for the models that we will be working with during the next several chapters. When we describe these from data we have collected, we call them sampling distributions. Probability theory is central to statistical techniques, so it will be important for you to have a pretty firm understanding of this to grab hold of big ideas later on. For now, play along and try to understand how they work. We’ll swing back later for a refresher.

In order to complete this Chapter, you will need to have the ggplot2, MASS, and Rlab packages loaded. The only one you should need to install is the Rlab package because MASS is installed when you install R, and we already installed ggplot2 with the tidyverse in Chapter3.

I’m going to load these now. In general, it is good practice to put these at the top of the script so we know they are needed.

library(ggplot2)
library(MASS)
library(Rlab)

None of the class data are required to complete this chapter.