Session Ready
Exercise

First random sample, second random sample

Now, you will dive in to understanding how linear models vary from sample to sample. Here two random samples from a population are plotted onto the scatterplot. The population data (called popdata) already exists and is pre-loaded, along with ggplot and dplyr.

Instructions 1/3
undefined XP
  • 1
  • 2
  • 3
  • Using the whole dataset, popdata, plot response vs. explanatory.
  • Add a point layer using geom_point().
  • Add a smooth trend layer using geom_smooth(), with the linear regression method, "lm", and no standard error ribbon, se = FALSE.