Choose your reading route
eduKateSG · Why Mathematics? · Bangdiwala’s B, Agreement Areas and Marginal Rectangles
Start with the question, audit the worked example, or jump to the assumptions and practice. Every chapter stays open for uninterrupted reading.
Understand the question
Define the quantity and follow the mechanism.Route 2 · Chapters 2–8
Reproduce the example
Audit the numbers one step at a time.Route 3 · Chapters 9–18
Check assumptions
See where design and calibration matter.Route 4 · Chapters 19–20
Explore applications
Connect the method to a concrete investigation.Route 5 · Chapters 21–25
Study and verify
Practise, inspect failure cases and read further.
Full chapter index · Practice and checking · Mathematics Learning Hub
Agreement can be studied through geometry as well as through a probability adjustment. Bangdiwala’s B compares the total area of squares based on matching counts with the total area of rectangles based on corresponding row and column totals. The geometry makes both the diagonal matches and the category margins part of the summary.
The calculation is different from Cohen’s kappa. In particular, B is not generally zero for an independent classification table, and its numerical scale should not inherit kappa’s interpretation. A reader needs the formula, the original table and a clear description of what the areas represent.
This guide develops a thirty-object synthetic example, checks the area ratio in counts and proportions, and explores cases with the same raw agreement but different B values. The examples are statistical enrichment. They do not describe real reviewers or establish whether a school’s classification procedure is valid.
Full chapter index
Chapters 1–1 · Understand the question
Chapters 2–8 · Reproduce the example
Chapters 9–18 · Check assumptions
- Prove the basic bounds
- Independence does not set B to zero
- Extend the independent-table check
- Hold raw agreement and margins fixed
- Explain the diagonal concentration effect
- Separate the statistic from the agreement chart
- Keep category meanings aligned
- Directional disagreement needs the off-diagonal cells
- Check zero and undefined cases directly
- Weighted agreement changes the construction
Chapters 19–20 · Explore applications
Chapters 21–25 · Study and verify
CHAPTER 1 OF 25 · Understand the question
1. Start with two aligned classifications
Suppose two reviewers independently classify the same thirty explanations into categories A, B and C. Each supplies exactly one label per object. The categories have the same definitions for both reviewers and are aligned in the same order on the two axes of the table.
Rows represent reviewer one and columns reviewer two. A diagonal cell counts objects receiving the same category label. An off-diagonal cell counts a particular mismatch. Neither reviewer is automatically the truth standard; the table describes their paired classifications.
Keep the object identifiers and raw labels even after forming the table. They are needed to inspect the actual explanations associated with a mismatch. The summary can show a pattern worth investigating, but it cannot reveal whether a reviewer misunderstood a codebook clause, saw different evidence or made a defensible judgement about a borderline response. Geometry organises the counts; interpretation returns to the task.
The synthetic rows are (10, 2, 0), (1, 7, 2) and (0, 1, 7). Row totals are twelve, ten and eight. Column totals are eleven, ten and nine. Both sets sum to thirty, confirming that every object contributes once to each reviewer’s classification totals.
The diagonal counts are ten, seven and seven. They sum to twenty-four, so raw agreement is 24/30 = 4/5 = 0.80. The six off-diagonal objects account for the remaining one fifth.
Inspecting a particular cell helps protect the meaning of the table. The count two in row A and column B means reviewer one chose A while reviewer two chose B on two objects. It does not mean two objects were wrong relative to an external answer key. This distinction remains important after any agreement statistic is calculated, because a symmetric summary cannot turn one reviewer’s labels into established truth.
| Reviewer 1 / 2 | A | B | C | Total |
|---|---|---|---|---|
| A | 10 | 2 | 0 | 12 |
| B | 1 | 7 | 2 | 10 |
| C | 0 | 1 | 7 | 8 |
| Total | 11 | 10 | 9 | 30 |
For category A, the matching count ten supplies the side length of an agreement square. Its area is ten squared, or one hundred. The corresponding row and column totals, twelve and eleven, supply the sides of a marginal rectangle with area 132.
For category B, the agreement square has area seven squared = 49, while the marginal rectangle has area ten times ten = 100. For C, the square area is also 49 and the rectangle area is eight times nine = 72.
These are mathematical areas constructed from counts, not physical areas and not numbers of additional objects. Squaring changes the scale of the components, so a square-area sum must not be interpreted as a count of matching explanations. The coefficient becomes dimensionless only when the total agreement-square area is divided by the total marginal-rectangle area. Naming those objects carefully makes the geometry auditable rather than decorative.
Let nᵢᵢ be the diagonal count for category i, rᵢ its row total and cᵢ its column total. The unweighted statistic is B = Σnᵢᵢ²/Σrᵢcᵢ, provided the denominator is positive. Every diagonal category contributes a square in the numerator and a rectangle in the denominator.
The formula uses the squared diagonal counts separately, not the square of their total. In general, 10² + 7² + 7² is different from (10 + 7 + 7)². Confusing those operations would radically change the coefficient.
Likewise, the denominator is the sum of corresponding marginal products, not the product of the two grand totals. Each category’s row total must be paired with the column total for the same category. A labelled table prevents a silent mismatch in category order. The arithmetic is simple once the definitions are fixed, but it is easy to compute a plausible-looking ratio from the wrong collection of areas.
The three agreement-square areas are 100, 49 and 49. Their total is 198. The directly observed matching count was twenty-four, so this area numerator is not a substitute for that count.
The squaring operation gives relatively more contribution to a category with a larger diagonal count. Here category A contributes 100/198 of the numerator, while each of the other categories contributes 49/198. This is a consequence of the defined geometry, not a judgement that category A is more educationally important.
If a rare category has special consequences, inspect it separately. Its smaller diagonal square may contribute little to the total area even when its disagreements matter greatly. A summary can be mathematically correct while being insufficient for a particular decision. Keeping the original category counts visible lets a reader assess whether the area weighting is informative for the purpose rather than assuming that a larger geometric contribution corresponds to greater substantive importance.
The three marginal-rectangle areas are 12 × 11 = 132, 10 × 10 = 100 and 8 × 9 = 72. Their sum is 304. The B statistic is therefore 198/304 = 99/152, approximately 0.6513.
The result is an area ratio under this construction. Raw agreement remains 0.80. The fact that B is smaller does not mean that some of the twenty-four matching objects were removed or reclassified; the same counts have been combined through a different mathematical summary.
Keep the ratio in exact form until the final display. A spreadsheet should retain 198 and 304 as separate audit values, allowing another person to reproduce the result directly. If the denominator is zero, the ratio is undefined and the table needs a direct description. A software warning in that case is information about the formula’s domain, not an invitation to replace the denominator with an arbitrary small constant.
| Category | Diagonal square | Marginal rectangle |
|---|---|---|
| A | 10 × 10 = 100 | 12 × 11 = 132 |
| B | 7 × 7 = 49 | 10 × 10 = 100 |
| C | 7 × 7 = 49 | 8 × 9 = 72 |
| Totals | 198 | 304 |
Divide every cell count by N = 30. Let pᵢᵢ be the diagonal proportions and pᵢ+ and p+ᵢ the marginal proportions. Then B = Σpᵢᵢ²/Σpᵢ+p+ᵢ. Both the count numerator and denominator have been divided by N², so their ratio is unchanged.
For the example, the numerator is 198/900 = 11/50 = 0.22. The denominator is 304/900 = 76/225, approximately 0.3378. Dividing these gives 99/152 again. This is an independent organisation of the arithmetic that checks the scaling.
Multiplying all cell counts by a common positive factor also leaves B unchanged because both area totals grow by the square of that factor. This invariance concerns the point estimate. Copying every object several times does not create new independent evidence or justify a narrower interval. A summary’s numerical stability under replication is different from a study’s information content.
CHAPTER 8 OF 25 · Reproduce the example
8. Compare Cohen’s kappa without equating scales
For the worked table, Cohen’s reference agreement is Σrᵢcᵢ/N² = 76/225. Its raw agreement is 4/5 = 180/225. Cohen’s kappa is therefore (180/225 − 76/225)/(1 − 76/225) = 104/149, approximately 0.6980.
The denominator component appearing in B is related to Cohen’s reference, but the numerators are different. B uses the sum of squared diagonal proportions; kappa uses raw agreement minus the reference and then normalises by the remaining distance to one.
The same table thus has raw agreement 0.80, B about 0.6513 and kappa about 0.6980. These are three different summaries, not three estimates of the same probability. A report should explain which quantity supports the intended interpretation. Applying the same verbal bands to both adjusted or normalised measures would conceal a difference that is visible immediately in their formulas.
For every category, the diagonal count nᵢᵢ is no greater than either its row total rᵢ or its column total cᵢ. With nonnegative counts, nᵢᵢ² ≤ rᵢcᵢ. Summing these inequalities shows that the numerator cannot exceed the denominator.
When the denominator is positive, B therefore lies between zero and one. A value of one occurs under perfect agreement for a nonempty table: every occupied marginal rectangle is a square fully accounted for by its diagonal count.
This proof also suggests a useful input check. A computed value above one indicates a problem with the table, category alignment or formula for this unweighted construction. Unlike a negative kappa, a negative B is not an ordinary result of valid nonnegative counts. Mathematical domain checks can catch errors that a polished display may otherwise hide, especially when a program has been given a rectangular table or an incorrectly ordered set of margins.
Consider the binary table with all four cells equal to five. Both row totals and both column totals are ten. The table has exactly the product-form cell frequencies associated with empirical independence, and raw agreement is one half.
Its B statistic is (5² + 5²)/(10 × 10 + 10 × 10) = 50/200 = 1/4. Cohen’s kappa for that table is zero because observed agreement equals its marginal-product reference of one half. The coefficients use different numerical baselines.
This example prevents a common interpretive shortcut. A B value above zero does not by itself mean agreement above the independent-table benchmark in the way a positive kappa does under its own formula. Read B as the specified area ratio and use a method-appropriate interpretation. The existence of a nonzero value in an independent table is an arithmetic fact, not evidence that the two calculations disagree about the observed classifications.
For q balanced categories under an exact product-form table, each diagonal proportion is 1/q² and each marginal proportion is 1/q. The B numerator is q × 1/q⁴ = 1/q³, while the denominator is q × 1/q² = 1/q.
The resulting B value is 1/q². With three categories it is one ninth, while raw agreement is one third. A three-by-three table of ones supplies a small integer example: diagonal-square sum three, marginal-product sum twenty-seven, and B = 3/27.
This derivation is a benchmark exercise, not a claim that real reviewer labels are generated independently or uniformly. It shows why B values from different category systems should not inherit a universal zero-reference interpretation. When comparing studies, inspect category definitions, margins and the selected summary. A number’s endpoints alone do not tell us where a meaningful reference situation lies on its scale.
Consider a second thirty-object table with rows (8, 1, 1), (1, 8, 1) and (1, 1, 8). All row and column totals are ten. The diagonal total is twenty-four, so raw agreement remains 0.80. B is (64 + 64 + 64)/300 = 16/25 = 0.64.
Now use rows (9, 0, 1), (0, 8, 2) and (1, 2, 7). Row and column totals are still ten each, and the diagonal total is still twenty-four. The area numerator becomes 81 + 64 + 49 = 194, giving B = 97/150, approximately 0.6467.
Both tables have the same raw agreement and the same margins, so Cohen’s kappa is 0.70 in both. B differs because the twenty-four diagonal matches are distributed differently among categories and are squared separately. This comparison isolates the square-area mechanism from changes in prevalence or marginal asymmetry.
For three diagonal counts with fixed total twenty-four, the sum of squares is smallest when the counts are equal at eight, eight and eight. Moving one match from one category to another changes them to nine, eight and seven and increases the squared sum by two.
The calculation follows directly: (8 + 1)² + (8 − 1)² − 2 × 8² = 2. With the marginal-product denominator held at 300 in our feasible tables, B rises by 2/300 = 1/150. That matches the difference between 97/150 and 96/150.
The effect is not an improvement in the overall matching rate, which stays at eighty per cent. It is sensitivity to where matching occurs. Whether that distinction is useful depends on the application and category consequences. The example helps a reader see why a summary based on squared components can respond to redistribution even when a linear total remains unchanged.
CHAPTER 14 OF 25 · Check assumptions
14. Separate the statistic from the agreement chart
The agreement chart represents a paired categorical table using marginal rectangles and shaded agreement squares within a larger N-by-N square. Its geometry can display marginal imbalance and the location of matching regions. The B statistic summarises an area relationship within that broader visual construction.
A chart can reveal patterns that the single area ratio loses, but visual interpretation brings additional choices. The order of categories affects the path of rectangles. The method’s authors recommend ordinal categories for interpreting that path, because an arbitrary nominal permutation can alter the visual impression.
The unweighted numerical B calculation remains invariant when the same nominal categories are jointly permuted on both table axes. That invariance should not be confused with invariance of every visual impression. This distinction is useful: a reproducible statistic and an informative graphic can complement one another while preserving different aspects of the data and requiring different care in their interpretation.
Jointly renaming A, B and C does not change the unweighted B statistic if their rows and corresponding columns move together. The diagonal counts and paired marginal products are simply reordered before summation.
Permuting only one axis is different. It changes which labels are treated as matching and can alter the statistic dramatically. A spreadsheet that sorts row labels and column labels independently can therefore create an agreement calculation for mismatched meanings.
Use a category dictionary and verify the axis order before calculating. If the reviewers use different coding systems, establish a justified correspondence rather than forcing a diagonal by position. A mapping between categories is a substantive decision, especially when one system is finer than another. The geometry assumes that each matching cell represents the same meaning on both axes; it cannot establish that correspondence from numerical codes alone.
CHAPTER 16 OF 25 · Check assumptions
16. Directional disagreement needs the off-diagonal cells
The B formula uses diagonal counts and marginal products. Many details of the off-diagonal pattern are compressed into the margins. It does not separately report every direction in which one reviewer differs from the other.
In the worked example, A-to-B disagreements occur twice, while B-to-A occurs once. B-to-C occurs twice, while C-to-B occurs once. Those directions might reflect a boundary in the codebook, but the small counts do not prove a stable reviewer tendency.
When the practical question concerns systematic shifts, inspect the off-diagonal table and choose an analysis suited to that question. Paired marginal equality, exact matching and ordinal direction are related but different concerns. A single area ratio should not be asked to answer all of them. Keeping the raw table visible is a simple way to prevent a concise summary from becoming an overly broad explanation of the classification process.
The binary table with cells 0, 10, 10 and 0 has no diagonal matches and positive corresponding marginal products. B is zero. The reviewers always use opposite labels on these objects, which is a clear observed disagreement pattern.
Now consider cells 0, 20, 0 and 0. One reviewer always uses the first category and the other always uses the second. All corresponding marginal products are zero, so the B denominator is zero and the statistic is undefined. The observed matching rate is still zero.
Finally, if all twenty objects fall in one diagonal cell, the numerator and denominator are both 400 and B is one. These cases show why the raw description should accompany the formula. An undefined ratio does not mean that no classifications were recorded, and a defined value of one does not establish recognition of categories that never appeared in the sample.
CHAPTER 18 OF 25 · Check assumptions
18. Weighted agreement changes the construction
Our calculations count exact category matches. For ordered levels, a weighted agreement analysis may assign partial credit to neighbouring categories. Weighted B variants have their own area and weighting definitions, which should be checked rather than guessed from a weighted-kappa formula.
Choose a weighting rule from the meaning of the task. A disagreement between adjacent levels may have a different practical consequence from one spanning the entire scale. Category codes alone do not establish equal distances, and a coefficient should not be increased by choosing weights solely because they produce a favourable number.
Report the convention and enough detail to reproduce the weighted result. Do not present it as the unweighted B used in this guide. Changing the definition of agreement changes what the summary answers, even when the same objects and reviewer labels are used. The measurement argument should therefore be clear before any comparison of weighted and unweighted numerical values is made.
Two reviewers can agree closely while sharing a mistaken interpretation. A large shaded agreement region would then describe consistency under that interpretation, not the correctness of the labels. An agreement statistic does not supply an independent truth standard.
For educational work, inspect whether the categories capture the intended reasoning and whether the evidence in each explanation supports the assigned label. An appropriate validation design might use independent review, a justified reference task or evidence from new work. Each has its own limitations and should be described openly.
A parent can ask what decision the labels will support and what a disagreement means for the student. An exploratory coding exercise and a consequential placement decision need different levels of evidence. The B statistic can be useful within a broader account, but its geometric clarity should not be mistaken for proof that the codebook, reviewer training or resulting educational decision has been validated.
CHAPTER 20 OF 25 · Explore applications
20. Uncertainty is not measured by area alone
The exact ratio 99/152 describes the supplied thirty-object table. It is not an exact population agreement level. Another sample can change the diagonal squares and marginal rectangles, so both parts of the ratio can vary.
Confidence intervals need a method appropriate to B and the study design. The area numerator is not a binomial count of 198 independent successes, and the denominator is not 304 independent trials. Those values are constructed from the same thirty paired objects.
If a resampling method is used, preserve paired labels and account for clustering among objects. Several explanations from the same student or extracts from the same document may share features. An interval based on treating every constructed area unit as an independent observation would have no justification from this geometry. The mathematical construction clarifies the point estimate; the sampling model supplies the argument for uncertainty.
After preserving the independent labels, reviewers can inspect the six mismatching objects. The aim is to identify the exact evidence or codebook boundary that produced a difference, rather than treating a coefficient as a personal judgement about either reviewer.
A clarification might distinguish a correct final answer from an explicit justification, or specify how mixed reasoning approaches are classified. Record what changed and why. If the same discussed objects are rated again, describe the exercise as calibration; shared discussion and memory can affect the result.
Evaluate a revised procedure on fresh objects when generalisation matters. Retain the original table and use the same category definitions unless the intended task genuinely changes. A higher B value after a revision is evidence to interpret, not a complete explanation. The useful outcome is a clearer, more defensible rating process whose performance on new work can be examined with both counts and examples.
For the main table, reproduce the square areas 100, 49 and 49 and the rectangle areas 132, 100 and 72. Their sums are 198 and 304, giving B = 99/152. State why twenty-four, rather than 198, is the number of matching objects.
For the balanced binary table with all cells equal to five, verify B = 1/4 and kappa zero. Explain the different reference situations rather than assuming a positive B must mean the same thing as a positive kappa.
For the two balanced-margin three-category tables, reproduce B values 16/25 and 97/150 while raw agreement stays 0.80. The difference is 1/150. Identify the changed diagonal counts and show how their squared sum increases by two. This exercise isolates the geometric weighting and checks whether the coefficient can be explained without relying on an unexplained software output.
A parent reading an agreement report can ask for the raw table and the specific definition of the coefficient. If B and kappa differ, ask how their formulas use the diagonal and margins. A difference in numbers does not necessarily imply an error or a disagreement about what labels were recorded.
A student can connect the example to square areas, rectangle areas, ratios and sums of squares. The central algebraic distinction is between squaring a sum and summing squares. The fixed-margin examples make that distinction visible in a real statistical construction.
Use synthetic counts while learning, then ask what additional evidence a real decision would need. Geometry can make a statistic easier to understand, but it should also make its limits easier to state. A well-understood ratio is most useful when the reader can say both what information it preserves and which questions still require the original objects, a different summary or a separate study.
Is B the raw percentage agreement? No. Raw agreement adds diagonal counts; B adds their squares and divides by corresponding marginal products. Is B always zero for independent labels? No. The balanced binary independent table in this guide has B one quarter and kappa zero.
Can unweighted B be negative? Not for valid nonnegative counts with a positive denominator. Can it be undefined? Yes when the marginal-product denominator is zero. The original table should then be described directly.
Does renaming categories change B? Jointly renaming and reordering both axes does not change the unweighted statistic. A chart’s visual path can still depend on category order. Does a value of one establish correct classification? It establishes perfect agreement in the supplied table under this construction. Accuracy and recognition of unrepresented categories require additional evidence.
Bangdiwala and Shankar’s primary paper The Agreement Chart explains the chart and the role of ordinal ordering in visual interpretation. Their comparison of agreement measures examines marginal-distribution scenarios. The irrCAC B documentation and implementation provide an inspectable square-table calculation.
The tables, bounds, independent-table derivation and fixed-margin comparisons in this guide are synthetic worked analysis. They are intended to explain the formula rather than reproduce the papers’ empirical examples or claim that a real educational panel achieved these values.
Continue through the Mathematics Learning Hub and construct a table with fixed margins in which diagonal matches move between categories. Predict whether the sum of squares will rise, then check that the table remains feasible. Explaining the redistribution is the learning step that turns a geometric summary into understandable mathematics.
