Exercise

Plot the simulated data

Now create a scatterplot of the simulated observations to explore the direction and strength of the linear association.

With plot(x, y), you can create a scatterplot with the values of x on the x-axis and the values of y on the y-axis. You can customize the plot in many ways through additional arguments (see the documentation): pch to specify a plot symbol, cex to set the symbol size, col to set the color, main to add a title, or xlab and ylab to set axis labels.

Instructions

100 XP
  • Create a scatterplot of the simulated observations
  • Customize the plot in the following way: specify the plot symbol with pch = 16, set the symbol size to 2, set the color to "blue", use the title "Bivariate normal: rho = 0.9", and use the axis labels "x" and "y".