Статистика · Начальный
Use bar charts and pie charts without hiding the denominator
Compare categories and compositions with explicit counts and denominators.
10 мин чтения · 26 окт. 2026 г.
Эта страница ещё не переведена, поэтому вы читаете английскую версию.
Главное
- Use honest bar scales.
- Reserve pies for parts of one whole.
- Expose missing responses and overlapping categories.
Содержание
Compare categories and compositions with explicit counts and denominators.
A bar chart compares magnitudes across categories. A pie chart partitions a whole. Both can be useful, but neither can repair unclear categories, inconsistent denominators or a misleading summary. Before plotting a percentage, you should be able to say exactly what was counted and what total it was divided by.
This tutorial explains how to build and report categorical displays in scientific, social science and engineering papers. It also explains when bars are a poor choice for continuous measurements and why survey percentages require particular care. All numerical examples here are hypothetical or constructed for teaching.
Define the counting unit and category rules
Suppose a review contains twenty papers. Ten are assigned to biology, six to engineering and four to physics. If each paper receives exactly one primary category, the counts total twenty and the proportions are 50%, 30% and 20%. That is a coherent composition.
Now suppose papers can receive more than one subject tag. The same counts might describe overlapping classifications rather than separate portions of twenty. A pie would imply a partition that does not exist. A bar chart can still display the number of papers carrying each tag, with a note that categories overlap.
Three terms help you check the structure:
- Mutually exclusive categories do not overlap for the counting unit.
- Exhaustive categories include every unit in the stated whole, perhaps with an “other” category.
- A denominator is the total used to calculate a proportion.
Write the classification rule before coding the records. For a review of engineering studies, does “simulation” include papers that also use a physical prototype? If yes, the chart should show overlapping methods. If you need exclusive categories, define a consistent hierarchy and explain what information is lost by assigning one primary category.
The supplied illustration uses exclusive primary categories and a total of twenty synthetic papers. It demonstrates graphical encoding, not the distribution of any real journal's submissions.
Decide whether you need counts, percentages or rates
A count reports how many events or units were observed. A proportion divides a count by a relevant total. A rate additionally reflects exposure, such as failures per device hour. These answer different questions.
In a hypothetical device evaluation, ten failures during 1,000 device hours and ten failures during 100 device hours have the same count but different failure rates. A bar chart labelled “failures” would hide that difference. A chart of rates should identify both the event count and exposure definition, and its uncertainty should match the rate model.
Similarly, a university with more respondents can have more students reporting stress while a smaller university has the higher proportion. Choose the quantity that answers the research question. If sample size itself matters, show it alongside the percentage rather than forcing readers to guess.
For weighted survey estimates, distinguish the unweighted number of respondents from the weighted percentage. A weighted 60% need not equal 60 divided by a visible sample size of 100. Report the weighting approach and use variance estimation appropriate to the survey design.
Construct bars with an honest baseline
A bar's length represents magnitude from a baseline, so counts and ordinary positive proportions should usually start at zero. Truncating the vertical axis can make a modest difference appear enormous. If the purpose is to inspect small differences between estimates, a point and interval plot with a clearly labelled restricted axis may be better.
Use horizontal bars when labels are long. Sort unordered categories by a defensible rule such as decreasing count or a meaningful conceptual grouping. Keep naturally ordered categories in their order. “Strongly disagree”, “disagree”, “neutral”, “agree” and “strongly agree” should not be rearranged from largest to smallest if the response scale is the subject of the figure.
Software may either count rows or plot supplied summary values. For example, ggplot2 distinguishes a bar function that counts cases from a column function that displays values already provided. Check that your chart represents the intended quantity rather than counting the rows of a summary table. S404
Do not add perspective, shadows or three dimensional effects. These can make the apparent lengths and areas differ from the numbers. Direct value labels are useful when there are few bars, but they should not crowd the plot or replace axis definitions.
Choose grouped and stacked displays deliberately
Grouped bars place categories side by side within a group. They can compare the same response across two conditions, but become difficult to read with many groups. Small multiples are repeated panels with consistent encodings and often offer a clearer alternative.
Stacked bars show how categories combine into a total. In a 100% stacked display, every bar has the same total length, so the graphic emphasises composition and hides absolute sample size unless it is labelled. Interior segments lack a common baseline, making precise comparison harder.
A hypothetical survey asks students from two year groups to rate access to mentoring on a five category ordered scale. A 100% stacked display can communicate the response distribution if the categories follow the same order in both groups. Include counts per group, describe missing responses and avoid treating distances between verbal categories as automatically equal.
If you combine “agree” and “strongly agree”, explain the rule and preserve the fuller distribution somewhere accessible when it matters. Combining categories after seeing which version gives a more dramatic contrast can change the story. A planned simplification should have a substantive rationale.
Use pie charts only for a meaningful whole
A pie chart can communicate a simple composition with a few clearly labelled categories. Give the total and label categories directly. It is less useful for precise comparisons among similar shares or for comparing many groups. Avoid exploded slices and perspective effects.
Do not use a pie chart for overlapping responses, changes across time, negative values, unrelated measurements or rates with different exposures. A survey question allowing several choices needs a display that permits percentages to exceed 100% in total. A series of bars labelled “percentage of respondents selecting each option” makes that structure explicit.
Consider a hypothetical class of twenty respondents: twelve select cost as a barrier, nine select travel and seven select scheduling. The sum is twenty eight selections. These are not 42.9%, 32.1% and 25.0% of respondents. Those numbers would describe shares of selections. The percentages of respondents are 60%, 45% and 35%, which sum to 140% because choices overlap.
Neither denominator is inherently forbidden, but the research question determines which is meaningful. If the question is “How common is each barrier among students?”, use respondents. If the question is “How were all coded mentions distributed?”, selections or mentions may be appropriate, with a clear definition.
Make missing responses visible
Suppose twenty students are invited, sixteen answer an item and eight give a positive response. Eight is 50% of item respondents and 40% of invitees. Calling the result “50% of students” leaves the population unclear and may conceal nonresponse.
A useful caption states: “Eight of sixteen item respondents selected a positive response; four of twenty invitees did not answer this item.” If the analysis uses only completed surveys, explain that selection. Do not silently use different denominators for adjacent bars when missingness differs by item.
Distinguish a true zero from no information. A category with zero observed selections is different from a question that was never asked. A bar with height zero should not stand for both. If a category combines a small number of potentially identifiable participants, choose an appropriate privacy preserving presentation and explain aggregation where possible.
Do not let a mean bar hide a continuous distribution
Bars of means are common in experimental papers, but they can conceal variation, outliers and pairing. Two groups can have equal means and very different distributions. A dot plot with a summary, a paired plot or a distribution display often provides more information. The methodological examples in Weissgerber and colleagues show this problem for small sample continuous data. S402
For the supplied controller data, the crucial information is that A and B are measured in the same twelve cases. Two mean bars conceal that matching. A paired plot is therefore a better starting point. By contrast, a bar chart showing how many layouts belong to each complexity category would answer a categorical question and could be appropriate.
If a field convention requires mean bars, add individual observations where feasible and define uncertainty precisely. “Mean ± error” is not sufficient. A chart of a continuous average and a chart of a category count may look similar, but their statistical meanings are quite different.
Include uncertainty only when its meaning is clear
A proportion calculated from a sample can have an uncertainty interval. The appropriate method depends on the sampling design, weights, clustering and intended population. A complete enumeration of a specific collection, such as all twenty papers in a defined exercise, does not automatically need sampling error bars.
Do not interpret a percentage as precise just because it is displayed with two decimal places. For eight positive answers out of sixteen respondents, each additional positive answer changes the percentage by 6.25 percentage points. “50.00%” would not create more information.
Percentage points and percent change are different. Moving from 40% to 50% is an increase of 10 percentage points. Relative to 40%, it is a 25% increase because 10 divided by 40 equals 0.25. State which comparison you mean.
Write a complete reporting paragraph and legend
A weak description of the hypothetical barrier survey is:
Most students had several barriers, especially cost, which accounted for 43% of the results.
The statement does not define “results”, and the marginal counts alone do not establish how many students had several barriers. A better paragraph is:
In the constructed survey of twenty respondents, twelve selected cost, nine selected travel and seven selected scheduling as barriers. These counts correspond to 60%, 45% and 35% of respondents. Multiple selections were permitted, so the percentages do not form parts of one 100% total. The marginal counts do not reveal which combinations of barriers individual respondents selected.
A suitable legend is:
Bars show the percentage of twenty hypothetical respondents selecting each barrier. Counts are printed beside the bars. Respondents could choose more than one option; the sum therefore exceeds 100%. All twenty answered this item. Values are constructed for teaching and are not survey findings.
This example demonstrates that a useful caption can prevent an incorrect inference without requiring a complicated graphic.
Practice and model answer
Task: A figure shows 70% satisfied in Group A and 60% in Group B. It omits sample sizes, response rates and uncertainty. Write three questions a reader should ask.
Model answer: Ask how many eligible people and actual respondents were in each group, whether the percentage uses all respondents or only people answering the item, and whether sampling, weighting or clustering requires uncertainty estimates. Also ask whether the same question and coding rule were used. A ten percentage point difference alone does not establish a reliable or causal group difference.
Task: A review counts thirty papers, but methods tags total forty five. Can you make a pie chart of papers by method?
Model answer: Not as mutually exclusive shares of papers if tags overlap. Use bars with papers as the denominator and disclose multiple tags, or define and justify an exclusive classification. If you instead show shares of all forty five tags, label that different unit explicitly.