$24
Download the data for the American League salaries from 2003 from the class website.
Undergraduate and Graduate Students
Draw a histogram of the salaries of all players in the American league.
In order to improve the readability of the histogram, scale the data so that the salaries are in millions of dollars. For example, Acevedo earned $900,000. You would depict this as 0.9.
Of course you need to provide an appropriate label for the x-axis so that it is clear that this is $ 0.9M and not 90 cents ;-)
Save the plot to a PDF
Open the PDF file to make sure that you succeeded.
Analyze the dataset to find out how many players make the lowest salary. Start by finding the minimum salary and the find those players that make that minimum salary.
How many millionaires are there?
How many players earn more than 10 million?
Graduate Students only
Compare the salaries of the New York Yankees to the salaries of the Oakland Athletics. Create two smaller datasets called yankees and oakland that contain the data for just these teams.
What is the total salary for each of these teams?
What is the largest salary on each team and who makes this amount?
What is the average salaries on both teams?
How many millionaires are there on each team?
Draw a histogram of the salaries of the two teams. Make a PDF of each of these histograms. Give them sensible titles and label the axes.
Turn in via dropbox:
Undergraduate and Graduate Students
The pdf of the histogram from (a)
A pdf document with your answers to (b), (c), (d)
Graduate Students only
A pdf of each of the histograms from (e.5)
A pdf document with your answers to e.1,e.2, e.3, and e.4