I the null hypothesis were true what would you expect the


Stat 11 Spring 2011 - Homework 9b

The question we are trying to answer is the following: On average, do baseball players at different positions make different salaries? Or are players at all positions equally well compensated, on average?

Download the datasets baseball1 and baseball2 from www.swarthmore.edu/NatSci/swang1/Stat11. The first dataset, baseball1, is an MS Excel file that contains salaries and positions for 100 randomly selected major league baseball players. The positions are catcher (C), first base (1B), second base (2B), third base (3B), shortstop (SS), and outfield (OF). Pitchers and designated hitters are not included. Recall that economic data such as salaries are often right-skewed (the "Bill Gates effect" from earlier in the course). To make the data more symmetric and to reduce outlying values, I have transformed the data by taking logarithms of the values. (We'll talk more about data transformations later in class.)

The first step is to copy and paste the data from Excel into Data Desk. Open the baseball1 dataset in Excel by double-clicking on it. Select the first two columns by clicking on the A and B column headings while holding down the shift key, and then select Copy from the Edit menu. Now double-click the Data Desk icon to open the program. (If you are asked for a serial number and ID number, these are given in the ReadMe file in the same folder as the program in the data-software server.)

After the program opens, select Paste from the Edit menu. Data Desk will display the first row of the data and ask you if you want to use these variable names, or if you want to enter your own names. Since the first row of the baseball1 dataset already contains the variable names, go ahead and click "Use these variable names". (If the dataset had not contained the variable names, you could have clicked on "Prompt for each variable name" to enter the names manually.) You should now see the Data Desk desktop and icons for each variable in the dataset.

(a) We begin by making a picture. Select log salary as Y (option-click the icon on a Mac; alt-click on Windows) and position as X (shift-click the icon on both Mac and Windows). Then choose Boxplot Y by X from the Plot menu. Describe the major features you see in the plot.

For example, does the average salary for each position appear to be the same? (Recall that boxplots display median salaries by position, while ANOVA is testing whether the mean salaries are equal. However, if the data are roughly symmetric (and they are-this was one of the benefits of taking logs of the data), the mean and median should be roughly equal.) Also, ANOVA requires that each position have roughly the same SD. Does this requirement appear to be approximately satisfied?

Copy the plot by clicking on the plot window's title bar and choosing Copy Window from the Edit menu, and paste it into a word processor document. Then type your answers near the plot.

(b) Now we will test if the various positions differ significantly in salary. State appropriate null and alternative hypotheses.

(c) With log salaries selected as Y and position selected as X, carry out the ANOVA by selecting ANOVA from the Calc menu (use the plain ANOVA option, not the ANOVA with interactions option). The program should open an ANOVA output table. Copy this window by clicking on the plot window's title bar and choosing Copy Window from the Edit menu (choose the Picture form option when you are prompted), and paste it into your word processor document.

(d) Give the value of the numerator of the F-ratio (measuring the variability between group means).

(e) Give the value of the denominator of the F-ratio (measuring the variability within groups).

(f) If the null hypothesis were true, what would you expect the (approximate) value of the Fratio to be? If the alternative hypothesis were true, what would you expect the value of the Fratio to be?

(g) What is the observed value of the F-ratio (i.e., the test statistic) in this dataset?

(h) What is the p-value associated with this F-ratio?

(i) What do you conclude about salaries among the different positions?

(j) Instead of comparing salaries for each position, we'll now compare all infielders (1B, 2B, 3B, and SS) with all outfielders (OF). This is a t-test for two independent samples. To do this in Data Desk, first open the baseball2 Excel file, and copy and paste only the first column (containing the log-salaries for infielders) into Data Desk. Now go back to the Excel file and copy and paste only the second column (containing the log-salaries for outfielders) into Data Desk. You may have to move the second window so it does not overlap the first.

To do a two-sample t-test in Data Desk, click on the icon for infielders and then shift-click on the icon for outfielders. Now go to the Calc menu and select Test. In the window that appears, click on the uppermost pop-up menu and select "2-Sample t-Test of µ1-µ2" (it may already be selected). Then click "Show Results". The window should then give you a report describing the hypotheses being tested, the test statistic ("t-Statistic"), and the p-value (on the last line). Copy the window and paste it into your word processor document. What are the test statistic and the p-value? What do you conclude about the salaries of infielders and outfielders?

Request for Solution File

Ask an Expert for Answer!!
Basic Statistics: I the null hypothesis were true what would you expect the
Reference No:- TGS01481042

Expected delivery within 24 Hours