Three learners review open books together at a classroom table, with stacks of textbooks, stationery and a whiteboard in the bright room.

How Compositional Data Analysis Works | Parts of a Whole, Ratios, the Simplex, Log-Ratios and Honest Comparison

Wait, what? If one slice of a pie gets bigger, at least one other slice must get smaller — even if nothing about the underlying world caused those two slices to interact.

That simple constraint is why percentages, proportions and shares can mislead ordinary statistical methods. When the parts of a dataset are tied together by a fixed total, the data do not live in ordinary unconstrained space. They live in a different mathematical object called a simplex.

The one-sentence answer

Compositional data analysis studies data whose components carry primarily relative information — often parts of a fixed whole — by analysing ratios and log-ratios rather than treating the parts as if they could vary independently.

Quick Read

1. What makes compositional data different?

Imagine a student spends a 10-hour study day on Mathematics, English, Science and breaks. If Mathematics takes one more hour while the total day stays fixed, some other activity must lose time. The variables are therefore not free to move independently.

The same pattern appears in a national budget, a mineral sample, a company’s market share, a land-cover map, the nutrient fractions in a mixture, or the percentage of electricity generated from different sources.

In each case, the composition is constrained. That constraint changes what distances, averages, correlations and regressions mean.

2. The closure problem

When raw positive values are divided by their total so that they sum to a constant, the operation is often called closure. Closure is useful because it creates proportions, but it also forces dependence among components.

Suppose three sectors share 100% of a market. If Sector A’s share rises from 30% to 40%, the combined share of B and C must fall from 70% to 60%. A negative correlation between A and the others may therefore appear even if the underlying absolute quantities did not have a simple negative relationship.

This is the historic “spurious correlation” problem that helped motivate modern compositional data analysis.

3. The simplex: a different sample space

Ordinary multivariate data are often imagined as points in Euclidean space: each variable can move along its own axis. A composition with positive parts constrained to a constant does not occupy that full space. It occupies a simplex.

For three components summing to 1, the simplex can be pictured as a triangle. Every possible composition lies somewhere inside it. The corners correspond to compositions dominated by one component; the centre represents balance among the parts.

John Aitchison’s foundational work made the simplex central to the statistical analysis of compositions. The key shift was conceptual: stop pretending the raw parts are independent coordinates and work with relative information instead.

4. Why ratios carry the information

If a mixture contains 20 units of A and 10 units of B, the ratio A:B is 2:1. If the same mixture is measured on a larger scale as 200 units of A and 100 of B, the ratio is still 2:1.

That invariance to total scale is often exactly what matters. In many compositions, the scientific or practical question is not “How many units are there?” but “How large is this component relative to that component?”

Ratios also explain why absolute differences between percentages can be deceptive. Moving from 1% to 2% doubles a component. Moving from 50% to 51% barely changes it in relative terms, even though both changes are one percentage point.

5. Why log-ratios are so useful

Ratios are positive and asymmetric: a ratio of 2 and its reverse 1/2 are not equally spaced around 1 on an ordinary scale. Taking logarithms fixes this. log(2) and log(1/2) have the same magnitude with opposite signs.

A log-ratio therefore turns multiplicative relative change into additive difference. This makes many familiar statistical methods available again, provided the transformation and interpretation are handled correctly.

6. ALR, CLR and ILR

Additive log-ratio: ALR

The additive log-ratio chooses one component as a denominator and takes the log of every other component relative to it. It is simple and interpretable when the reference component has a meaningful role, but results depend on the chosen denominator.

Centered log-ratio: CLR

The centered log-ratio compares each component with the geometric mean of all components. This treats the parts symmetrically and is useful for exploration, but the resulting coordinates sum to zero, so they remain linearly dependent.

Isometric log-ratio: ILR

The isometric log-ratio represents a D-part composition with D−1 orthonormal coordinates. ILR coordinates preserve the geometry of the simplex and are often convenient for regression, classification and other multivariate analyses.

