Example: Bar Chart with a Summary Statistic

We will create a bar chart that summarizes a continuous numeric field/variable for each category of a set/categorical variable. Specifically, we will create a bar chart that shows the mean salary for men and women.

This and several of the following examples use Employee data, which is a hypothetical dataset containing information about a company's employees.

  1. Add a Statistics File source node that points to employee_data.sav.
  2. Add a Graphboard node and open it for editing.
  3. On the Basic tab, select Gender and Current Salary . (Use Ctrl+Click to select multiple fields/variables.)
  4. Select Bar.
  5. From the Summary drop-down list, select Mean.
  6. Click Run.
  7. On the resulting display, click the "Display field and value labels" toolbar button (the second of the group of two in the center of the toolbar).
Figure 1. Bar chart with a summary statistic
Bar chart with a summary statistic

We can observe the following:

  • Based on the height of the bars, it is clear that the mean salary for males is greater than the mean salary for females.