Often you may want to create histograms by group in SPSS, such as the following:
Fortunately this is easy to do by using the Groups/Point ID feature within the Chart Builder.
The following example shows how to use this feature in practice.
Example: How to Create Histograms by Group in SPSS
Suppose we have the following dataset in SPSS that contains information about the prep exam method used by students along with the score they received on the final exam:
Suppose that we would like to create histograms to visualize the distribution of exam scores for both groups of students.
To do so, click the Graphs tab, then click Chart Builder.
In the new window that appears, choose Histogram as the chart type, then drag it into the Chart preview area.
Then drag the Score variable to the x-axis:
Next, click the Groups/Point ID tab, then check the box next to Columns panel variable.
Then drag the Method variable to the Panel label in the Chart preview area:
Once you click OK, the following histograms will be created:
The histogram on the left shows the distribution of exam scores for students who used Method One to prepare for the exam.
The histogram on the right shows the distribution of exam scores for students who used Method Two to prepare for the exam.
By viewing these histograms side by side, we’re able to see that the scores tend to be higher among students who used Method Two to prepare for the exam.
Note: In this example we created histograms for two groups, but you can use the exact same method to create histograms grouped by a variable that has more than two groups.
The following tutorials explain how to perform other common tasks in SPSS: