Vous êtes sur la page 1sur 10

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) 13 46 79 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

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 Excels Formatting Toolbar, click on the Chart Wizard button result in the following Window:

. This will

2008 UMUC European Division Ron Souverein and Nada Wray

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

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

[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

Commuting Distance of Employees

14

12

10 Number of Employees

2 0.5 3.5 6.5 9.5 12.5 15.5 18.5 Distance

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

Frequency Polygons
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

2008 UMUC European Division Ron Souverein and Nada Wray

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

Commuting Distance of Employees


16

14

12

Number of Employees

10

0 0 2 4 6 8 Distance 10 12 14 16 18

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

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:

2008 UMUC European Division Ron Souverein and Nada Wray

Ogive for Commuting Distance of Employees


60

50

Cumulative Number of Employees

40

30

20

10

0 0 2 4 6 8 10 Distance 12 14 16 18 20

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:

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:

2008 UMUC European Division Ron Souverein and Nada Wray

Ogive for Commuting Distance of Employees


60

50

Cumulative Number of Employees

40

30

20

10

0 0.5 3.5 6.5 9.5 Distance 12.5 15.5 18.5 21.5

2008 UMUC European Division Ron Souverein and Nada Wray

10

Vous aimerez peut-être aussi