LESSON ONE

GRAPHICAL PRESENTATION OF DATA


We will learn how to produce a bar chart, a pie chart, and a histogram in this lesson.

I. Open an existing SPSS data file -- Employee data. 

    A. Start SPSS by clicking the Start menu, All Programs, and SPSS 11.5 (or SPSS12.0).

B. The dialog box `What would you like to do?` will appear. `Open an existing data source` is selected by default. More Files will be highlighted. Click OK. The Open File dialog box will appear as shown below.

 

C. Click on Employee data. Click Open. Employee data will be displayed in the Data Editor window. This file consists of 474 cases and ten variables.

II.. How many employees do we have broken down by job category?

Our first task is to produce a bar chart that shows the number of employees in each job category (jobcat).

A. View Label and Value Labels

From the SPSS Data Editor menus choose: Utilities / Variables.

 

Click on the variable jobcat from the list. A description will be displayed in the Variable Information box.

 

  Variable Information.

Label: An extended descriptive label `Employment Category` is assigned to the variable `jobcat`

Value Labels: Three descriptive labels (Clerical, Custodial, and Manager) are assigned to the values 1, 2, and 3 respectively.

After viewing the information, close the Variables dialog box by clicking on the close button (x) in the upper right corner or click on the Close button.

B. To produce a bar chart, from the SPSS Data Editor menus choose: Graphs / Bar. The Bar Charts dialog box will appear as shown below.

Type of Bar Chart: Simple. It is the default.

Data in Chart Are: Summaries for groups of cases. It is the default.

Click on the Define button to open a Define Simple Bar dialog box. In the Bars Represent area: Note that N (Number) of cases is selected. It is the default.

Next, we need to move the Employment Category variable to the Category Axis box. Click on the variable Employment Category [jobcat] from the source list. Then click on the right arrow button to move the variable to Category Axis as shown below.

 

Finally, click OK. The bar chart will be displayed in the SPSS Viewer window.

How many employees do we have broken down by job category?

Examine the chart. Note that over 350 employees are in the clerical category.

C. Modify the bar chart to display the number of cases each bar represents.

Double-click on the bar chart to bring up the SPSS Chart Editor window as shown below.

From the Chart Edit menu bar choose: Format / Bar Label Style. The Bar Label Style dialog box will appear.

Click the picture next to Standard. Click Apply All. Click Close.

    To add a title to the chart, from the Chart Editor menus choose: Chart / Title

In the Title 1 textbox, type Bar Chart. Click OK. Close the Chart Editor window by clicking on the close button (x). The modified bar chart will be displayed in the SPSS Viewer window.

There are 363 employees in the clerical category and 84 in the manager category.

D. Print the chart. Locate the SPSS Viewer window. From the SPSS Viewer menus choose: File / Print. Click OK to print the chart.

E. Close the Viewer window by clicking on the close button (x). Save contents of output viewer to Output 1? Click No.   

 

III. Our second task is to produce a pie chart that shows the percentage of employees in each job category.  

A.. From the SPSS Data Editor menus choose: Graphs / Pie.

Data in Chart Are: `Summaries for groups of cases` is selected by default.

B. Click on Define

Slices Represent: Click on % of cases as shown below 

Define Slices by: Click on the variable Employment Category (jobcat) from the list. Click on the right arrow button to move the variable. The result will be like this.

 

Click OK. The pie chart will be displayed in the SPSS Viewer window.

C. Modify the pie chart to display the percentage each slice represents.

Double-click on the pie chart to bring up the SPSS Chart Editor window.

From the Chart Editor menus choose: Chart / Options.

Click on Percents. Click OK.

To add a title to the chart, from the Chart Editor menus choose: Chart / Title

In the Title 1 textbox, type Pie Chart. Click OK.

Close the chart editor window by clicking on the close button (x) in the upper-right corner. The modified pie chart will be displayed in the SPSS Viewer window.

D. Print the pie chart and close the viewer window.

     

About 77% of employees are in the clerical category and 18% are in the manager category.  

IV. Add another categorical variable, gender. Produce a clustered bar chart: Job category by Gender

From the SPSS Data Editor menus choose: Graphs / Bar

Type of Bar Chart: Select Clustered by clicking the graph icon next to Clustered.

Data in Chart Are: Summaries for groups of cases. It is the default.

Click on Define to open a dialog box.

Specify a category axis: Click on the variable Employment Category (jobcat) from the list. Click on the right arrow button to move the variable to Category Axis.

Define Clusters by: Select the variable Gender (gender). Click on the right arrow button to move the variable.

Bars Represent: N (Number) of cases. It is the default.

Click OK. The clustered bar chart will be displayed in the SPSS Viewer window. There are three levels of job category and two levels of gender.

You may modify the bar chart to display the number of cases each bar represents.  

 

Examine the three job categories, broken down by the gender.

Note that no female employees are in the custodial category. There are more male managers than female managers. 

Next, we will creates a table showing the joint distribution of the two categorical variables, gender and employment category. From the menu choose Analyze \ Descriptive Statistics \ Crosstabs. Select "gender" as the row variable and "employment category" as the column variable. Click OK

 

The output table will look like this



There are ___ female managers and ___ male managers.

 

 V. Produce a histogram for the variable Current Salary (salary).

  • Continuous Variable: Current Salary

  • Statistics: Mean and Standard Deviation

  • Data Visualization: Histogram

The quantitative variable `salary` has many adjacent values. We may group the values into intervals. A histogram can be used to display the distribution of such grouped values.

 From the Data Editor menus choose: Graphs / Histogram

 Click on Current Salary (salary) from the list. Click the > pushbutton to move it to the Variable list.

 Check Display normal curve. Click OK. The histogram will be displayed in the SPSS Viewer window.

 

What to Look For.

Intervals: The data are grouped into intervals. The numbers below the bars indicate the middle value of each interval. For example, the middle value of the interval between 12500 and 17500 is 15000. Note that each bar covers a value range of 5,000.

Bars: Each bar represents the number of cases. No bars are printed for the intervals that have no values. Note that the histogram has a single peak. There are gaps toward the upper end of the data.

Shape: Note that the distribution is not symmetric. The long tail points toward larger values. The distribution is skewed to the right.

Statistics: Mean and unbiased standard deviation (SPSS computes only unbiased standard deviation. s = 17075.66; M = 34419.6 ) 

 

Print the chart and close the Viewer window by clicking on the close button (x) in the upper-right corn