The choice among ALR, CLR and ILR is not merely technical. It affects interpretability, geometry and how results should be communicated.

7. Balances: comparing groups of parts

Sometimes the meaningful comparison is not one component versus another, but one group of components versus another. A balance can represent the relative dominance of two groups using a log-ratio constructed from their geometric means.

For example, a time-use composition could compare “focused academic activity” against “non-academic activity”, while still respecting that the total day is fixed. In a land-use study, one balance might compare built-up categories with vegetated categories.

Balances can therefore turn a high-dimensional composition into interpretable contrasts without returning to the raw-percentage trap.

8. Distance in compositional space

Two compositions can look close in ordinary percentage-point distance yet differ greatly in relative structure. Aitchison geometry defines distance using log-ratios, so compositions are compared by proportional relationships rather than raw component gaps.

This matters for clustering, anomaly detection and nearest-neighbour reasoning. If the underlying object is a composition, an ordinary Euclidean distance on raw percentages may rank similarity in a way that conflicts with the actual relative information.

9. What happens to correlation?

Raw-component correlation is especially dangerous in compositional data because closure mechanically couples the parts. A large positive or negative correlation may partly be an artefact of the constant sum.

Modern compositional work often studies covariance and association in log-ratio coordinates instead. The question changes from “Do these two percentages move together?” to “How does their relative abundance behave?”

This directly crosswalks to How Correlation, Covariance and Association Work: correlation is never meaningful without understanding how the variables were generated.

10. Zeros: the hard edge of log-ratio analysis

Because log(0) is undefined, zero components require explicit treatment. But not all zeros mean the same thing.

Replacing every zero with the same tiny constant can distort ratios, especially when zeros are frequent. Good compositional analysis first asks what kind of zero is present and whether the mechanism is measurement, sampling, structural impossibility or missingness.

11. Compositional regression

A composition may be the predictor, the outcome, or both. In each case, the constrained geometry must be respected.

If compositional predictors are entered as raw percentages into an ordinary regression, the constant-sum constraint creates exact or near collinearity. Log-ratio coordinates provide a more coherent representation. If the response itself is compositional, specialised models may be needed so predictions remain valid compositions.

This links naturally to How Regression Models Work and How Generalized Linear Models Work. The model family matters, but so does the geometry of the data before the model is fitted.

12. PCA and dimensionality reduction

Principal component analysis on raw compositions can inherit closure artefacts. PCA performed on appropriate log-ratio coordinates instead seeks major directions of relative variation.

The resulting components are no longer interpreted as simple weighted sums of raw percentages. They are contrasts among relative patterns. That is often more faithful to the phenomenon but demands more careful explanation.

For the wider multivariate context, see How Principal Component Analysis and Factor Analysis Work.

13. A worked example: a 24-hour day

Suppose a person’s day is divided into sleep, work, study, exercise and other activity. The total is always 24 hours. An extra hour of study cannot simply be “added” without taking time from somewhere else.

If we ask whether study time is associated with an outcome, the answer depends on what study time replaces. One more hour of study replacing idle time is not the same compositional change as one more hour of study replacing sleep.

That is a powerful lesson. In a composition, an increase has no complete meaning until its relative counterpart is specified.

14. Subcompositions and the danger of changing the denominator

Researchers often analyse only a subset of components. Removing some parts and renormalising the remainder creates a subcomposition. A robust method should not produce wildly inconsistent conclusions merely because irrelevant components were omitted.

Log-ratio methods were developed in part to preserve coherent relative statements under such operations. But interpretation still depends on what was included, excluded and reclosed.

15. Where compositional analysis is useful

The statistical method is shared; the scientific meaning remains owned by the relevant field. A compositional model should not collapse Biology, Medicine, Veterinary, economics or any other domain into one undifferentiated statistical category.

16. Common failure modes

