To construct a histogram, divide the entire range of values into non-overlapping adjacent intervals (bins), and then count how many elements from the dataset fall into each interval. This is how we built the example histogram from the last section.
Notice how the intervals below are expressed:
- from equal to 0 to less than 10;
- from equal to 10 to less than 20,
The histogram data can also be expressed in table form, as seen here.
| [ 0; 10 )
Of course, you can also use different bin widths (i.e. using an interval of 5 instead of 10) to learn more about the dataset.