O'Reilly logo

Excel Scientific and Engineering Cookbook by David M Bourg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

5.2. Plotting Frequency Distributions

Problem

You're analyzing a dataset and would like to create a histogram plot of the data showing its frequency distribution.

Solution

Use Excel's FREQUENCY function to compute the frequency of occurrence of each data point and use Excel's charting features (see Chapter 4) to create the histogram plot. Or use the Histogram tool in the Data Analysis add-in to compute the frequencies of occurrence and then use Excel's plotting features.

Discussion

Figure 5-4 shows a histogram plot (bar graph) along with a frequency polygon (the thin line) and cumulative frequency plot (the bold line) for a set of data. The dataset for this example plot represents the angular response of a torsional spring.

You can quickly create this sort of chart using the techniques discussed throughout Chapter 4. You'll first have to compute the actual frequency distribution for your dataset, and to that end you have two choices in Excel: the FREQUENCY function or the Histogram tool included in the Data Analysis add-in.

Figure 5-5 shows a portion of a spreadsheet containing the data used for the histogram plot shown in Figure 5-4.

Histogram plot

Figure 5-4. Histogram plot

The angular response data contained in column A is the original dataset for which frequencies are computed. Before applying the FREQUENCY function, you must set up a range of discrete bin values, called bins. The bins form bands, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required