Exercise

Michael Jordan's first NBA season

Michael Jordan was one of the greatest basketball players of all time. Not only did he win six NBA titles with the Chicago Bulls, but he was selected as the Most Valuable Player (MVP) in five different seasons.

You want to explore the performances of "Air Jordan" in terms of points per game in his first season. You are especially interested in the variability of points scored over course of the season.

Instructions

100 XP
  • data_jordan, which is available in your workspace, contains Michael Jordan's points per game in his first NBA season. Print the data to the console.
  • Use the plot() function to make a scatterplot of the points column. Use the main argument to title the plot "Michael Jordan's first season"
  • Calculate the mean() points per game and save the result to mean_jordan
  • Add a horizontal line to the plot to show the mean points per game using the abline() function with one argument: h (for "horizontal"). For example, abline(h = 7) would create a horizontal line at the value 7.