CHAPTER 7:
DESCRIPTIVE STATISTICS
AND PIVOT TABLE
DESCRIPTIVE STATISTICS
• A collection of quantitative measures and ways of
describing data
• Example: Frequency distributions, histogram,
measures of central tendency (mean, median,
mode, proportion) and measures of dispersion
(range, variance, standard deviation)
DESCRIPTIVE STATISTICS
• Excel provides a useful tool for basic data analysis,
available under the Data Analysis ToolPak from the
Tools menu
• Descriptive statistics can also be computed by
entering statistical functions directly in worksheet
cells
PRACTICE
*open template: Exercise !!!
1st:
2nd:
3rd:
4th:
5th:
6th:
:

7th

click Tool, choose Add Ins
click the Analysis ToolPak box, press OK
click Tool, choose Data Analysis
choose Descriptive Statistics, press OK
highlight the column that contain the data
tick Output Range and highlight the empty
cell that you wish to place the result
tick the Summary statistics box, press OK
FILTERING
• A quick and easy way to extract certain records
from a database created in Excel.
• The filtering makes it possible to manipulate the
records as a group of their own.
• Unlike sorting, filtering does not rearrange the list,
instead it hides the rows containing the records that
do not meet the criteria.
PRACTICE
1st:

Create new record in Excel (show at least 3
column of data): example – Month, Brand, RM
or Name, Subject, Marks
2nd: Point at the first column title, choose Data
3rd: Choose Filter, then AutoFilter
4th: Examine the effect to the record
ADVANCED FILTERING
• Can be used to create a separate table of record
from the main record.
• There are 6 standard Comparison Operators
(=,>,<,<=,>= and <>) to be used to set the criteria for
numerical value.
• Syntax to set the criteria for text: =“=text”
• Excel will match the content with the text type by
user.
• The asterisk (*) and question (?) mark are wildcard
characters
• They are used in criteria statements to represent
one or more characters.
• Example:
=“=?an” would return Dan, man and fan
=“=*an” would return man, woman, American
PRACTICE
* stop the AutoFilter features for the current record
1st:
2nd:

create new table (with the same column title)
place the criteria in the cell below the column
title of the new table
3rd: highlight the whole record including the
column title
4th: choose Data  Filter  Advanced Filter
5th: for Criteria range:, highlight the new table
containing the criteria (including the column title)
PRACTICE
6th:
7th:
8th:

tick copy to another location
for Copy to:, point at any empty cell that you
wish to place the new projected table
examine the result
PIVOT TABLE
• A tool useful for summarizing the variables
contained in an Excel sheet.
• Located in Data menu.
• Be sure to provide a variable label at the top of
each column in the worksheet, because labels are
necessary when constructing a pivot table.
• Why Pivot?
to summarize data contained in lengthy list
into a compact format
to find relationships within the data
to organize data into a format that’s easy to
chart
TO CREATE PIVOT TABLE
1.

2.

3.

4.

Select cell in the worksheet
that contains data, or select
all the data and columns
you want to include in the
report. On the Data menu,
click PivotTable and
PivotChart Report.
In Step 1 of the wizard, make
sure that Microsoft Excel list
or database is selected.
Under What kind of report do
you want to create?, make
sure that PivotTable is
selected.
Click Next.
PIVOT TABLE
5.

Select the data Range you wish to include in your PivotTable
 $A$1:$H$24 (cells that contain your data)
 Sheet1!$A:$H (columns that contain data)
 MyData (a named range that contains data)
PIVOT TABLE
6.
7.

Select where you want your PivotTable to reside (the default is a
new worksheet within this workbook)
The create your PivotTable, either click Layout or Finish

Note: If you get
the below
message and you
are concerned
about file size,
click Yes
PIVOT TABLE
• Remember the rules of where to place data fields:
• Row Fields: display data vertically, in rows
• Column Fields: display data horizontally, across columns
• Data Items: numerical data to be summarized
• Page Fields: display data as pages and allows you to filter to a
single item
• Note: If the field list is hidden, click Show Field List on the PivotTable
toolbar.
• 2 ways to update:
• Use the layout option in the Wizard
• Or, create an empty PivotTable and drag in fields from the field list
FORMATTING
• Rename the fields in the gray boxes. Click the field name, retype,
and then press ENTER.
• Format Numbers:
• Click a cell that contains numerical data, or the name of the field
heading for that data.
• Click the Field Settings button on the PivotTable toolbar, and then
click Number.
• In the Format Cells dialog box, click any option in the Category list.
• Click OK twice.
• You may use cell formatting buttons
• Note, hover at column or row beginning until you get a black
arrow to select that column or row before applying the format
FORMATTING
• Apply an automatic format
• Click in the report, and then click the Format Report button on the
PivotTable toolbar
• Select a format in the AutoFormat dialog box
• Select PivotTable Classic to remove auto formats  
• Generally apply auto formats as a last step
CHANGE THE DISPLAY
• Change sort order
• Click the field heading or any cell in the list that contains the data
you want to sort.
• On the PivotTable toolbar, click PivotTable, and then click Sort and
Top 10.
• Under AutoSort options, click Descending or Ascending.
• Click OK.
• Change how data is summarized
• Click a cell in the data area or the field heading for the data area.
• Click the Field Settings button on the PivotTable toolbar.
• In the Summarize by list, click an option, and then click OK.
ADD FIELDS
• Drag in fields from the PivotTable Field List or return to the PivotTable
Wizard and click Layout
• If the PivotTable Field List is not visible, click on the report
• You don't have to undo an existing report to add another field
• More than one field can be dragged onto any of the drop areas on
the report
• A PivotTable report with more than one row field has one inner row
field (closest to the data area) and other outer row fields
• Items in the outermost row field are displayed once; items in the
rest of the row fields are repeated as necessary
• Any field can be used more than once on a report, even in the
same drop area
CALCULATION OPTIONS
• Use a summary function other than SUM
• Click the data field heading or a cell within the data field, and
then click the Field Settings button on the PivotTable toolbar.
• In the Summarize by list, select a different summary function, and
then click OK
• Use a custom calculation* to show data another way
• Click in one of the cells in the data area
• On the PivotTable toolbar, click the Field Settings button
• Click the Options button
• In the Show data as list, click the arrow, scroll down the list, and
then make a selection such as % of total. Click OK.
* Use with caution. Make sure you are getting expected results.
CALCULATION OPTIONS
• Use calculated fields* or calculated items* to enter your own
formulas based on the information in the data area in a PivotTable
report.
• Calculated field: when using data from another field in your
formula
• For example, compute student/faculty ratio when student
count and faculty count are two separate fields
• Calculated item: when using data from one or more specific items
within a field
• For example, compute % of students that are female when
gender is one field
* Use with caution. Make sure you are getting expected results (for
example, does your total row sum the percentages or recalculate
the percentages?)
CHANGE THE DATA
• After changes are made to the information source, click the Refresh
Data button
• If you have added columns or rows to your data source, make sure
to update the data range
• Right click on the PivotTable, click PivotTable Wizard, click the
back button
• Note, if you insert rows into your current data range, the PivotTable
will automatically update
CELL REFERENCES
• GETPIVOTDATA function appears automatically when you type an
equal sign (=) outside of the report and then select a cell inside the
report
• GETPIVOTDATA function retrieves data from the report and
continues to do so even if the report layout changes.
• If you remove any of the fields referenced in the GETPIVOTDATA
formula from the report, the formula returns #REF!.
• If you do not want to use the function:
• Type an equal sign (=) in a cell outside of the report.
• Type the cell address that contains the value that you want to
reference.
CELL REFERENCES
• You can also add a button to the PivotTable toolbar to turn the
GETPIVOTDATA function on and off.
• With a PivotTable report open, on the PivotTable toolbar, click the
Toolbar Options arrow on the right end of the toolbar.
• Click Add or Remove Buttons, click PivotTable, and then click
Generate GetPivotData.
• When you click in your worksheet, you'll see the Generate
GetPivotData button on the toolbar. When selected, the button
turns the function on. Select the button to turn the function on or
off.

