Using the Frequencies Procedure in SPSS 9.0 for Windows © by Julia Hartman © Copyright 2000, Julia...

Preview:

Citation preview

Using the Frequencies Procedure Using the Frequencies Procedure in SPSS 9.0 for Windowsin SPSS 9.0 for Windows©©

bybyJulia HartmanJulia Hartman

© Copyright 2000, Julia Hartman

July 2000July 2000 Hartman, JAHartman, JA 2

About this tutorialAbout this tutorial

Using the Action Buttons

for more informationClick this button

to return.

Takes you to the next slide

Takes you to the previous slide

and this button

July 2000July 2000 Hartman, JAHartman, JA 3

About this tutorialAbout this tutorial

This tutorial will show you some of the information you can learn about your data by

using the Frequencies procedure.

Text written in orange is directly quoted from SPSS 9.0 for Windows© help files.

July 2000July 2000 Hartman, JAHartman, JA 4

About this tutorialAbout this tutorial

• Is for users who already know how to open a file in the Data Editor Window

This tutorial ...

• Uses the Cars.sav sample data file that can be installed with SPSS 9.0 for Windows©

July 2000July 2000 Hartman, JAHartman, JA 5

About this tutorialAbout this tutorial

You can work interactively with the tutorial if you open SPSS and use the

Windows® taskbar to switch between the tutorial and SPSS.

July 2000July 2000 Hartman, JAHartman, JA 6

Introduction to FrequenciesIntroduction to Frequencies

• Probably the most commonly used procedure in statistical applications

• Used to display the distribution of values for a variable

Frequencies

• A good way to explore your data and to check for errors in data entry or coding

July 2000July 2000 Hartman, JAHartman, JA 7

Introduction (continued)Introduction (continued)

Examples of when to use Frequencies

• To learn how many girls and how many boys are in a school’s database

• To learn how scores are distributed on an exam

• To learn the mean and standard deviation of scores on an exam

July 2000July 2000 Hartman, JAHartman, JA 8

Why use theWhy use the FrequenciesFrequencies procedure?procedure?

The Frequencies procedure provides statistics

and graphical displays

that are useful for describing many types of variables.

Miles per Gallon

46.0

44.0

42.0

40.0

38.0

36.0

34.0

32.0

30.0

28.0

26.0

24.0

22.0

20.0

18.0

16.0

14.0

12.0

10.0

Miles per Gallon

Fre

qu

en

cy

50

40

30

20

10

0

Std. Dev = 7.82

Mean = 23.5

N = 398.00

Statistics

MPG Miles per Gallon398

8

23.51

23.00

13

7.82

.457

.122

-.511

.244

9

47

Valid

Missing

N

Mean

Median

Mode

Std. Deviation

Skewness

Std. Error of Skewness

Kurtosis

Std. Error of Kurtosis

Minimum

Maximum

July 2000July 2000 Hartman, JAHartman, JA 9

Running theRunning the FrequenciesFrequencies procedureprocedure

• Open a file in the Data Editor.

• Go to Descriptive Statistics Frequencies….

• On the menu bar, go to Analyze.

July 2000July 2000 Hartman, JAHartman, JA 10

Selecting variablesSelecting variables

• Select the variables from the list in the window on the left.

• Click the arrow to move the variables to the window on the right.

July 2000July 2000 Hartman, JAHartman, JA 11

Selecting variablesSelecting variables

You can select and move variables one at a time.

July 2000July 2000 Hartman, JAHartman, JA 12

Selecting variablesSelecting variables

You can drag the pointer to select multiple variables.

July 2000July 2000 Hartman, JAHartman, JA 13

Selecting variablesSelecting variables

You can use the Ctrl key to select

multiple variables.

July 2000July 2000 Hartman, JAHartman, JA 14

Specifying statisticsSpecifying statistics

When you finish selecting variables, you can specify the statistics to include by clicking Statistics....

