Why Counts and Proportions Can Tell Different Stories
A grouped bar chart compares a categorical outcome across groups. Its bars can show counts, such as the number of policies renewed, or within-group proportions, such as the fraction of policies renewed in each sales channel. These are not interchangeable views: when groups contain different numbers of observations, the larger group can have more cases in a category even when that category is less common within the group.
For an actuarial analysis, the right display depends on the question. If the question concerns workload or total volume, counts may be useful. If it concerns how often an outcome occurs within each group, proportions usually make the comparison clearer. Both displays can be informative, provided the axes and denominators are understood. The distinction is aligned with the SOA Exam PA (Predictive Analytics) syllabus.
A two-way frequency table is a useful starting point. Each cell contains a count for one group and one outcome category; the group total is the sum of the counts across the outcome categories. To show proportions, divide each cell by its own group total. The denominator is therefore different from one group to another when group sizes differ.
From Counts to Within-Group Proportions
Suppose each observation belongs to exactly one of the displayed groups and exactly one of the outcome categories. Within a particular group \(g\), the category counts add to the group total:
Dividing both sides by \(n_g\) gives the corresponding relationship for proportions:
This is why the proportions for each group sum to one, or 100%. The calculation describes the observed distribution of categories within that group. It does not, by itself, establish why groups differ or predict what would happen in a different population.
Counts answer “How many observations in this group had this outcome?” Proportions answer “What fraction of this group had this outcome?” A chart of counts reflects both the group’s size and the outcome’s frequency within it. A chart of proportions focuses on the within-group distribution, but no longer shows how many observations contributed to each estimate.
Worked Example: Comparing Renewal Outcomes Across Two Offices
Hypothetical scenario. An insurer reviews records for two offices. Office North has 30 renewed policies and 10 policies not renewed. Office South has 12 renewed policies and 8 policies not renewed. Calculate the counts and within-office proportions, then state what each chart comparison shows.
Method. First calculate each office total, then divide each category count by that office’s total. This avoids comparing raw counts as though the offices had equal numbers of policies.
Step 1: Find the totals. North has \(30+10=40\) policies. South has \(12+8=20\) policies.
Step 2: Calculate the proportions. In North, the renewal proportion is \(30/40=0.75\), or 75%, and the not-renewed proportion is \(10/40=0.25\), or 25%. In South, the renewal proportion is \(12/20=0.60\), or 60%, and the not-renewed proportion is \(8/20=0.40\), or 40%.
Step 3: Interpret both displays. The count chart shows more renewals in North (30) than in South (12). The proportion chart shows a larger renewal fraction in North (75%) than in South (60%). Here both comparisons point in the same direction, but the count difference also reflects North’s larger total: 40 policies compared with 20.
Check. North’s proportions sum to \(0.75+0.25=1.00\), and South’s sum to \(0.60+0.40=1.00\). The group totals also match the given counts.
Common mistake avoided: treating 30 and 12 as rates. They are counts; the corresponding within-office renewal rates are 75% and 60%.
Unequal Group Sizes Can Reverse the Visual Comparison
The clearest reason to distinguish the two displays is that the direction of a count comparison can differ from the direction of a proportion comparison. A large group may have more observations in a category simply because it contains many more observations overall. Conversely, a smaller group can have fewer cases but a higher within-group proportion.
Worked Example: Claim Notifications in Two Hypothetical Portfolios
Hypothetical scenario. A review compares claim notifications in two portfolios. Portfolio A has 120 policies, of which 18 generated a notification. Portfolio B has 30 policies, of which 9 generated a notification. The other policies in each portfolio did not generate a notification. Determine whether the count and proportion comparisons agree.
Method. Calculate both the number of notifications and the fraction of policies with a notification in each portfolio. The common mistake to avoid is concluding that the portfolio with more notifications has the higher notification rate.
Step 1: Complete the category counts. Portfolio A has \(120-18=102\) policies without a notification. Portfolio B has \(30-9=21\) without a notification. The totals check: \(18+102=120\) and \(9+21=30\).
Step 2: Compare the notification counts. Portfolio A has 18 notifications and Portfolio B has 9. Thus A has \(18-9=9\) more notifications in total.
Step 3: Calculate the within-portfolio proportions. For A, the notification proportion is \(18/120=0.15\), or 15%, and the no-notification proportion is \(102/120=0.85\), or 85%. For B, the notification proportion is \(9/30=0.30\), or 30%, and the no-notification proportion is \(21/30=0.70\), or 70%.
Step 4: Interpret the difference. The count chart has a taller notification bar for A (18 versus 9), but the proportion chart has a taller notification bar for B (30% versus 15%). B has half as many notifications in total but twice the within-portfolio notification proportion.
Check. Each pair of proportions sums to 100%, and the counts in each portfolio sum to its stated total.
Common mistake avoided: “Portfolio A has more notifications, so its notification rate is higher” is incorrect. The rates require different denominators: \(18/120\) for A and \(9/30\) for B.
Making Grouped Bar Charts in R
A grouped chart can display the count table directly or a table of within-group proportions. In base R, a matrix with outcome categories in rows and groups in columns provides a convenient layout. With beside=TRUE, the bars are placed side by side; the group names label the sets of bars, while the legend identifies the outcome categories.
The next example uses the renewal data from a hypothetical review. It calculates the group proportions in R and specifies separate vertical axes for the count and proportion displays. The calculations are shown before the code so that the intended denominators are clear.
Worked Example: Building Count and Proportion Charts in R
Hypothetical scenario. In a review of policy renewals, the Digital group has 68 renewed and 12 not renewed policies. The Agent group has 14 renewed and 6 not renewed policies. Calculate the group proportions and write R code for both grouped charts.
Method. Put outcome categories in rows and groups in columns, then use column totals as the denominators. This avoids the common mistake of normalizing by outcome category instead of by group.
Step 1: Find group totals. Digital has \(68+12=80\) policies. Agent has \(14+6=20\) policies.
Step 2: Calculate proportions. Digital has \(68/80=0.85\) renewed and \(12/80=0.15\) not renewed. Agent has \(14/20=0.70\) renewed and \(6/20=0.30\) not renewed.
Step 3: Check the comparison. Digital has more renewals by count (68 versus 14), and a higher renewal proportion (85% versus 70%). The proportion table should have a column total of 1 for each group.
Step 4: Enter the counts and compute proportions in R. R fills a matrix by columns by default, so the values below place the two category counts for Digital first, followed by the two for Agent.
The corresponding R code is:
tab <- matrix(c(68, 12, 14, 6), nrow = 2)
rownames(tab) <- c("Renewed", "Not renewed")
colnames(tab) <- c("Digital", "Agent")
prop <- prop.table(tab, margin = 2)
prop
The proportions returned are 0.85 and 0.15 in the Digital column, and 0.70 and 0.30 in the Agent column. The argument margin = 2 normalizes within columns. Because columns represent groups, each group’s column sums to 1.
Step 5: Draw the charts. Use the same matrix structure for the count chart, then use the proportion table for the within-group chart.
barplot(tab, beside = TRUE, names.arg = colnames(tab),
legend.text = rownames(tab), ylab = "Policy count")
barplot(prop, beside = TRUE, names.arg = colnames(tab),
legend.text = rownames(tab), ylim = c(0, 1),
ylab = "Within-group proportion")
The first plot’s vertical scale is a count scale; the second ranges from 0 to 1. The count bars show policy volume, while the proportion bars compare the outcome distributions within the two groups.
Check. The matrix contains the stated counts, the Digital column sums to 80, the Agent column sums to 20, and each column of prop sums to 1.
Common mistake avoided: using margin = 1 would divide across the outcome-category rows. That would answer a different question: how each group contributes to the total number in a category, rather than how outcomes are distributed within each group.
Choosing and Interpreting the Display
Before plotting, state the comparison in words and identify its denominator. If the question is about how many cases each group contributes, use counts. If the question is about the share of each group with an outcome, use within-group proportions. When group sizes differ, an unqualified statement such as “Group A has more” is incomplete: specify whether “more” means more cases or a higher fraction.
| Display | Question it supports | What to keep in mind |
|---|---|---|
| Counts | How many observations in each group fall in each category? | Counts reflect both group size and category frequency within the group. |
| Within-group proportions | What fraction of each group falls in each category? | Each group’s proportions sum to 1; group totals are not visible from the proportions alone. |
Proportions do not make group sizes irrelevant. A proportion based on 20 observations and one based on 2,000 observations may have the same numerical value, but they are based on different amounts of data. The chart describes the observed proportions; it does not display the denominators unless they are added or reported separately. In a concise analysis, report group totals alongside the proportion comparison when those totals matter to the interpretation.
The denominator must match the stated question. Dividing each category count by the overall total answers what fraction of all observations occupy that group-category cell. It does not answer what fraction of a particular group has the outcome. Similarly, percentages computed within outcome categories describe how cases in each outcome are distributed across groups. Those may be useful for a different question, but they are not within-group percentages.
Check Your Understanding
For each problem, identify the relevant group totals and distinguish the count comparison from the within-group proportion comparison.
- A hypothetical service team records 24 approvals and 6 declines in East, and 36 approvals and 24 declines in West. Which region has more approvals by count, and which has the higher approval proportion? (Answer: West has more approvals by count, 36 versus 24; East has the higher approval proportion, 24/30 = 80% versus 36/60 = 60%.)
- In a hypothetical review, the Standard group has 12 events among 60 records, while the Enhanced group has 9 events among 30 records. Find both event proportions and state whether the count and proportion rankings agree. (Answer: Standard has 12/60 = 20%; Enhanced has 9/30 = 30%; Standard has the larger count, but Enhanced has the larger proportion.)
- Group A has 6 observations in category X and 4 in category Y. Group B has 12 in X and 8 in Y. Calculate both groups’ proportions and describe the comparison. (Answer: Both groups are 60% X and 40% Y; B has twice each count, but the within-group proportions are equal.)
- A table has category rows and group columns. In R, what does
prop.table(tab, margin = 2)calculate, and what should each column sum to, assuming each observation is assigned to one displayed category? (Answer: It divides each cell by its column total, giving within-group proportions; each column sums to 1.) - A hypothetical portfolio has 15 notified and 85 not-notified policies in Group P, and 8 notified and 32 not-notified policies in Group Q. Which group has the greater notification count, and which has the greater notification proportion? (Answer: P has the greater count, 15 versus 8; Q has the greater proportion, 8/40 = 20% versus 15/100 = 15%.)