Bar Graphs and Histograms
A picture is worth a thousand numbers. Bar graphs and histograms are the two most basic visual displays of data. Both use rectangles whose heights show frequency, but they apply to different kinds of data: bar graphs for discrete or categorical data, histograms for grouped continuous data.
Definitions
A bar graph is a chart with separate rectangular bars whose heights are proportional to the frequencies they represent. Bars are usually drawn with equal width and separated by gaps.
A histogram is similar to a bar graph but used for grouped continuous data. The bars are adjacent (no gaps) because the classes are continuous intervals. The horizontal axis shows class intervals; bar heights show frequencies.
A frequency polygon is a line graph obtained by joining the midpoints (class marks) of the tops of histogram bars.
How to draw a bar graph
- Choose a horizontal axis with the categories listed (e.g. months, sports, subjects).
- Choose a vertical axis with frequencies. Pick a scale that fits the range.
- Draw bars of equal width, separated by equal gaps, with heights equal to the corresponding frequencies.
- Label both axes and give the graph a title.
Example. Number of students who like each sport in a class of 30:
| Sport | Cricket | Football | Tennis | Hockey |
|---|---|---|---|---|
| Frequency | 12 | 10 | 5 | 3 |
Draw four vertical bars at the four sports' names, with heights 12, 10, 5, 3, separated by gaps.
How to draw a histogram
- Choose a horizontal axis for class intervals (e.g. 0-10, 10-20, 20-30).
- Choose a vertical axis for frequencies.
- Draw bars whose widths correspond to the class widths and whose heights equal the frequencies.
- The bars are adjacent , no gaps , because the classes are continuous.
Example. Marks of 30 students by class:
| Class | 0-20 | 20-40 | 40-60 | 60-80 | 80-100 |
|---|---|---|---|---|---|
| Frequency | 3 | 8 | 12 | 5 | 2 |
Draw five adjacent bars with widths 20 and heights 3, 8, 12, 5, 2.
Frequency polygon
Mark the midpoint of each bar's top in a histogram. Join these midpoints by straight lines. The resulting line graph is the frequency polygon. To close the polygon, add a point at the class-mark height at the start (before the first class) and the end (after the last class).
Frequency polygons are useful for comparing two or more distributions on the same axes.
When to use which
- Bar graph: Discrete categories (sports, colours, names) or discrete numerical values with few options (number of siblings).
- Histogram: Continuous data grouped into intervals (heights, weights, temperatures, marks).
- Frequency polygon: Comparing multiple distributions; visualising the "shape" of one distribution.
Pitfalls and standards
- Equal widths. All bars (or class intervals, for histograms) should have equal widths. If they don't, you must scale heights to keep areas proportional to frequencies , a complication we avoid in Class IX.
- Choose a sensible scale. Don't make tiny bars or overflow the page.
- Always label. Axes and title.
Worked examples
Example 1. A class of 25 students likes the following subjects: Maths 10, Science 7, English 5, History 3. Draw a bar graph.
Horizontal axis: subjects. Vertical axis: frequency (scale 0-10 in steps of 2). Four bars of heights 10, 7, 5, 3 with equal gaps.
Example 2. Marks of 50 students in classes 0-10, 10-20, ..., 50-60 with frequencies 4, 8, 12, 14, 8, 4. Draw a histogram.
Horizontal axis: class intervals (width 10 each). Vertical axis: frequency. Six adjacent bars of heights 4, 8, 12, 14, 8, 4.
Example 3. From the histogram in Example 2, draw the frequency polygon.
Mark the midpoints at class marks 5, 15, 25, 35, 45, 55 with heights 4, 8, 12, 14, 8, 4. Also add points and to close the polygon. Join with straight lines.
Example 4. A bar graph shows fruit sales: apples 50, bananas 80, oranges 30, grapes 20. Which fruit had the most sales?
Bananas (height 80 is tallest).
Example 5. In a histogram, the tallest bar is in the class 30-40 with frequency 18. What does this tell you?
The modal class is 30-40. Most observations lie in that interval.
Try it yourself
- Draw a bar graph for: pets owned by 20 students , dogs 8, cats 6, fish 4, birds 2.
- Draw a histogram for marks in classes 0-10, 10-20, ..., 50-60 with frequencies 2, 6, 10, 8, 5, 4.
- Describe the difference between a bar graph and a histogram.
- From the histogram of question 2, draw the frequency polygon.
- State why histogram bars are adjacent.
- A bar graph shows monthly sales over five months: 100, 120, 90, 150, 130. Find the average sales.
- When would you choose a histogram over a bar graph?
- What does a frequency polygon represent visually?
- From a bar graph of test scores: 30 (10 students), 40 (15 students), 50 (20 students), 60 (12 students), 70 (8 students), find the modal score.
- Draw a bar graph for the favourite colour: red 12, blue 15, green 8, yellow 5.
Pitfalls / Insight
- Histogram bars must be adjacent. A gap suggests the data is categorical, not continuous.
- Use equal class widths. Otherwise heights must be scaled to keep areas proportional.
- Read the scale. A short bar doesn't necessarily mean "few" , check the scale.
Insight. A graph turns numbers into a story. Once you can read a bar graph or histogram fluently, you can spot patterns , trends, peaks, gaps , at a glance. The next two lessons compute summary numbers; the graphs let you check whether those numbers really represent the data well.