July 2000July 2000 Hartman, JAHartman, JA 15

Specifying statisticsSpecifying statistics

• Select statistics by clicking in the appropriate box.

• Right-click to see additional information about a statistic.

July 2000July 2000 Hartman, JAHartman, JA 16

Specifying statisticsSpecifying statistics

After you finish selecting statistics, click Continue.

July 2000July 2000 Hartman, JAHartman, JA 17

Including chartsIncluding charts

Click Charts... to include bar charts, pie charts, or histograms in your output.

July 2000July 2000 Hartman, JAHartman, JA 18

Including chartsIncluding charts

• Select the type of chart by clicking the appropriate button.

• You can choose to have a normal curve superimposed on histograms.

• Right-click to see additional information.

July 2000July 2000 Hartman, JAHartman, JA 19

Including chartsIncluding charts

After you finish selecting a chart type, click Continue.

July 2000July 2000 Hartman, JAHartman, JA 20

Specifying a formatSpecifying a format

Click Format... to control how your output will be organized.

July 2000July 2000 Hartman, JAHartman, JA 21

Specifying a formatSpecifying a format

You can:

• Select the order of values in your tables.

• Choose either to organize statistics in a single table or to be displayed with each variable.

• Limit the output for tables with many categories.

July 2000July 2000 Hartman, JAHartman, JA 22

Specifying a formatSpecifying a format

Right-clicking will display additional information about the formatting options.

July 2000July 2000 Hartman, JAHartman, JA 23

Specifying a formatSpecifying a format

After you have selected variables, statistics, charts, and format,

click OK to run the procedure.

July 2000July 2000 Hartman, JAHartman, JA 24

OutputOutput

Wait for the output . . .

OK, go on to the next slide.

July 2000July 2000 Hartman, JAHartman, JA 25

Output: StatisticsOutput: StatisticsStatistics for the two variables--MPG and ORIGIN--are displayed side-by-side in the output.

Statistics

398 405

8 1

23.51 1.57

23.00 1.00

13 1

7.82 .80

.457 .929

.122 .121

-.511 -.796

.244 .242

9 1

47 3

Valid

Missing

N

Mean

Median

Mode

Std. Deviation

Skewness

Std. Error of Skewness

Kurtosis

Std. Error of Kurtosis

Minimum

Maximum

MPG Milesper Gallon

ORIGIN Country of

Origin Most of the statistics for ORIGIN are meaningless because it is a categorical variable.

July 2000July 2000 Hartman, JAHartman, JA 26

Output: MPG Frequency TableOutput: MPG Frequency Table

The MPG frequency table is very long, so only the first and last parts are shown here.

July 2000July 2000 Hartman, JAHartman, JA 27

Output: MPG Frequency TableOutput: MPG Frequency Table• Although it appears that

some values are listed more than once, the actual values are different. The variable type has not been set to display decimals.

• For example, 15 is displayed for 14.5, as well as for 15.0.

July 2000July 2000 Hartman, JAHartman, JA 28

Output: ORIGIN Frequency TableOutput: ORIGIN Frequency Table

• The table for ORIGIN is much smaller because there are only three categories.

ORIGIN Country of Origin

253 62.3 62.5 62.5

73 18.0 18.0 80.5

79 19.5 19.5 100.0

405 99.8 100.0

1 .2

406 100.0

1 American

2 European

3 Japanese

Total

Valid

SystemMissing

Total

Frequency PercentValid

PercentCumulative Percent

• No category was entered for one case, so it has been identified as “System Missing.”

July 2000July 2000 Hartman, JAHartman, JA 29

Output: MPG HistogramOutput: MPG Histogram

• This histogram is a graphical representation of the distribution of MPG.

• The curve represents the normal distribution. Miles per Gallon

46.0

44.0

42.0

40.0

38.0

36.0

34.0

32.0

30.0

28.0

26.0

24.0

22.0

20.0

18.0

16.0

14.0

12.0

10.0

Miles per Gallon

Fre

qu

en

cy

50

40

30

20

10

0

Std. Dev = 7.82

Mean = 23.5

N = 398.00

July 2000July 2000 Hartman, JAHartman, JA 30

Output: Country of Origin HistogramOutput: Country of Origin Histogram

The histogram for Country of Origin has gaps for 1.50 and 2.50, which are nonexistent.

Country of Origin is a categorical variable, and a histogram is not an appropriate type of graph.Country of Origin

3.002.502.001.501.00

Country of Origin

Fre

qu

en

cy

300

200

100

0

Std. Dev = .80

Mean = 1.57

N = 405.00

July 2000July 2000 Hartman, JAHartman, JA 31

The EndThe End

Congratulations! You’ve completed this tutorial and should be ready to explore your data in SPSS using the Frequencies procedure!

Click this button to repeat the tutorial.

Click this button to end the tutorial.

July 2000July 2000 Hartman, JAHartman, JA 32

More about task-switchingMore about task-switching

Working this tutorial interactively involves no more than switching back and forth between the Slide Show of the tutorial and the Cars.sav file in SPSS.

However, you can’t switch back and forth from the Slide Show unless you’re set up to do so.

July 2000July 2000 Hartman, JAHartman, JA 33

More about task-switchingMore about task-switching

• Press the Esc key to stop the slide show.

• Read the instructions using the Slide View.

You will probably need to change your Taskbar Properties to Auto hide.

• Follow the instructions as you read.

July 2000July 2000 Hartman, JAHartman, JA 34

More about task-switchingMore about task-switching

• Right-click your Windows Taskbar

• Select Properties.

July 2000July 2000 Hartman, JAHartman, JA 35

More about task-switchingMore about task-switching

Check the box next to:

Auto hide reduces the taskbar to a thin line at the bottom of your screen. To redisplay the taskbar, point to the thin line.

• Always on top• Auto hide

• Click OK

July 2000July 2000 Hartman, JAHartman, JA 36

More about task-switchingMore about task-switching

• Open SPSS by using the key, or minimize PowerPoint and open SPSS from the Windows desktop.

• Open the Cars.sav file in SPSS, and you will be able to switch back and forth between SPSS and the PowerPoint Slide Show.

July 2000July 2000 Hartman, JAHartman, JA 37

More about task-switchingMore about task-switching

Your Windows taskbar should now have a button for PowerPoint and a button for SPSS.

You can switch between the programs by clicking the appropriate button.

July 2000July 2000 Hartman, JAHartman, JA 38

More about task-switchingMore about task-switching

When you're in SPSS, you get back to this tutorial by clicking the button for the PowerPoint Slide Show.

In other words, to get to SPSS from PowerPoint, you click the SPSS button.

July 2000July 2000 Hartman, JAHartman, JA 39

More about task-switchingMore about task-switching

You can restart the slide show at this slide by clicking on the Slide Show button in the lower left corner of the screen.

Then click the red Return button to resume the tutorial.

July 2000July 2000 Hartman, JAHartman, JA 40

Whoops!Whoops!

You missed the signal to return to the

tutorial!

July 2000July 2000 Hartman, JAHartman, JA 41

Opening a data fileOpening a data file

Open a file in SPSS from the File menu or with the Open File button.

Find the file and click on

Open.

July 2000July 2000 Hartman, JAHartman, JA 42

Opening a data fileOpening a data file

This is what the Cars.sav data

window should look like.

July 2000July 2000 Hartman, JAHartman, JA 43

Whoops!Whoops!

You missed the signal to return to the

tutorial!

July 2000July 2000 Hartman, JAHartman, JA 44

More about selecting variablesMore about selecting variables

You can select multiple variables by holding down the mouse button and dragging the pointer up or down.

Holding the Ctrl key and clicking on variables in the list will select variables in any order.

