Tutorials › Introduction to Statistics › Pie Charts from Counts and Proportions

Graphs for Categorical Data · Tutorial 106 of 996

Pie Charts from Counts and Proportions

Convert counts or proportions into sector angles and check that a pie chart represents the whole set of observations.

Beginner 8 min read

What You'll Learn

  • Identify when categories can be represented as slices of one whole.
  • Calculate the total count used as the denominator.
  • Convert counts, proportions, or percentages into sector angles.
  • Check that category proportions and sector angles account for the whole circle.
  • Handle rounding so displayed sector angles total 360 degrees.

From a Whole Set of Categories to a Circle

A pie chart represents a complete set of observations as parts of one circle. Each category receives a sector, and the sector's share of the circle corresponds to that category's share of the observations. To construct one, you need category counts or proportions and a clear definition of which observations are included.

The key idea is that a full circle measures 360 degrees. If a category accounts for one quarter of the observations, its sector must take one quarter of the circle: \(0.25 \times 360=90\) degrees. The same calculation works for any category share.

Definition: A pie chart displays categories as sectors of a circle. For a category with count \(f\) among \(n\) observations, its proportion is \(f/n\), and its sector angle is \((f/n)\times 360^\circ\). If proportions are given directly, the sector angle is the proportion multiplied by \(360^\circ\).

A pie chart is appropriate only when the categories form parts of one whole: each included observation belongs to exactly one category, and the categories account for all observations being represented. If a person can be counted in several categories, or some observations are not accounted for, the counts do not describe a simple partition of one whole. Establishing this before calculating angles prevents an apparently neat chart from representing the wrong total.

Calculating Sector Angles

Let \(f_i\) be the count in category \(i\), and let \(n\) be the total count across all categories. The category's proportion is \(f_i/n\). Multiplying that proportion by 360 degrees gives the angle needed for its sector.

$$ \text{proportion for category } i=\frac{f_i}{n}, \qquad \text{sector angle for category } i=\frac{f_i}{n}\times 360^\circ $$

If the data are already expressed as proportions, use the same rule directly. For a proportion \(p_i\), the angle is \(p_i\times 360^\circ\). A percentage must first be divided by 100, or equivalently multiplied by \(360^\circ/100=3.6^\circ\) per percentage point. For example, 15% corresponds to \(0.15\times360^\circ=54^\circ\).

Why the formula works: The entire data set has proportion \(n/n=1\), and a complete circle has angle \(360^\circ\). If a category has proportion \(f_i/n\), it should occupy that same fraction of the circle. Therefore its angle is \((f_i/n)\times360^\circ\). Summing the angles gives \(\left(\sum_i f_i/n\right)\times360^\circ\); when the counts cover all \(n\) observations, \(\sum_i f_i=n\), so the angles sum to \(360^\circ\).

Worked Example: Making Sectors from Counts

Suppose a hypothetical survey asks 80 students which mode of travel they used to reach a campus event. Each student gives exactly one answer. The counts are: bus, 32; walking, 20; bicycle, 12; car, 16. Convert the counts to sector angles and check the total.

First check the total count:

$$ n=32+20+12+16=80 $$

The counts account for all 80 responses, and each response is in exactly one category, so these categories partition the observations. For bus, the proportion is \(32/80=0.40\), giving an angle of \(0.40\times360^\circ=144^\circ\). For walking, the proportion is \(20/80=0.25\), giving \(0.25\times360^\circ=90^\circ\).

For bicycle, \(12/80=0.15\), so the angle is \(0.15\times360^\circ=54^\circ\). For car, \(16/80=0.20\), so the angle is \(0.20\times360^\circ=72^\circ\).

Check the result: \(144^\circ+90^\circ+54^\circ+72^\circ=360^\circ\). The four sectors therefore fill one circle. Their labels should identify the travel categories; including the counts or percentages as labels can also make the chart easier to read.

Using Proportions or Percentages

Counts are not required if the proportions are known. A proportion is a category's share of the whole, on a scale from 0 to 1. Percentages express the same shares on a scale from 0% to 100%. Before calculating angles, check that the given shares sum to 1, or to 100% if they are percentages. Small discrepancies may result from rounding, but a large discrepancy signals that the values do not describe a complete set as stated.

Worked Example: Converting Proportions Directly

In a hypothetical inventory summary, four mutually exclusive product types make up all items counted. Their proportions are type A, 0.35; type B, 0.30; type C, 0.20; and type D, 0.15. Find the sector angles and verify the whole.

The shares add to \(0.35+0.30+0.20+0.15=1.00\), so they account for the complete set. Multiply each proportion by 360 degrees:

$$ \begin{aligned} \text{Type A: }&0.35\times360^\circ=126^\circ\\ \text{Type B: }&0.30\times360^\circ=108^\circ\\ \text{Type C: }&0.20\times360^\circ=72^\circ\\ \text{Type D: }&0.15\times360^\circ=54^\circ \end{aligned} $$