Chapter 7 -DescriptiveStatistics and Pivot Table

  • 1.
  • 2.
    DESCRIPTIVE STATISTICS • Acollection of quantitative measures and ways of describing data • Example: Frequency distributions, histogram, measures of central tendency (mean, median, mode, proportion) and measures of dispersion (range, variance, standard deviation)
  • 3.
    DESCRIPTIVE STATISTICS • Excelprovides a useful tool for basic data analysis, available under the Data Analysis ToolPak from the Tools menu • Descriptive statistics can also be computed by entering statistical functions directly in worksheet cells
  • 4.
    PRACTICE *open template: Exercise!!! 1st: 2nd: 3rd: 4th: 5th: 6th: : 7th click Tool, choose Add Ins click the Analysis ToolPak box, press OK click Tool, choose Data Analysis choose Descriptive Statistics, press OK highlight the column that contain the data tick Output Range and highlight the empty cell that you wish to place the result tick the Summary statistics box, press OK
  • 5.
    FILTERING • A quickand easy way to extract certain records from a database created in Excel. • The filtering makes it possible to manipulate the records as a group of their own. • Unlike sorting, filtering does not rearrange the list, instead it hides the rows containing the records that do not meet the criteria.
  • 6.
    PRACTICE 1st: Create new recordin Excel (show at least 3 column of data): example – Month, Brand, RM or Name, Subject, Marks 2nd: Point at the first column title, choose Data 3rd: Choose Filter, then AutoFilter 4th: Examine the effect to the record
  • 7.
    ADVANCED FILTERING • Canbe used to create a separate table of record from the main record. • There are 6 standard Comparison Operators (=,>,<,<=,>= and <>) to be used to set the criteria for numerical value. • Syntax to set the criteria for text: =“=text” • Excel will match the content with the text type by user. • The asterisk (*) and question (?) mark are wildcard characters
  • 8.
    • They areused in criteria statements to represent one or more characters. • Example: =“=?an” would return Dan, man and fan =“=*an” would return man, woman, American
  • 9.
    PRACTICE * stop theAutoFilter features for the current record 1st: 2nd: create new table (with the same column title) place the criteria in the cell below the column title of the new table 3rd: highlight the whole record including the column title 4th: choose Data  Filter  Advanced Filter 5th: for Criteria range:, highlight the new table containing the criteria (including the column title)
  • 10.
    PRACTICE 6th: 7th: 8th: tick copy toanother location for Copy to:, point at any empty cell that you wish to place the new projected table examine the result
  • 11.
    PIVOT TABLE • Atool useful for summarizing the variables contained in an Excel sheet. • Located in Data menu. • Be sure to provide a variable label at the top of each column in the worksheet, because labels are necessary when constructing a pivot table. • Why Pivot? to summarize data contained in lengthy list into a compact format to find relationships within the data to organize data into a format that’s easy to chart
  • 12.
    TO CREATE PIVOTTABLE 1. 2. 3. 4. Select cell in the worksheet that contains data, or select all the data and columns you want to include in the report. On the Data menu, click PivotTable and PivotChart Report. In Step 1 of the wizard, make sure that Microsoft Excel list or database is selected. Under What kind of report do you want to create?, make sure that PivotTable is selected. Click Next.
  • 13.
    PIVOT TABLE 5. Select thedata Range you wish to include in your PivotTable  $A$1:$H$24 (cells that contain your data)  Sheet1!$A:$H (columns that contain data)  MyData (a named range that contains data)
  • 14.
    PIVOT TABLE 6. 7. Select whereyou want your PivotTable to reside (the default is a new worksheet within this workbook) The create your PivotTable, either click Layout or Finish Note: If you get the below message and you are concerned about file size, click Yes
  • 15.
    PIVOT TABLE • Rememberthe rules of where to place data fields: • Row Fields: display data vertically, in rows • Column Fields: display data horizontally, across columns • Data Items: numerical data to be summarized • Page Fields: display data as pages and allows you to filter to a single item • Note: If the field list is hidden, click Show Field List on the PivotTable toolbar. • 2 ways to update: • Use the layout option in the Wizard • Or, create an empty PivotTable and drag in fields from the field list
  • 17.
    FORMATTING • Rename thefields in the gray boxes. Click the field name, retype, and then press ENTER. • Format Numbers: • Click a cell that contains numerical data, or the name of the field heading for that data. • Click the Field Settings button on the PivotTable toolbar, and then click Number. • In the Format Cells dialog box, click any option in the Category list. • Click OK twice. • You may use cell formatting buttons • Note, hover at column or row beginning until you get a black arrow to select that column or row before applying the format
  • 18.
    FORMATTING • Apply anautomatic format • Click in the report, and then click the Format Report button on the PivotTable toolbar • Select a format in the AutoFormat dialog box • Select PivotTable Classic to remove auto formats   • Generally apply auto formats as a last step
  • 19.
    CHANGE THE DISPLAY •Change sort order • Click the field heading or any cell in the list that contains the data you want to sort. • On the PivotTable toolbar, click PivotTable, and then click Sort and Top 10. • Under AutoSort options, click Descending or Ascending. • Click OK. • Change how data is summarized • Click a cell in the data area or the field heading for the data area. • Click the Field Settings button on the PivotTable toolbar. • In the Summarize by list, click an option, and then click OK.
  • 20.
    ADD FIELDS • Dragin fields from the PivotTable Field List or return to the PivotTable Wizard and click Layout • If the PivotTable Field List is not visible, click on the report • You don't have to undo an existing report to add another field • More than one field can be dragged onto any of the drop areas on the report • A PivotTable report with more than one row field has one inner row field (closest to the data area) and other outer row fields • Items in the outermost row field are displayed once; items in the rest of the row fields are repeated as necessary • Any field can be used more than once on a report, even in the same drop area
  • 21.
    CALCULATION OPTIONS • Usea summary function other than SUM • Click the data field heading or a cell within the data field, and then click the Field Settings button on the PivotTable toolbar. • In the Summarize by list, select a different summary function, and then click OK • Use a custom calculation* to show data another way • Click in one of the cells in the data area • On the PivotTable toolbar, click the Field Settings button • Click the Options button • In the Show data as list, click the arrow, scroll down the list, and then make a selection such as % of total. Click OK. * Use with caution. Make sure you are getting expected results.
  • 22.
    CALCULATION OPTIONS • Usecalculated fields* or calculated items* to enter your own formulas based on the information in the data area in a PivotTable report. • Calculated field: when using data from another field in your formula • For example, compute student/faculty ratio when student count and faculty count are two separate fields • Calculated item: when using data from one or more specific items within a field • For example, compute % of students that are female when gender is one field * Use with caution. Make sure you are getting expected results (for example, does your total row sum the percentages or recalculate the percentages?)
  • 23.
    CHANGE THE DATA •After changes are made to the information source, click the Refresh Data button • If you have added columns or rows to your data source, make sure to update the data range • Right click on the PivotTable, click PivotTable Wizard, click the back button • Note, if you insert rows into your current data range, the PivotTable will automatically update
  • 24.
    CELL REFERENCES • GETPIVOTDATAfunction appears automatically when you type an equal sign (=) outside of the report and then select a cell inside the report • GETPIVOTDATA function retrieves data from the report and continues to do so even if the report layout changes. • If you remove any of the fields referenced in the GETPIVOTDATA formula from the report, the formula returns #REF!. • If you do not want to use the function: • Type an equal sign (=) in a cell outside of the report. • Type the cell address that contains the value that you want to reference.
  • 25.
    CELL REFERENCES • Youcan also add a button to the PivotTable toolbar to turn the GETPIVOTDATA function on and off. • With a PivotTable report open, on the PivotTable toolbar, click the Toolbar Options arrow on the right end of the toolbar. • Click Add or Remove Buttons, click PivotTable, and then click Generate GetPivotData. • When you click in your worksheet, you'll see the Generate GetPivotData button on the toolbar. When selected, the button turns the function on. Select the button to turn the function on or off.