Making Histograms, Frequency Polygons and Ogives, using Excel

(Grouped Data)

Suppose a researcher is interested in the number of miles that the employees of a large department store traveled to work each day. The researcher would first have to collect the data by asking a sample of about 50 employees the approximate distance the store is from his or her home. After doing that the researcher organizes the data in a frequency distribution as follows: Class limits (in miles) 1–3 4–6 7–9 10 – 12 13 – 15 16 – 18 No of employees 10 14 10 6 5 5

In order for this frequency distribution to be useful the class limits will have to be changed to class boundaries and we make columns for the midpoints, lower boundaries and cumulative frequencies will have to be added. Entering all this in to Excel will give us the following:

The last boundary of 18.5 and last cumulative frequency of 50 are needed to make the ogive.
© 2008 UMUC – European Division Ron Souverein and Nada Wray

1

Histograms

In Excel, put the mouse pointer on cell A1, press the left mouse button and drag down to cell A7, release the left mouse button and then put the mouse pointer on cell D1, hold down the [CTRL] key and again with the left mouse button pressed, drag down to cell D7. Release the [CTRL] key and the mouse. The Excel window will look like this:

On Excel’s Formatting Toolbar, click on the Chart Wizard button result in the following Window:

. This will

© 2008 UMUC – European Division Ron Souverein and Nada Wray

2

From the Chart sub-type list select or any of the other options. I prefer this option so I will work with this one. Click the [Next] button and Step 2 of the Chart Wizard will appear. Do yourself a favor and skip over this dialog box - we will not need it. Just click the [Next] button again and go to step 3 of the Chart Wizard. In this 'Step 3' of the Chart Wizard there are a lot of options to fill in:

What you need to do here is to type in a Chart title (Computing Distance of Employees), Category (X) axis name as the "Distance" and the Value axis (Y) name as the "Number of Employees". I have typed in the names as you can see above.
© 2008 UMUC – European Division Ron Souverein and Nada Wray

3

Next, in Excel, click on the [Legend] tab above, and clear the [Show Legend] box. The rest is optional and you can experiment with it at your convenience. Click [Next] to continue to Step 4 of the Chart Wizard. This looks like this:

All that you need to do here is to select the [As new sheet] option as shown above and then click on [Finish]. The result is this:

From here on it is a matter of fine tuning the graph. The first option is to rotate the Value (X) axis title (Number of Employees) over 90 degrees so that it does not take up that much space. This can be achieved by right clicking on this title, then click on [Format Axis Title], click the [Alignment] tab and enter 90 in to the [Degrees] box. Then click [OK]. As a result the title of the vertical axis should now be parallel to the vertical axis. The second option is to get the bars next to each other. This is what the textbook tells us is the standard in this course so let us do that as well. Right click on one of the bars, select [Format Data Series], click the [Options] tab, highlight the 150 in the
© 2008 UMUC – European Division Ron Souverein and Nada Wray

4

[Gap Width] box using the mouse, type 0 and click on [OK]. The result of all this should be

We are now ready for the last detail. The textbook sets it as a rule that the horizontal axis, the category (Y) axis, should display only the single class boundaries, not the classes as such. This is not a standard option in Excel for histograms so we have to go about it in a more elaborate way. We first have to clear the classes from the picture above and then, using the drawing toolbar put the boundaries on the category axis. Return to the histogram in Excel, make sure that the drawing toolbar is showing and right click on the category axis. Click on the [Clear] option. The classes should now no longer be displayed on the horizontal axis. Last, on the drawing toolbar,

click on the textbox button place the mouse pointer all the way on the left of the horizontal axis and drag the mouse pointer to the right of the horizontal axis. You may have to make this text box a bit larger in size by dragging one of the handles (little open circles in the corners and middle top and bottom of the text box) up or down to make the box large enough to enter the class boundaries. Simply enter the first boundary, use the space bar to go to the right where the second boundary is to be placed, and enter the second boundary in the same way, and so on … Clearing the horizontal axis a little while ago also meant that the label of the horizontal axis, the word "Distance", has been cleared. Now you will have to enter this label again in a textbox. This will result in the following and final chart:

© 2008 UMUC – European Division Ron Souverein and Nada Wray

5

This last part with the textbox may require a bit of practice but you will get it after a couple of attempts.

Frequency Polygons

14

Unlike histograms, which have class boundaries on the horizontal axis, frequency polygons are made using midpoints on the horizontal axis. So we must start by selecting the data in B2 through B7 and D2 through D7. Do this in the same way we did for histograms. Next, click on the chart wizard button and select XY (Scatter) as the chart type and then the bottom left option as Chart sub-type as

12

© 2008 UMUC – European Division Ron Souverein and Nada Wray

10

6

indicated in this picture.

Click on the [Next] button, ignore step 2 of the Chart Wizard and proceed to step 3. This gives

As we have done before, we now clear the "show legend" box and add titles to the horizontal and vertical axes as well as the chart title. Click next to go to step 4 of the Chart Wizard and select [As new sheet]. This should result in the following chart.
© 2008 UMUC – European Division Ron Souverein and Nada Wray

7

16
By right clicking on selected parts of the chart you can make many changes in color, font size, etc.

14

Ogives

Select C2 through C8 and E2 through E8 in the same way we did before, click on the Chart Wizard button and again select the same Chart sub-type as we did for frequency polygons. We again ignore step 2, and in step 3 of the chart wizard, we enter all the titles and we clear the "show legend" box. Use the same option as before in step 4 of the Chart Wizard. This will result in the following graph:

12

ployees

10
8

© 2008 UMUC – European Division Ron Souverein and Nada Wray

60
In order to make the horizontal scaling a bit more appropriate, right click on the numbering on the horizontal axis, select [Format Axis] which causes the following box to appear:

50

r of Employees

Select the [Scale] tab, enter 0.5 as the minimum and 3 as the Major unit. Then click [OK]. The complete Ogive will now look like this:

40

© 2008 UMUC – European Division Ron Souverein and Nada Wray

9

60

50

r of Employees

40
10

© 2008 UMUC – European Division Ron Souverein and Nada Wray