AI Glossary / Statistics and probability / Beginner

Marginal totals

Definition

Marginal totals are the sums for the categories of one variable after adding across the categories of another variable in a table. In a two-way contingency table, they are usually the row totals and column totals written around the table's edges. They summarize each variable separately while discarding the detail about how its categories combine with the other variable. The grand total is the sum of all cells, counted once.

What it means

A table might classify customer requests by channel and by whether they were resolved immediately. The row totals tell you the number of requests in each channel; the column totals tell you the number in each resolution category. Neither set alone shows which channels achieved particular outcomes.

Marginal totals can be counts, weighted counts, or sums of another additive quantity, provided their meaning is clearly stated. Dividing count margins by the grand total gives empirical marginal proportions. Dividing a cell by its row or column total instead gives a conditional proportion with a different denominator.

How it works

For a table with cells n_ij, obtain row total n_i+ by summing across columns and column total n_+j by summing across rows. Summing either complete set of margins gives the same grand total N. Adding both sets together would count every cell twice.

Check that categories are mutually exclusive and exhaustive for the tabulated units. Missing categories, overlapping labels, duplicate records, and inconsistent filtering can prevent the totals from answering the intended question. In a weighted table, verify that the weights represent the target population or specified analysis.

Margins also enter statistical calculations. Under an ordinary independence model, an expected cell count is its row total multiplied by its column total and divided by N. Whether margins are fixed by design, observed as random outcomes, or conditioned on during analysis is a separate question from how they are calculated.

Three practical examples

  • A customer-service dashboard reports request counts by channel and overall counts by resolution status.
  • An AI classifier's confusion matrix uses row and column totals to distinguish actual-class frequencies from predicted-class frequencies.
  • A survey table summarizes respondents by region and employment status, while retaining joint counts for more detailed comparisons.

Think of it this way

Think of a seating chart organized by table number and meal choice. Counting along each row gives the number of guests at each table; counting down each column gives the number requesting each meal. Both sets refer to the same guests. Combining them as though they were separate attendance counts would double the total.

Worked example

Consider an original request table. Email has 36 immediately resolved and 24 unresolved requests. Chat has 54 immediately resolved and six unresolved requests. The row margins are therefore 60 for email and 60 for chat. Column margins are 90 resolved and 30 unresolved, and the grand total is 120.

The marginal resolved proportion is 90/120 = 75%. The conditional resolved proportions are 36/60 = 60% for email and 54/60 = 90% for chat. The margins describe overall volume and outcome composition, while the cells reveal the channel association.

Under an independence model, the expected counts for each row are 60 × 90/120 = 45 resolved and 60 × 30/120 = 15 unresolved. A second table with 45 resolved and 15 unresolved in both channels has exactly the same row and column margins as the first table.

Yet the second table has identical 75% resolution rates across channels, whereas the first has different rates. This verifies that margins do not determine association. No causal claim about channel effectiveness follows from either table without considering how requests reached each channel and what other factors differed.

Illustrative case study

Fictional case: HelpCedar publishes a dashboard showing that 75% of requests were resolved immediately. A reviewer asks for the channel breakdown and notices that one channel handles more difficult cases.

The team keeps the overall marginal total for capacity reporting but adds the joint table and clearly labeled within-channel percentages. It also documents whether unresolved cases include missing outcomes. The case illustrates how margins can provide a correct summary while still being insufficient for performance comparisons or an explanation of why outcomes differ.

Common misconceptions and mistakes

Marginal totals are not the same as cell counts, marginal means, or percentages. A percentage cannot generally be added across groups unless its denominator and weighting make that operation meaningful.

The two sets of margins should each sum to the grand total; their combined sum is normally twice that total. Identical margins do not imply identical joint tables or independence. A margin observed in a dataset is not automatically fixed by the sampling design. Also, a table of multiple-response survey answers can count one person in several categories, so its totals may describe responses rather than distinct people.

Business use

Businesses use margins to reconcile reports, understand category volumes, calculate denominators, and identify changes in the composition of activity. In machine-learning evaluation, margins help reveal class imbalance and whether a model predicts some categories much more often than they occur.

Retain the underlying cells when decisions depend on relationships between variables. Label the unit counted, filters, missing-value rules, and any weighting. Reconciliation is especially useful when combining reports from different systems: a difference in grand totals may reflect different populations rather than an arithmetic mistake.

People also ask

Are row totals always the marginal distribution?

They are marginal counts. Divide by the grand total to obtain marginal proportions for the row variable.

Can I reconstruct every cell from the margins?

Usually not. Many different joint tables can share the same margins.

What does a fixed margin mean?

It may be set by the study design, or treated as fixed through conditioning in a particular analysis. That status should be stated explicitly.

Check your understanding

A two-way table has row totals 40 and 60 and column totals 30 and 70. Is its sample size 200?

Answer: No. Each set of margins sums to 100, the grand total. Adding both sets counts the same observations twice, assuming each observation occupies exactly one cell.

Related terms

  • Contingency table
  • Marginal distribution
  • Expected frequencies
  • Independence
  • Confusion matrix
  • grand total
  • conditional proportion
  • expected frequency
  • fixed margins

Learn next

Learn how row, column, and grand-total percentages answer different questions. Then examine independence models and how the sampling design affects the choice of a contingency-table test.

  • Sampling design
  • Contingency table
  • Independence

More in Statistics and probability

  • Marchenko - Pastur distribution - The Marchenko - Pastur distribution describes the limiting distribution of eigenvalues of certain large sample covariance matrices when the number of...
  • Marginal probability - A marginal probability is the probability of an event or variable value without restricting other variables in a joint probability model to particular values.
  • Marginal structural model - A marginal structural model is a model for features of the distribution of potential outcomes under specified interventions or treatment histories.
  • Markov logic network - A Markov logic network, or MLN, combines first-order logical formulas with numerical weights to define a probabilistic model over relationships and attributes.
  • Masking - Masking, in comparative-study design, means keeping specified people unaware of which intervention, condition, or treatment a participant receives.
  • Master sample - A master sample is a sample selected for use on multiple future survey occasions, rather than drawing a completely new sample independently for every inquiry.

Sources

Howell, Statistical Methods for Psychology glossary, marginal totals and related entries: https://www.uvm.edu/~statdhtx/methods8/Glossary/Glossary.html

NIST/SEMATECH, contingency-table analysis: https://www.itl.nist.gov/div898/handbook/prc/section4/prc45.htm

The request tables are original arithmetic illustrations and were checked for matching margins. HelpCedar is fictional.

Previous: Marginal structural model Next: Marginalization

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer