Two statistics that baseball enthusiasts use to compare the overall strengths of one team against another are team batting average (the higher the batting average, the better) and team pitching average (the lower the earned run average, the better). Using the results for the National and American Leagues in 2009, shown in the table at the bottom of the page, investigate the relationship between team batting averages and earned run averages.
a. Convert the table to ranks of (1) batting averages and (2) earned run averages for the National League and the American League, showing the league (A or N) represented by a team’s rank.
b. Use the Mann–Whitney U test to test the hypothesis that (1) the batting average of the American League is higher and (2) the earned run average of the National League is lower. Use the 0.05 level of significance.