July 2000July 2000 Hartman, JAHartman, JA 45

Whoops!Whoops!

You missed the signal to return to the

tutorial!

July 2000July 2000 Hartman, JAHartman, JA 46

More about specifying a formatMore about specifying a formatThe frequency table can be arranged according to the actual values in the data or according to the count (frequency of occurrence) of those

values, and in either ascending or descending order.

However, if you request a histogram or percentiles, Frequencies assumes that the variable is quantitative and displays its values in ascending order.

July 2000July 2000 Hartman, JAHartman, JA 47

More about specifying a formatMore about specifying a format

If you produce statistics tables for multiple variables, you can either

• display all variables in a single table (Compare variables) or

• display a separate statistics table for each variable (Organize output by variables).

July 2000July 2000 Hartman, JAHartman, JA 48

More about specifying a formatMore about specifying a format

This option prevents the display of tables with more than the specified number of values.

When you have a variable with a large number of values (for example, weights of children in a school), the frequency table will be very large, with only a few cases for each value.

July 2000July 2000 Hartman, JAHartman, JA 49

More about specifying a formatMore about specifying a formatHowever, if you choose to suppress the table, you won’t be able to use

the table to check the accuracy of your data.

For example, you wouldn’t be able to tell if a child’s weight had been entered as 750 pounds, instead of 75.

(You can use statistics to identify the maximum and minimum values, but that wouldn’t find another weight entered as 700 pounds.)

July 2000July 2000 Hartman, JAHartman, JA 50

Whoops!Whoops!

You missed the signal to return to the

tutorial!

July 2000July 2000 Hartman, JAHartman, JA 51

More about statistics outputMore about statistics output

Categorical VariablesVariables that have a limited number of distinct values or categories.

Origin is a categorical variable, with values of:

Statistics

398 405

8 1

23.51 1.57

23.00 1.00

13 1

7.82 .80

.457 .929

.122 .121

-.511 -.796

.244 .242

9 1

47 3

Valid

Missing

N

Mean

Median

Mode

Std. Deviation

Skewness

Std. Error of Skewness

Kurtosis

Std. Error of Kurtosis

Minimum

Maximum

MPG Milesper Gallon

ORIGIN Country of

Origin

1 = American2 = European3 = Japanese

July 2000July 2000 Hartman, JAHartman, JA 52

More about statistics outputMore about statistics output

Statistics such as the mean and standard deviation are based on an assumption of normal distribution.

Most of the statistics displayed are not appropriate for categorical data, but the median and mode could be useful.

Statistics

398 405

8 1

23.51 1.57

23.00 1.00

13 1

7.82 .80

.457 .929

.122 .121

-.511 -.796

.244 .242

9 1

47 3

Valid

Missing

N

Mean

Median

Mode

Std. Deviation

Skewness

Std. Error of Skewness

Kurtosis

Std. Error of Kurtosis

Minimum

Maximum

MPG Milesper Gallon

ORIGIN Country of

Origin

July 2000July 2000 Hartman, JAHartman, JA 53

Whoops!Whoops!

You missed the signal to return to the

tutorial!

July 2000July 2000 Hartman, JAHartman, JA 54

The Frequency Table lists every value for MPG; many of these values occur in a single case (frequency = 1).

(Several values appear more than once in this table due to poor choice of data definition. This will be addressed later in the tutorial.)

More about Frequency TablesMore about Frequency Tables

July 2000July 2000 Hartman, JAHartman, JA 55

More about Frequency TablesMore about Frequency Tables

Although the table is lengthy, it provides important information.

Based on the lowest and highest values in the table, it appears there are no major errors in the data for MPG.

July 2000July 2000 Hartman, JAHartman, JA 56

Whoops!Whoops!

You missed the signal to return to the

tutorial!

July 2000July 2000 Hartman, JAHartman, JA 57

Although several values are listed more than once in the table, the actual values are different.

