Assignment 3

Create a scatterplot investigating the relationship between the amount of money major league baseball teams spend on their players and the number of wins they have in a season. Here is the data for the payroll amounts for MLB teams in 2018 (rounded to the nearest million) and the number of wins they had that season.

Team

2018 Payroll (million $)

2018 Wins

Cubs

212

95

Yankees

205

100

Nationals

204

82

Red Sox

204

108

Giants

200

73

Angels

177

80

Dodgers

171

92

Astros

166

103

Cardinals

165

88

Mariners

153

89

Rockies

151

91

Mets

149

77

Phillies

145

80

Reds

134

67

Brewers

128

96

Indians

123

91

Braves

118

90

Twins

115

78

Diamondbacks

108

82

Rangers

107

67

Tigers

105

64

Royals

103

58

Athletics

103

97

White Sox

91

62

Orioles

80

47

Pirates

76

82

Padres

76

66

Blue Jays

71

73

Marlins

71

63

Rays

53

90

  • Create a scatterplot for this data. Place the explanatory on the horizontal axis and response variable on the vertical axis. Label the axes and identify the scale on each axis
  • Calculate the correlation value, r, using the formula:
    ????=????(????????)(????)(????)[????(????2)(????)2][????(????2)(????)2]r=n(xy)(x)(y)[n(x2)(x)2][n(y2)(y)2]
  • Select two points and use them to define the line of best fit, . Identify these points and sketch the line on the scatterplot.
  • Use the line you defined to estimate the number of wins $150 million would buy in 2018. How does this compare to the Rockies and Mets performance that year.
  • Identify any outliers on the scatterplot. For this case, an outlier is defined as any team that is more than 15 wins away from the predicted value from the line of best fit.