Relative frequency histograms

频率分布直方图

How do you draw a frequency histogram?

Tabulate the relative frequencies; draw bars whose heights are frequency over bin width; the total area is one.

SkillKP004439

Sign in to read the whole lesson, with 1 interactive aid, 8 exercises

Sign in / Sign up

Mastery goals

  • Can make a relative frequency distribution table and draw a relative frequency histogram whose vertical axis is relative frequency ÷ class width
  • Can explain that the area of each bar is the relative frequency of that class and that the areas add up to 1, and use this to find relative frequencies and counts
  • Can explain how too few or too many classes change what a histogram shows

9.2 Using a sample to estimate a population

We collect data to find the information hidden in them. In real problems the data are many and messy, and patterns often cannot be seen directly in the raw data. So, depending on the background of the problem, we choose suitable statistical tables and charts to organise the data and describe them visually. Then, by analysing the data, we find the information they contain and use it to solve the real problem.

Below we discuss how to handle data obtained by random sampling.

9.2.1 Estimating how a population's values are distributed

Faced with a statistical problem, once random sampling has given us observed data, we choose suitable tables and charts to describe and present the data as the analysis requires, find the pattern of the sample, use it to estimate the pattern of the population, and so solve the problem. Look at the following problem.

Problem 1 China is one of the countries in the world with serious water shortages, and shortages are especially marked in cities. To reduce the waste of water, a city government plans tiered water pricing for households: it sets a standard for a household's average monthly water use; the part of the use up to is charged at the normal price, and the part above at a higher price. If the standard should be reasonable, so that most households' water bills are not affected, what work do you think needs to be done?

If the standard is too low, the daily life of many residents is affected; if it is too high, it does little to save water. To set a fairly reasonable standard, we must first know what proportions of all the city's households have monthly water use in different ranges.

If money and time allow, a census could give last year's average monthly water use of every household in the city, and from it the proportions of households in different ranges. But the city has a great many households, so a sample survey is usually used: the observed data of the sample are analysed to estimate the distribution of average monthly water use over all households in the city.

In this problem the population is all the households of the city, an individual is one household, and the variable surveyed is a household's average monthly water use.

Suppose simple random sampling gave the average monthly water use of households (unit: t):

```
9.0 13.6 14.9 5.9 4.0 7.1 6.4 5.4 19.4 2.0
2.2 8.6 13.8 5.4 10.2 4.9 6.8 14.0 2.0 10.5
2.1 5.7 5.1 16.8 6.0 11.1 1.3 11.2 7.7 4.9
2.3 10.0 16.7 12.0 12.4 7.8 5.2 13.6 2.6 22.4
3.6 7.1 8.8 25.6 3.2 18.3 5.1 2.0 3.0 12.0
22.2 10.8 5.5 2.0 24.3 9.9 3.6 5.6 4.4 7.9
5.1 24.5 6.4 7.5 4.7 20.5 5.5 15.7 2.6 5.7
5.5 6.0 16.0 2.4 9.5 3.7 17.0 3.8 4.1 2.3
5.3 7.8 8.1 4.3 13.3 6.8 1.3 7.0 4.9 1.8
7.1 28.0 10.2 13.8 17.9 10.1 5.5 4.6 3.2 21.6
```

What can we learn from these data? Sorting them from smallest to largest, we easily see that the minimum is t, the maximum is t, and all the others lie between t and t. To dig deeper into the information in the data, we need to organise and analyse them further.

To explore the pattern of a set of data, we usually first organise them in a table or show them visually in a chart. In junior school we used frequency tables and frequency histograms to organise and display numerical data like these, which told us clearly how many values fall in each group.

Organising data in a table changes the way they are arranged and so gives a new way to interpret them; showing data in a chart not only helps us extract information from them but also lets the chart pass the information on.

In this problem we care more about what proportion of all the city's households have average monthly water use in each range, so we use a relative frequency distribution table (frequency distribution table) and a relative frequency histogram (frequency distribution histogram) to organise and display the data. Much as for a frequency histogram, we make the table and draw the histogram in the following steps.

1. Find the range

The range is the difference between the largest and the smallest value in a set of data. The minimum of the observed data is t and the maximum is t, so the range is

which shows that the observed data vary over t.

2. Decide the class width and the number of classes

A suitable class width and number of classes matter a lot for discovering how data are distributed; too many or too few classes both make the distribution harder to see. There is no fixed rule for choosing them, and some trial and choice is often needed. The number of classes depends on the number of data values: in general, the more values there are, the more classes we use. When the sample size is at most , to classes are usual. For convenience the classes are usually of equal width, and the width should be a "round" number where possible.

Classes may be of equal or unequal width, depending on the features of the data. Sometimes, for convenience, all classes have equal width, or all except the first and the last.

We may fix the class width first or the number of classes first. If every class has width , then

so the data can be split into classes, which also shows that this width is fairly suitable.

3. Group the data

With width , the classes together are longer than the range, so we can let the left end of the first class be a little below the minimum and the right end of the last class a little above the maximum. For example, take the interval and split the observed data into classes of width :

4. Make the relative frequency distribution table

Work out the relative frequency of each class; for example, the relative frequency of the first class is

This gives the relative frequency distribution table (Table 9.2-1).

ClassTallyFrequencyRelative frequency
[1.2, 4.2)2323%
[4.2, 7.2)3232%
[7.2, 10.2)1313%
[10.2, 13.2)99%
[13.2, 16.2)99%
[16.2, 19.2)55%
[19.2, 22.2)33%
[22.2, 25.2)44%
[25.2, 28.2]22%
Total100100%
Table 9.2-1: relative frequency distribution of the average monthly water use of households (relative frequencies written as percentages: means ).

5. Draw the relative frequency histogram

From Table 9.2-1 we can draw the relative frequency histogram shown in Figure 9.2-1.

In Figure 9.2-1 the horizontal axis shows average monthly water use and the vertical axis shows .

Here is just the height of each bar in the relative frequency histogram; it reflects how densely the observed data are packed in each class. Because

the area of each bar is the relative frequency of its class. In this way a relative frequency histogram shows, by area, how large the relative frequency of the data in each class is. It is easy to see that in a relative frequency histogram the areas of all the bars add up to ; that is, the relative frequency of the sample data falling in the whole interval is .

00.050.10.15relative frequency / class width0.0770.1070.0430.0300.0300.0170.0100.0130.0071.24.27.210.213.216.219.222.225.228.2water use / t
Figure 9.2-1: relative frequency histogram of the average monthly water use of households; the number on top of each bar is its height .

Statistical software can draw relative frequency histograms quickly and accurately. A relative frequency histogram makes the proportions of the sample data in the classes visible at a glance, which helps us grasp the overall features of the distribution.

The areas of the bars add up to : each bar's area equals the frequency of its group, and the frequencies of all groups add up to .

Related points

All points in this topic

Cite this page: Relative frequency histograms · KnowledgeTree (知识树), https://www.knowledgetree.world/en/kp/KP004439