The angles sum to \(126^\circ+108^\circ+72^\circ+54^\circ=360^\circ\). Each angle represents that product type's share of the inventory, not a number of items. Without a total item count, the proportions determine the sectors but do not tell us the category counts.

Worked Example: Converting Percentages and Checking Rounding

Suppose a hypothetical set of 19 registered volunteers is divided among four mutually exclusive roles: 7 greeters, 5 guides, 4 setup volunteers, and 3 cleanup volunteers. Calculate the sector angles. Then consider what happens if the angles are rounded to whole degrees.

The counts sum to \(7+5+4+3=19\), so all volunteers are included once. The exact angle calculations are:

$$ \begin{aligned} \text{Greeters: }&\frac{7}{19}\times360^\circ\approx132.632^\circ\\ \text{Guides: }&\frac{5}{19}\times360^\circ\approx94.737^\circ\\ \text{Setup: }&\frac{4}{19}\times360^\circ\approx75.789^\circ\\ \text{Cleanup: }&\frac{3}{19}\times360^\circ\approx56.842^\circ \end{aligned} $$

The unrounded angles sum to \(360^\circ\), as required. Rounding each angle independently to the nearest whole degree gives 133, 95, 76, and 57 degrees, which sum to \(361^\circ\). That extra degree is a rounding artifact; it does not mean there is an extra volunteer or an extra part of the data.

If a hand-drawn chart requires whole-degree angles that add exactly to 360, one rounded angle can be adjusted by a degree. For example, use 133, 95, 76, and 56 degrees. These displayed angles sum to 360 degrees. The adjustment is a practical consequence of rounding; the underlying shares remain \(7/19\), \(5/19\), \(4/19\), and \(3/19\).

A Reliable Construction and Check

A pie chart can be drawn by marking each calculated angle in turn from the center of a circle. The sectors must meet without gaps or overlap, and every label should correspond to its intended category. Whether the chart is hand-drawn or made with software, the calculations and checks are the same.

1
Define the whole.
State which observations are included and confirm that each belongs to exactly one of the categories shown.
2
Find or verify the shares.
For counts, add them to get \(n\) and calculate each proportion as \(f_i/n\). For supplied proportions, check that they total 1, allowing for stated rounding.
3
Calculate each angle.
Multiply each proportion by \(360^\circ\). If starting with a percentage, convert it to a proportion or multiply the percentage by \(3.6^\circ\).
4
Check the circle and labels.
Confirm that the unrounded angles total \(360^\circ\), then check that each sector is labeled with the correct category. If rounded angles are used, account for any small rounding discrepancy.

The total-angle check is more than a drawing convenience. If counts \(f_1,\ldots,f_k\) are intended to cover the entire data set, their total must equal \(n\). The corresponding angles then have total

$$ \sum_{i=1}^{k}\frac{f_i}{n}\times360^\circ = \frac{\sum_{i=1}^{k}f_i}{n}\times360^\circ = \frac{n}{n}\times360^\circ = 360^\circ. $$

If the result is not 360 degrees before rounding, check the denominator, arithmetic, and category coverage. For example, a total below 360 degrees may indicate that a category has been left out or that the stated counts do not include every observation. A total above 360 degrees may indicate that categories overlap or that a count has been included twice. The chart itself cannot repair a mismatch in the data definition.

Common Mistake: Using the Count as the Angle

A common error is to assign an angle equal to the count—for instance, giving a category with 20 observations a sector of 20 degrees. This confuses two different quantities: a count tells how many observations are in a category, while an angle tells what fraction of a 360-degree circle that category should occupy.

The correction is to divide the count by the total first, then multiply by 360 degrees. If there are 80 observations and a category contains 20, its share is \(20/80=0.25\), so its angle is \(0.25\times360^\circ=90^\circ\), not 20 degrees. Always use the complete set's total as the denominator, rather than a partial subtotal or the count in another category.

Key takeaway: A pie chart represents one whole. Calculate each sector angle as its category's share of that whole times \(360^\circ\), and verify that the shares account for all observations and the unrounded angles add to \(360^\circ\).

Check Your Understanding

Answer each question using the definitions and checks from this tutorial.

  1. A hypothetical survey has 50 responses, of which 15 are in one category. What proportion and sector angle should that category have?
  2. Four categories have proportions 0.10, 0.25, 0.40, and 0.25. Calculate all four angles and check their sum.
  3. Why must you confirm that each observation belongs to exactly one category before making a pie chart?
  4. Three category percentages are 45%, 30%, and 20%. What does their total suggest you should check before drawing a pie chart?
  5. Rounded sector angles add to 359 degrees, but the proportions sum to 1 before rounding. Give one likely explanation for the difference.