The values listed as 16 are actually 15.5 (5 cases), 16.0 (13 cases), and 16.2 (1 case).

More about Frequency TablesMore about Frequency Tables

July 2000July 2000 Hartman, JAHartman, JA 58

MPG has been defined as numeric, with a width of 4 and no decimals. Because the variable has been defined as having no decimals, values are rounded to the nearest whole number when displayed, although the actual values--which may contain decimals--are not changed.

Defining dataDefining data

July 2000July 2000 Hartman, JAHartman, JA 59

WidthMaximum total width of the data value, expressed in characters and including one character for the decimal indicator

Defining dataDefining data

July 2000July 2000 Hartman, JAHartman, JA 60

Decimal PlacesNumber of decimal places in the value. Decimal values longer than the defined number are stored internally and rounded to the defined number for display.

Defining dataDefining data

July 2000July 2000 Hartman, JAHartman, JA 61

Defining dataDefining data

The variable definition can be changed to display the decimals.

Go to the Data menu and select Define Variable...

July 2000July 2000 Hartman, JAHartman, JA 62

Defining dataDefining data

Select Type...

July 2000July 2000 Hartman, JAHartman, JA 63

Defining dataDefining data

The data were entered with one decimal place, so change Decimal Places to 1, then click Continue.

July 2000July 2000 Hartman, JAHartman, JA 64

Defining dataDefining data

Click OK

July 2000July 2000 Hartman, JAHartman, JA 65

Defining dataDefining data

The new Frequency Table, using the new variable definition, displays the actual values for MPG.

July 2000July 2000 Hartman, JAHartman, JA 66

Whoops!Whoops!

You missed the signal to return to the

tutorial!

July 2000July 2000 Hartman, JAHartman, JA 67

More about chartingMore about chartingCountry of OriginCountry of Origin

A histogram...has bars [that are] plotted along an equal interval scale. The height of each bar is the count of values of a quantitative variable falling within the interval. A histogram shows the shape, center, and spread of the distribution. A normal curve superimposed on a histogram helps you judge whether the data are normally distributed.

July 2000July 2000 Hartman, JAHartman, JA 68

More about chartingMore about chartingCountry of OriginCountry of Origin

In other words, a histogram is not appropriate for a categorical variable like Country of Origin.

Instead of selecting a histogram, choose a Bar chart or a Pie chart.

July 2000July 2000 Hartman, JAHartman, JA 69

A Bar chart:

...displays the frequency count for each value as a separate bar. Bar charts are appropriate for categorical variables…. Values for which the count is zero do not appear in a bar chart.

More about chartingMore about chartingCountry of OriginCountry of Origin

July 2000July 2000 Hartman, JAHartman, JA 70

More about chartingMore about chartingCountry of OriginCountry of Origin

Bar chart for Country of Origin

Country of Origin

Country of Origin

JapaneseEuropeanAmerican

Fre

qu

en

cy

300

200

100

0

July 2000July 2000 Hartman, JAHartman, JA 71

A Pie chart:

...displays the frequency count for each value as a separate slice. Pie charts are appropriate for categorical variables…. Values for which the count is zero do not appear in a pie chart.

More about chartingMore about chartingCountry of OriginCountry of Origin

July 2000July 2000 Hartman, JAHartman, JA 72

More about chartingMore about chartingCountry of OriginCountry of Origin

Pie chart for Country of Origin

Country of Origin

Missing

Japanese

European

American

July 2000July 2000 Hartman, JAHartman, JA 73

Whoops!Whoops!

You missed the signal to return to the

tutorial!

July 2000July 2000 Hartman, JAHartman, JA 74

Not yet!

There’s nothing to explain!

July 2000July 2000 Hartman, JAHartman, JA 75

Whoops!Whoops!

You missed the signal to return to the

tutorial!

Press the Press the EscEsc key to end key to end the show.the show.

Recommended