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
- Compositional data often sum to a constant such as 1, 100%, 24 hours or a fixed budget.
- If one component rises, at least one other must fall because of the total constraint.
- Ordinary correlations among raw percentages can therefore be misleading.
- The central information in a composition is usually relative: one part compared with another.
- Log-ratio transformations such as ALR, CLR and ILR convert relative information into coordinates that ordinary statistical tools can work with more safely.
- Zeros require special care because log-ratios are undefined at zero.
- Compositional thinking is useful in geochemistry, ecology, microbiome research, budgets, market shares, time-use studies, energy mixes, land cover and many other fields.
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.
- A rounded or below-detection zero may mean a small positive quantity existed but the measurement system could not resolve it.
- A count zero may arise because sampling did not observe a rare component.
- A structural zero may mean the component genuinely cannot occur in that composition.
- A missing value is not a zero at all.
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
- Geoscience: mineral and element fractions.
- Ecology: species or land-cover compositions.
- Biology: relative abundance data, while preserving Biology as its own scientific owner.
- Economics and finance: expenditure shares, portfolio weights and sector mixes.
- Energy: generation mixes or fuel shares.
- Transport: modal split.
- Education: time allocation, response-category shares or curriculum proportions.
- Demography: population compositions across age or status groups.
- Operations: proportions of workload assigned to categories.
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
- Running ordinary correlation on raw percentages and treating the result as causal structure.
- Ignoring the denominator. A percentage is always relative to something.
- Using percentage-point changes as if they had equal relative meaning everywhere.
- Replacing zeros mechanically.
- Using CLR coordinates in a method that requires full-rank predictors without accounting for their linear dependence.
- Interpreting ILR coordinates without translating them back into meaningful balances or ratios.
- Forgetting absolute scale when absolute scale actually matters. Sometimes both composition and total quantity are scientifically important.
17. A practical workflow
- Ask whether the data are genuinely compositional or merely happen to be percentages.
- Identify the total or closure mechanism.
- Decide whether absolute scale also carries information.
- Inspect zeros and missing values before taking logarithms.
- Choose meaningful ratios or log-ratio coordinates.
- Visualise the composition in a way consistent with its geometry.
- Fit regression, clustering, PCA or other models in an appropriate coordinate system.
- Translate results back into ratios, balances and domain meaning.
- Test sensitivity to coordinate choice, zero handling and subcomposition.
- Report the denominator, transformation and interpretation clearly.
18. How this connects to the wider eduKate Library
- How Correlation, Covariance and Association Work
- How Principal Component Analysis and Factor Analysis Work
- How Regression Models Work
- How Robust Statistics and Outlier-Resistant Estimation Work
- How Spatial Statistics Work
- How Missing Data Analysis Works
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
- John Aitchison, “The Statistical Analysis of Compositional Data”, Journal of the Royal Statistical Society Series B (1982): Oxford Academic record.
- University of Girona Research Group in Compositional Data Analysis, current CoDa training and course materials: CoDaWeb courses.
- CoDaPack, open software implementing log-ratio representations and compositional methods: CoDaPack.
- CoDa-course Online, accredited training in compositional data analysis: CoDa-course Online.
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.
