Bar Graph vs Frequency Table

Both terms below come up in the same part of the course, and students mix them up. Here is each one defined on its own, side by side, so you can see where they part company.

Bar graph

Graphs and displays

A bar graph displays a categorical variable using separated bars whose heights show the count or relative frequency of each category.

A bar graph draws one bar per category of a categorical variable, with the bar's height equal to the frequency in that category or to its relative frequency. Gaps separate the bars because the horizontal axis is a list of labels, not a number line. The categories have to be mutually exclusive, so every observation is counted in exactly one bar and the heights add to nn.

Forty-two students pick a lunch: pizza 18, salad 12, pasta 9, soup 3. The pizza bar is tallest, and its relative frequency is 18/42=0.428618 / 42 = 0.4286, about 43 percent. The four counts add back to 42, which is the check that the categories covered everyone once.

The misreading worth naming is "the bars fall from left to right, so the graph shows a downward trend." Nothing about that horizontal axis is ordered, so there is no trend to read. List the same four categories alphabetically, pasta, pizza, salad, soup, and the bars run 9, 18, 12, 3, rising and then falling. Both pictures are correct and neither says anything about direction.

What the display quietly gets wrong is the baseline. Value is encoded as bar length, so cutting the vertical axis destroys the encoding. On an axis starting at 0, the soup bar is 3/18=0.1673 / 18 = 0.167 of the pizza bar. Start the axis at 2 and the drawn lengths become 16, 10, 7 and 1, so the same soup bar now reads as 1/16=0.06251 / 16 = 0.0625 of the pizza bar, well under half the ratio the counts support. Nothing in the picture warns you. Only the axis labels do.

Order does matter when the variable is ordinal, such as small, medium, large, and there you keep the natural sequence rather than sorting by height. Bar charts sit in topic 1.4, Graphical Representations for One Categorical Variable.

Full entry for bar graph

Frequency table

Graphs and displays

A frequency table lists the categories or value ranges of a variable alongside the count of observations in each.

A frequency table pairs each category, or each class interval, with the number of observations in it. The counts add to nn. A relative frequency column divides each count by nn and adds to 1. The table is the numeric form of a bar graph or a histogram and holds exactly the same information, which is why the table is usually the more precise thing to report.

Thirty exam scores fall into the classes 60 to 70, 70 to 80, 80 to 90 and 90 to 100 with counts 4, 9, 12 and 5, under the usual rule that a class holds values at or above its lower bound and below its upper one. The relative frequency of the 80 to 90 class is 12/30=0.4012 / 30 = 0.40. Estimating the mean from the table means assuming every score sits at its class midpoint: 65(4)+75(9)+85(12)+95(5)30=243030=81\frac{65(4) + 75(9) + 85(12) + 95(5)}{30} = \frac{2430}{30} = 81.

The wrong sentence is "the mean is (4+9+12+5)/4=7.5(4 + 9 + 12 + 5)/4 = 7.5." That averages the counts. The 7.5 is the average number of students per class interval, not the average score. One column says how many and the other says how much, and only the second one is the variable.

Grouping is where the information goes. That 81 is an estimate, not the mean. Had every score sat at the bottom of its class the mean would be 76, and at the top of its class it would be 86, so the table pins the true mean only to somewhere between 76 and 86. No further arithmetic on the table narrows that, because the individual values are gone. An ungrouped table, one row per distinct value, keeps them.

For a categorical variable there is no mean to estimate at all, so the table supports the mode and the proportions and stops there. Tables for one categorical variable are topic 1.3.

Full entry for frequency table

Where each one fits in the course