From Policy Records to a Cautious Summary
An exploratory summary is more than a list of averages. A useful first pass checks what one row represents, how many records and variables are present, whether the columns have appropriate R classes, what values they contain, and how important outcomes are distributed. Selected group comparisons can then describe patterns in the observed data. They do not, by themselves, explain why those patterns occur.
This tutorial follows one hypothetical portfolio of policy records from basic structure checks through outcome and group summaries. The unit of observation is one policy, not one claim and not one policyholder. That distinction matters: for example, an average claim count per row describes claims per policy record in this data set. It is not automatically a claim frequency per unit of exposure.
The workflow below is aligned with the SOA Exam PA (Predictive Analytics) syllabus. Keep the question narrow at this stage: what do these records contain, and what patterns can be described without making claims the data do not support?
A Hypothetical Policy Data Set
Suppose an analyst receives the following 12 hypothetical records. The outcome columns are annual premium, claim count during the observation period, and whether the policy renewed. Region and channel are explanatory labels; they are not proof of a cause for any outcome.
| Policy ID | Region | Channel | Age | Premium ($) | Claim count | Renewed |
|---|---|---|---|---|---|---|
| 101 | North | Direct | 24 | 420 | 0 | Yes |
| 102 | North | Broker | 31 | 510 | 1 | Yes |
| 103 | North | Direct | 45 | 680 | 0 | Yes |
| 104 | South | Direct | 28 | 460 | 0 | Yes |
| 105 | South | Broker | 36 | 590 | 0 | Yes |
| 106 | South | Direct | 41 | 700 | 1 | No |
| 107 | South | Broker | 60 | 900 | 3 | No |
| 108 | West | Direct | 22 | 400 | 0 | Yes |
| 109 | West | Broker | 39 | 620 | 1 | No |
| 110 | West | Direct | 48 | 730 | 0 | Yes |
| 111 | West | Broker | 55 | 880 | 2 | Yes |
| 112 | West | Direct | 33 | 550 | 1 | No |
In R, the intended structure should be explicit. For example, store policy ID as an integer, region and channel as factors, age and premium as numeric, claim count as an integer, and renewal as a factor with levels No and Yes. These choices help prevent labels being treated as measurements and make categorical outcomes straightforward to tabulate. They do not change the underlying recorded values.
Worked Example: Checking Dimensions, Classes, and Ranges
An analyst must give a first-pass account of the 12 records above. State the dimensions, identify the intended class of each column, check for missing values and duplicate IDs, and report the observed ranges of age, premium, and claim count.
Method. Use the data-frame dimensions, inspect classes, check missingness and identifier duplication, then calculate ranges for the specified numeric columns. For instance, the relevant R checks are dim(policies), str(policies), colSums(is.na(policies)), anyDuplicated(policies$policy_id), and range(policies$age).
Dimensions. There is one row per policy and seven columns, so dim(policies) returns 12 rows and 7 columns. This confirms the number of records being summarized; it does not establish how the records were selected.
Classes. The intended classes are policy_id: integer; region: factor; channel: factor; age: numeric; premium: numeric; claim_count: integer; renewed: factor. The region levels are North, South, and West; the channel levels are Direct and Broker; and the renewal levels are No and Yes. A class check can reveal, for example, if a categorical label was imported as free-form text or if a count was unexpectedly read as a decimal.
Missing values and duplicate IDs. Each of the seven columns has zero missing values in this constructed data set, so colSums(is.na(policies)) returns seven zeros. The policy IDs are all distinct, so anyDuplicated(policies$policy_id) returns 0. These results indicate no missing entries or repeated IDs in these records; they do not rule out other data errors.
Ranges. The minimum and maximum ages are 22 and 60 years, respectively. Premium ranges from $400 to $900, and claim count ranges from 0 to 3. The method is range(x), applied separately to each column. Each range is a check on the recorded values, not a conclusion that every value is plausible for the intended population.
Check. The row count is 12, matching the 12 policy IDs in the table, and each stated minimum and maximum appears in a listed record. A common mistake is to call the seven columns “seven policies”; dimensions are reported as rows first, then columns.
Summarize Outcomes With the Right Denominator
For a categorical outcome, count the records at each level and state the denominator used for proportions. For a numeric or count outcome, report summaries suited to its meaning. A claim count is a discrete count, so its individual observed values and frequencies are informative alongside its mean. For a renewal indicator, the proportion renewed is the number of Yes records divided by the number of records with a known renewal status.
Worked Example: Summarizing Renewal and Claim Count
Using the 12 records, calculate the renewal distribution and the frequency distribution of claim count. Then calculate the mean claim count per policy record and check it against the frequency table.
Method. In R, table(policies$renewed) counts the renewal levels, and prop.table(table(policies$renewed)) converts those counts to proportions. Likewise, table(policies$claim_count) tabulates claim counts. For these records there are no missing outcomes, so each denominator is 12.
Renewal. The table contains 8 Yes records and 4 No records. Thus the Yes proportion is \(8/12=0.6667\), and the No proportion is \(4/12=0.3333\), to four decimal places. The observed renewal share is therefore 66.67% of these 12 records.
Claim-count distribution. Six records have 0 claims, four have 1, one has 2, and one has 3. The frequencies add to \(6+4+1+1=12\). The corresponding proportions are \(6/12=0.5000\), \(4/12=0.3333\), \(1/12=0.0833\), and \(1/12=0.0833\), to four decimal places. Their rounded proportions sum to 0.9999 because of rounding; the unrounded proportions sum to 1.
Mean claim count. The total number of claims recorded is \(0(6)+1(4)+2(1)+3(1)=0+4+2+3=9\). Dividing by the 12 policies gives a mean of \(9/12=0.75\) claims per policy record. The frequency table and the row-level claim counts both imply a total of 9, which checks the calculation.
The method avoids confusing a proportion with a count: 8 renewed policies is a count, while 0.6667 is a proportion with denominator 12. It also avoids interpreting this mean as an exposure-adjusted frequency; no exposure measure is provided here.
Compare Groups and Preserve the Overall Meaning
Group summaries can reveal descriptive differences worth investigating. Always check group sizes before comparing them: an average from three records and an average from five records have different amounts of support. Also be explicit about what is being averaged. A mean premium by region is a descriptive summary of these policy rows, not an estimate of the effect of changing a policy’s region.
The overall mean can be derived from group means when the groups partition all records and the same variable is observed in each group. If group \(g\) contains \(n_g\) records with mean \(\bar{x}_g\), then the sum of values in that group is \(n_g\bar{x}_g\). Adding the group sums and dividing by the overall number of records \(N=\sum_g n_g\) gives:
This is a weighted mean of group means, with group size as the weight. It follows directly because \(n_g\bar{x}_g\) is the group total. Taking an ordinary mean of group means instead gives each group equal weight, regardless of its number of policies; that is generally not the overall mean.
Worked Example: Comparing Premium and Renewal by Region
For each region, calculate its policy count, mean annual premium, mean claim count, and renewal proportion. Compare the region means with the overall mean premium, and explain why an unweighted average of the three regional means is misleading here.
Method. Group the records by region and calculate the requested summaries. In R, aggregate(cbind(premium, claim_count) ~ region, data = policies, FUN = mean) gives the two numeric means; table(policies$region) gives group sizes; and table(policies$region, policies$renewed) provides renewal counts. Divide each Yes count by its regional size to obtain the renewal proportion.
North. There are 3 policies. The premium total is \(420+510+680=1{,}610\), so the mean is \(1{,}610/3=\$536.67\), rounded to cents. Claim count totals \(0+1+0=1\), giving a mean of \(1/3=0.3333\) to four decimal places. All 3 renewed, so the renewal proportion is \(3/3=1.0000\).
South. There are 4 policies. The premium total is \(460+590+700+900=2{,}650\), so the mean is \(2{,}650/4=\$662.50\). Claim count totals \(0+0+1+3=4\), giving a mean of \(4/4=1.0000\). Two of the 4 renewed, so the renewal proportion is \(2/4=0.5000\).
West. There are 5 policies. The premium total is \(400+620+730+880+550=3{,}180\), so the mean is \(3{,}180/5=\$636.00\). Claim count totals \(0+1+0+2+1=4\), giving a mean of \(4/5=0.8000\). Three of the 5 renewed, so the renewal proportion is \(3/5=0.6000\).
Overall check. The premium total is \(1{,}610+2{,}650+3{,}180=7{,}440\), and the overall mean is \(7{,}440/12=\$620.00\). Weighting the regional means by their group sizes gives \((3(536.6667)+4(662.50)+5(636.00))/12\), which is \((1{,}610+2{,}650+3{,}180)/12=\$620.00\). By contrast, the unweighted mean of the three regional means is \((536.6667+662.50+636.00)/3=\$611.72\), to cents. It differs because the region sizes are 3, 4, and 5, not equal.
The arithmetic is internally consistent: the regional sizes sum to \(3+4+5=12\), and the regional premium totals sum to the overall total. The common mistake is to average subgroup means equally and label the result the portfolio mean. That would be appropriate only for a different target, such as the mean of the three regional means when each region is intentionally given equal importance.
Interpretation: Describe What Is Observed
The summaries show that the North group has the highest observed renewal proportion in these records, followed by West and South. They also show differences in mean premium and mean claim count across the three groups. Those statements are descriptive. With only 12 records, group sizes are small, and the table provides no design information, uncertainty analysis, or adjustment for differences in age, channel, or other characteristics.
It would therefore be unjustified to conclude that region caused the renewal differences, or that changing region would change a policy’s outcome. The observed groups may differ in other ways, and the data may not represent a wider portfolio. A careful summary identifies the pattern, reports the group sizes and denominators, and leaves causal or predictive conclusions for methods suited to those questions.
Confirm what each row represents, then report the number of rows and columns.
Inspect classes, missing values, identifiers, and ranges against the intended data definitions.
Use counts and proportions for categories, and suitable summaries for numeric or count variables. State the denominator.
Report group sizes and use size-weighted calculations when reconstructing an overall mean from subgroup means.
An exploratory summary is useful precisely because it makes basic properties visible before further analysis. It can identify a mismatch between the intended and observed data structure, expose an unexpected range, and provide a factual description of outcomes and subgroups. It cannot, on its own, establish representativeness, explain mechanisms, or support a causal claim.
Check Your Understanding
For each question, use the stated data and report counts, denominators, or rounding as requested.
- A policy table has 18 rows and 6 columns. What do these dimensions mean if each row represents one policy? (Answer: 18 policy records and 6 variables.)
- An outcome has three levels with counts 7, 5, and 6, with no missing values. Give the proportion for each level to four decimal places. (Answer: 0.3889, 0.2778, and 0.3333, respectively.)
- Two regions have mean premiums of $40 for 5 policies and $60 for 15 policies. Calculate the overall mean premium, weighting by the number of policies. (Answer: \((5(40)+15(60))/20=\$55.00\).)
- A group has 9 renewals among 12 policies, and another has 16 renewals among 32 policies. Give each renewal proportion and the combined proportion. (Answer: 0.7500, 0.5000, and \(25/44=0.5682\), respectively.)
- A hypothetical data set records policy age in years, with an observed range of 0 to 18, while the documented definition says the field should contain ages from 18 to 80. What is the appropriate descriptive conclusion? (Answer: The observed minimum is inconsistent with the stated range and should be investigated; the summary alone does not establish the correct value or its cause.)