310 likes | 439 Views
Example 2.11 Comparison of Male and Female Movie Stars’ Salaries. Exploring Data with Pivot Tables. Objective. To use a pivot table to break down data on actors by gender. ACTORS.XLS.
E N D
Example 2.11Comparison of Male and Female Movie Stars’ Salaries Exploring Data with Pivot Tables
Objective To use a pivot table to break down data on actors by gender.
ACTORS.XLS • Recall that this data set contains information on 66 movie stars, including their Gender, Domestic Gross, Foreign Gross and Salary. • Female actresses claim they are being underpaid relative to male actors. Do the data support this claim?
Pivot Tables • Pivot tables are one of Excel’s most powerful tools. They provide an incredible amount of of useful information about a data set. • Pivot tables allow us to “slice and dice” the data in a variety of ways.That I, they break the data down into subpopulations. • Statisticians often refer to the resulting tables as contingency tables or crosstabs.
Creating a Pivot Table • The first step in answering the question of whether the data support the claim by the actresses is to segregate data on males and females. • Although there are other ways to do this we will use a pivot table to determine the breakdown. • The following steps show how it can be done.
Creating a Pivot Table -- continued • Position the cursor in the data range. • Select Data/PivotTable Report menu item. This step takes you to a four step Pivot Table Wizard. • In the first step, asks for two pieces of information (1) the source of the data, and (2) whether you want an accompanying chart. For (1) the excel list or database option should be selected. For (2), there is absolutely no extra work in creating a chart, so you might as well select PivotChart. Then click Next.
Creating a Pivot Table -- continued • In the second step, specify the range of the data set. If you placed cursor in the data range this should be automatically set. • The final step asks you where you want to place the pivot table. We suggest placing it on a new worksheet.
Creating a Pivot Table -- continued • (Continued) There are two ways to proceed in this step. • First, you can click on Finish to obtain a “blank pivot table as shown on the next slide. • Alternatively, you can click on the Layout button as shown on the previous slide to obtain the dialog box shown on the slide after the next slide. We favor this approach. • You can either construct the pivot table now, or you can construct it later, by adding variables to the blank pivot table.
Creating a Pivot Table -- continued • Assuming you clicked on the Layout button you will get the dialog box on the previous slide. You now drag variable buttons to the four areas: row, column, data, or page. Essentially, the row, column, and page allow you to break the data down by the categories of the variables in these areas.For this example, drag Gender to the row area and Gender to the data area. The screen should appear as shown on the next slide. Click OK and then click Finish to create the pivot table shown on the slide after the next slide.
Creating a Pivot Table -- continued • The table shows there are 66 stars: 48 are male and 18 are female. • Suppose we want to express these counts as percentages of the total.
Creating a Pivot Table -- continued • To do so, go through the following steps: • Put the cursor on any cell with a count, such as cell B3. • Click on the PivotTable drop-down in the toolbar to see a menu. • Select Field settings in this menu to bring up a dialog box. • Click on the Options button of this dialog box and select % of the column in the Show data as drop-down. The resulting dialog box should appear as shown on the next slide. Click OK to see the counts as percentages.
Creating a Pivot Table -- continued • The resulting pivot table is shown on the next slide.
Creating a Pivot Table -- continued • To see the results graphically, look at the accompanying chart sheet shown on the next slide. • As with the numbers, this chart shows that almost 75% of the actors are male. Is this an important finding? • Without knowing exactly how these 66 actors and actresses were selected from the population of all actors and actresses, we can’t make very definitive conclusions.
Creating a Pivot Table -- continued • The remarkable property of pivot charts is that they are linked entirely to the associated pivot tables, and vice versa. If you change something in the pivot table, the pivot chart changes automatically. • Finally, you can manipulate pivot charts just like any other Excel charts. • We still don’t know whether women are underpaid so we will create another pivot table to examine the distribution of salaries, classified by gender.
Creating a Pivot Table -- continued • The following steps accomplish this: • Place cursor in data range. • Select Data/PivotTable menu item, and click on Next in the first two steps to accept the defaults. • In the Layout dialog box, drag the salary variable to the row area, drag Gender to the column area, drag Gender to the data area, and click on OK. • Click on Finish to accept the defaults on the final screen.
Resulting Pivot Table • It shows the number of men and women making each possible salary.
Creating a Pivot Table -- continued • The pivot table shows too much detail. To solve this problem we can group the salaries in various ranges. To do this follow these steps: • Right click any cell in the Salary column. • Select the Group and Outline/Group menu item. (As you can guess, the Ungroup menu item lets you get back to where you started.) • Specify that the groups should begin with 2, end at 20 and use increments of 3. Then click OK.
Modified Pivot Table • The modified pivot table should look essentially like the one on the next slide.
Creating a Pivot Table -- continued • Actually, to make yours look exactly like ours you’ll have to express counts as percentages of column. Also, we made three changes to the chart: • With the chart selected, use the Chart/Location menu item to locate the chart on the same sheet as the pivot table. • With the chart selected, click on the Chart Wizard toolbar button, and select the chart sub-type you prefer. We selected the first sub-type. • With the chart selected, click on the PivotChart drop-down in the PivotTable toolbar, and select the Hide PivotChart Field Buttons menu item. This makes it more suitable for printing.
Analyzing the Table • The pivot table makes it clear that over half the women in this data set are in the lowest salary category, whereas only 19% of the men are in this category. • Also, no women are in the highest two salary categories, whereas 23% of the men are in these categories
More Pivot Tables • Another way to compare the salaries would be to compare average salaries by gender. This can also be done by using a pivot table. • To complete this table: • Proceed as before to get to the Layout dialog box. • Drag Gender to the row area and Salary to the data area. Note that the data area says sum of salary. When a numerical variable is dragged to the data area the default is to show the sum.
More Pivot Tables -- continued • Double-click on the Sum of Salary button in the Data area to bring up a PivotTable Field dialog box, and select Average in the Summarize By list. As long as you are there, click on the Number button, and select Currency with two decimals.
More Pivot Table Analysis • Clearly, the male actors make considerably more on average than female actresses. • The analysis so far appears to indicate that the movie industry discriminates against women. • However, it is possible that women are paid less because movies with female leads gross less money than movies with male leads. • To analyze this further, we look at the average salary of men and women for each domestic gross level.
Another Pivot Table • This pivot table should be able to be done on your own. • If you need help here are the basic steps: • Drag DomesticGross to the row area • Gender to the column area • Salary to the data area - summarize by average • Set the domestic gross group values in increments of 20.
Another Pivot Table -- continued • Men average more than women in the two lowest domestic gross categories, but only barely in the third. Beyond the third category, it is hard to tell because no females were leads in real blockbusters. • Thus, we can now say with more assurance that the industry does appear to discriminate against women in terms of salary.