
In this post, you will learn how to create a histogram in spss.
Histogram –
To create a histogram in spss, we use the chart builder. But before we create a histogram, let’s first read a data set.If you want to follow along then download it – click here to download.
First open spss and then click on file menu > open > data. Then select the data that you have downloaded. The data will look something like this –

To create a histogram click on Graphs > chart builder. This will open a dialog box. Then choose histogram from the Gallery.

This gallery has four icons representing different types of histogram and you should select the appropriate one either by double clicking on it, or by dragging it onto the canvas in the chart builder.
- Simple histogram – Use this option when you just want to see the frequencies of scores for a single variable.
- Stacked Histogram – if you has a grouping variable (e.g. whether people worked hard or wished upon a star) you could produce a histogram in which each bar is split by group. In this example, each bar would have two colors, one representing people who worked hard and the other people who wished upon a star. This is a good way to compare the relative frequency of scores across group (e.g. were those who worked hard more successful than those who wished upon star? )
- Frequency polygon – This option display the same data as the simple histogram, except that it uses a line instead of bars to show the frequency, and the area below the line is shaded.
- Population Pyramid – Like a stacked histogram, this shows the relative frequency of scores in two population. It plots the variable (e.g. success after 5 years) on the vertical axis and the frequencies for each population on the horizontal. The population appear back to back on the graph. If the bars either side of the dividing line are equally long then the distribution have equal frequencies.
We are going to do a simple histogram first. So double click on the icon for a simple histogram. The chart builder dialog box will show a preview of the graph in the canvas area.

The variables in the data editor are listed on the left-hand side of the chart builder and any of these variables can be dragged into any of the spaces surrounded by blue dotted line (called drop zones).
A histogram plots a single variable (x-axis) against the frequency of scores (y-axis), so all we need to do is select a variable from the list and drag it into the x-axis. Let’s do this for the post-intervention success scores. Click on this variable (Success_post) in the list and drag it to the x-axis.

This will show a preview of a histogram. But this is not the actual histogram. To see it click on ok. This will show the histogram.

You can see that the distribution quite lumpy. Although there is a peak of scores around 50 (mid-point of the scale), there are quite a few scores at the high end and fewer at the low end. This creates the impression of negative skew, but it’s not quite as simple as that. To help us to dig a bit deeper it might be helpful to plot the histogram separately for those who wished upon a star and those who worked hard. after all, if the intervention was a success then their distributions should be from different populations.
To compare frequency distribution of several groups simultaneously, we can use a population pyramid. Click on population pyramid icon to display the template for this graph on the canvas. Then from the variable list select the variable representing the success scores after the intervention and drag it to distribution variable to set it as the variable that you want to plot. Then select the variable strategy and drag it to split variable to set it as the variable for which you want to plot different distribution. The dialog should now look like the figure below.

Then click on ok to show the graph.

The population pyramid shows that for those who wished upon a star there is a fairly normal distribution centered at about the mid-point of the success scale (50%). A small minority manage to become successful just by wishing but most just end up sort of average successful. Those who worked hard shows a skewed distribution, where a large proportion of people (relative to those wishing) become very successful and fewer people are around or below the mid-point of the success scale.