Documente Academic
Documente Profesional
Documente Cultură
In data processing, a pivot table is a data summarization tool found in data visualization programs such as
spreadsheets or business intelligence software. Among other functions, a pivot table can automatically
sort, count, total or average the data stored in one table or spreadsheet, displaying the results in a second
table showing the summarized data. Pivot tables are also useful for quickly creating unweighted cross
tabulations. The user sets up and changes the summary's structure by dragging and dropping fields
graphically. This "rotation" or pivoting of the summary table gives the concept its name.
3) Asking the right questions of available data, and 4) finally, carrying out the analysis correctly with
appropriate tools.
Three key reasons for organizing data into a Pivot Table are:
Below are the responses to a survey of 20 Company XYZ customers taken to determine the level of support for
a label change that has been proposed by the marketing department. You are to use EXCEL’s “pivot table”
options to produce summary tables for these responses.
1. Use EXCEL’s Pivot Table Report to produce a summary table like the one below, which shows a count of
respondents classified by age and support for the change:
Support change?
NO YES Grand Total
Age group
21-25 4 3 7
26-40 2 2 4
41-65 3 2 5
over 65 0 4 4
Grand Total 9 11 20
STEP 1:
Choose the Insert tab on the ribbon at the top of the screen, then select Pivot Table from the Tables
group.
Enter the range of the data you entered on the worksheet (e.g., A5:E25) or use your mouse to
highlight the data range. (Include the column labels, but don’t include the first column of
numbers…1,2,3…)
STEP 2:
This range may already be automatically entered for you. Be sure the box for existing worksheet is checked,
then click on the “location” box and enter the location of the cell on your worksheet where you want your
table to appear. Click OK.
STEP 3:
From the Pivot Table Field List that now appears on the right of your screen, use the mouse to drag
the “age group” label to the Row Lables box. Similarly, drag the “support” label to the Column
Labels box. Drag the “age group” label (again) to the Values box.
STEP 4:
To eliminate the “row labels” and “column labels” drop down menus from your table (if they appear),
right click on any cell in the main body of the table, then select Pivot Table Options from the list.
Choose the Display tab, then be sure the “Display field captions and filter dropdowns” box is
unchecked. Click OK.
2. Produce a table like the one below which shows the average income for respondents classified by
education and support for the proposed change.
STEP 1:
Choose the Insert tab on the ribbon at the top of the screen, then select Pivot Table from the Tables
group.
Enter the range of the data you entered on the worksheet (e.g., A5:E25) or use your mouse to
highlight the data range. (Include the column labels, but don’t include the first column of
numbers…1,2,3…)
STEP 2:
This range may already be automatically entered for you. Be sure the box for existing worksheet is checked,
then click on the “location” box and enter the location of the cell on your worksheet where you want your
table to appear. Click OK.
STEP 3:
From the Pivot Table Field List, use the mouse to drag the “education” label to the Row Lables
box. Similarly, drag the “support” label to Column Labels box. Drag the “income” label to the
Values box.
STEP 4:
Right click on any one of the cells in your table. In the menu that appears, pick Value Field
Settings. Click the Summarize by tab, then choose Average. Click OK.
3. Produce a table like the one shown below, which is based on the table you produced in Exercise 1. In this
case, cell values are shown as percentages of the total, rather than simple counts, making the cell entries joint
probabilities. (For example, P(Age 21-25 AND No Support) = 20%)
Support change
Age group NO YES Grand Total
21-25 20.00% 15.00% 35.00%
26-40 10.00% 10.00% 20.00%
41-65 15.00% 10.00% 25.00%
over 65 0.00% 20.00% 20.00%
Grand Total 45.00% 55.00% 100.00%
STEP 1:
Choose the Insert tab on the ribbon at the top of the screen, then select Pivot Table from the Tables
group.
Enter the range of the data you entered on the worksheet (e.g., A5:E25) or use your mouse to
highlight the data range. (Include the column labels, but don’t include the first column of
numbers…1,2,3…)
STEP 2:
This range may already be automatically entered for you. Be sure the box for existing worksheet is checked,
then click on the “location” box and enter the location of the cell on your worksheet where you want your
table to appear. Click OK.
STEP 3:
From the Pivot Table Field List that now appears on the right of your screen, use the mouse to drag
the “age group” label to the Row Lables box. Similarly, drag the “support” label to the Column
Labels box. Drag the “age group” label (again) to the Values box.
STEP 4:
To eliminate the “row labels” and “column labels” drop down menus from your table (if they appear),
right click on any cell in the main body of the table, then select Pivot Table Options from the list.
Choose the Display tab, then be sure the “Display field captions and filter dropdowns” box is
unchecked. Click OK.
STEP 5:
RIGHT CLICK on any cell in the main section of the table (not the first row or column that shows
labels). Select Value Field Settings. In the box that appears, click the Show values as tab. Click on the
down arrow next to Show Values As to display the list of options. Select % of Grand Total from the
list. Click OK. The modified table should appear.
4. Build a table like the one shown below, which is based on the table you built in Exercise 1. In this case, cell
values are shown as percentages of the column totals, making the cell entries conditional probabilities. (For
example, P(Age 21-25 GIVEN No support) = 44.44%.)
Support change
Age group NO YES Grand Total
21-25 44.44% 27.27% 35.00%
26-40 22.22% 18.18% 20.00%
41-65 33.33% 18.18% 25.00%
over 65 0.00% 36.36% 20.00%
Grand Total 100.00% 100.00% 100.00%
STEP 1:
Choose the Insert tab on the ribbon at the top of the screen, then select Pivot Table from the Tables
group.
Enter the range of the data you entered on the worksheet (e.g., A5:E25) or use your mouse to
highlight the data range. (Include the column labels, but don’t include the first column of
numbers…1,2,3…)
STEP 2:
This range may already be automatically entered for you. Be sure the box for existing worksheet is checked,
then click on the “location” box and enter the location of the cell on your worksheet where you want your
table to appear. Click OK.
STEP 3:
From the Pivot Table Field List that now appears on the right of your screen, use the mouse to drag
the “age group” label to the Row Lables box. Similarly, drag the “support” label to the Column
Labels box. Drag the “age group” label (again) to the Values box.
STEP 4:
To eliminate the “row labels” and “column labels” drop down menus from your table (if they appear),
right click on any cell in the main body of the table, then select Pivot Table Options from the list.
Choose the Display tab, then be sure the “Display field captions and filter dropdowns” box is
unchecked. Click OK.
STEP 5:
RIGHT CLICK on any cell in the main section of the table (not the first row or column that shows
labels). Select Value Field Settings. In the box that appears, click the Show values as tab. Click the
down arrow next to Show Values As to display the list of options. Select % of Column. Click OK.
The modified table should appear.
5. Following the pattern above,
a) Build a summary table of simple counts, showing “Sex” in the rows and “Age Group” in the columns.
b) Modify the table to “% of Grand total” in each cell. (Joint probabilities)
c) Modify the table to show “% of column” in each cell. (Conditional probabilities)
d) Modify the table to show “% of row” in each cell. (Conditional probabilities)
a) Build a summary table of simple counts, showing “Support Change” in the rows and “Sex” in the columns.
b) Modify the table to “% of Grand total” in each cell. (Joint probabilities)
c) Modify the table to show “% of column” in each cell. (Conditional probabilities)
d) Modify the table to show “% of row” in each cell. (Conditional probabilities)