17. A practical workflow

  1. Ask whether the data are genuinely compositional or merely happen to be percentages.
  2. Identify the total or closure mechanism.
  3. Decide whether absolute scale also carries information.
  4. Inspect zeros and missing values before taking logarithms.
  5. Choose meaningful ratios or log-ratio coordinates.
  6. Visualise the composition in a way consistent with its geometry.
  7. Fit regression, clustering, PCA or other models in an appropriate coordinate system.
  8. Translate results back into ratios, balances and domain meaning.
  9. Test sensitivity to coordinate choice, zero handling and subcomposition.
  10. Report the denominator, transformation and interpretation clearly.

18. How this connects to the wider eduKate Library

19. Model limits

Compositional analysis is not a ritual transformation to apply whenever percentages appear. A rate such as “cases per 100,000 people” is not automatically a composition. Nor is a percentage necessarily constrained by other observed variables in the dataset. The defining issue is whether the components together represent relative parts of a meaningful whole.

Likewise, log-ratios do not remove confounding, sampling bias, measurement error or causal ambiguity. They repair one structural problem — the geometry of relative data — while the rest of statistical reasoning still applies.

20. Frequently asked questions

Are all percentages compositional data?

No. A composition consists of parts whose relative magnitudes jointly describe a whole. A standalone percentage may not be part of such a system.

Why not just leave out one percentage from a regression?

Dropping one component removes exact collinearity, but it does not automatically solve the deeper interpretive and geometric problems created by closure.

Why use logarithms?

Logarithms turn multiplicative ratios into additive differences and make reciprocal changes symmetric around zero.

What if the total amount matters too?

Then analyse both the composition and an appropriate measure of total scale. Relative structure and absolute quantity answer different questions.

21. Authoritative sources and further reading

The deeper idea

Compositional data analysis teaches a deceptively simple rule: a part cannot be understood without knowing what it is a part of.

Once the total constrains the parts, every increase is relative to something else. Ratios, not isolated percentages, become the natural language of change. That shift protects us from treating mathematical necessity as if it were a real-world relationship.

Explore the connected learning guides

Choose the question that brought you here. Open one useful guide, try a small task, and stop when you have what you need.

Take one question further

The same learning habit can travel across subjects, while each subject keeps its own methods. These routes help you notice a difficulty, understand one part of it, and return to something you can do.

A word is familiar, but using it is difficult.

Move from recognising a word to retrieving it in a new context. Understand vocabulary plateaus.

Try it without the guide: Choose one word you already know. Close the guide and use it in a new sentence. Explain why it fits; try another context tomorrow.

A piece of writing has ideas, but the reader loses the thread.

Make the order of events and the links between sentences clear. Explore composition writing.

Try it without the guide: Choose one short paragraph. Read the relevant explanation, close it, and revise the paragraph. Ask someone to tell you what happened and why.

The Mathematics seems familiar, but marks still disappear.

Find the first point where the working stops being reliable. Find Secondary 4 A-Math mark leakage.

Try it without the guide: For a Secondary 4 A-Math question you have attempted, locate the first uncertain line. Repair that step, then try a comparable question without the worked answer.

A Science fact is remembered, but the explanation is incomplete.

Connect the evidence to a scientific idea and the resulting change. Follow the Primary Science learning route.

Try it without the guide: Choose a familiar Primary Science example. Explain the evidence, the idea and the result without notes. Then change one condition and explain your prediction.

Two accounts of the world seem to disagree.

Check the question, source, date and evidence before combining claims. Explore the World Knowledge research library.

Try it without the guide: Take one claim. Find the source best placed to support it, note its date, and state what remains uncertain. Return to your original question.

There is plenty of help, but independence is hard to see.

Check what the learner can understand and do after support is removed. Understand how education works.

Try it without the guide: Choose one small task the child has practised. Agree on a calm, brief attempt without prompts. Use what happens to choose one next step, then stop.

For the structure behind these connections, read the eduKateSingapore runtime manifest and the eduKate ecosystem boot contract. The reader map describes public navigation; those manifests preserve the wider ownership and return rules.

Discover more from eduKate SG

Subscribe now to keep reading and get access to the full archive.

Continue reading