Pairwise beta diversity between samples by Bray–Curtis, Jaccard or Sørensen dissimilarity, version 1.0.2
eco-beta-diversity@1.0.2: this version's equations with their symbols, each constant's value, their sources and whether each was read, a worked example where the record holds one, its level and what it was checked against, the number of cases, and what was not checked. This version's record is not rewritten; a correction is added under Changes.
What this page can and cannot show
Level: Checked against a reference; Jaccard 1901 read; Bray–Curtis and Sørensen as Somerfield 2008 states them; no double standardisation. Reference kind: an outside program, SciPy (scipy.spatial.distance), 1.18.1; our own exact-arithmetic script and a hand-worked case.
Checked by this project, not independently reviewed. Every method on this page has its equations, constants, sources and cases on record, and its cases agree with the stated reference within the stated tolerance. A reader can follow each method's worked example by hand; that shows the stated method gives the stated answer for one set of inputs, and does not test the code. The other cases and their values are not printed, so a reader cannot re-run these checks. No independent scientist has yet reviewed them.
Every version of this method · Every method · What the levels mean
Version 1.0.2
Level: Checked against a reference; Jaccard 1901 read; Bray–Curtis and Sørensen as Somerfield 2008 states them; no double standardisation. Reference kind: an outside program, SciPy (scipy.spatial.distance), 1.18.1; our own exact-arithmetic script and a hand-worked case. eco-beta-diversity@1.0.2
Built, not hosted. Generated from a snapshot of the library's records taken on 2026-11-25, as committed on 2026-11-25. A later snapshot replaces this one, so these records and this page can change.
The dissimilarity of every pair of samples over one list of taxa: Bray–Curtis on the values as given or on each sample rescaled to proportions, or Jaccard or Sørensen on presence and absence. Pairs are listed in the order the samples are given: the first with each later sample, then the second with each later sample, and so on.
- How results are reported: none: full double precision
- Uncertainty: Arithmetic on the caller's table; no sampling or rarefaction uncertainty is given.
- Every reply through it says: A dissimilarity between samples over the taxa as listed; it is not a sequence distance, and no ordination or test is made.
- Reference, as its record states it: Another party's program: SciPy 1.18.1 run offline, with exact fractions and hand-worked cases
- Level confirmed by this project's ruling of 24 November 2026
What this page can and cannot show
What was checked
66 cases in 2 files, linked by this exact version.
Run through the tool at build against an outside program, SciPy (scipy.spatial.distance), 1.18.1; our own exact-arithmetic script and a hand-worked case: 49 agree within the tolerance the file states, 17 refuse as the case expects, 0 differ, 0 were not run.
File 1, 20 cases
- Where the expected values came from: an outside program, SciPy (scipy.spatial.distance) 1.18.1
- Recorded on: 2026-11-11
- Reference: SciPy (scipy.spatial.distance), 1.18.1; licence BSD-3-Clause
- Tolerance as the file states it: dissimilarities absolute 1e-14; statuses, codes, names, units and withheld rules exact
File 2, 46 cases
- Where the expected values came from: our own exact-arithmetic script and a hand-worked case
- Recorded on: 2026-11-14
- Reference: second implementation (Python 3.13), 2026-11-14; licence BSD-3-Clause
- Tolerance as the file states it: dissimilarities exact to the double nearest the exact rational (absolute 1e-15); names, withheld rules, statuses and codes exact
Apart from the worked example, the cases and their values are not printed here. This shows agreement with this project's recorded cases. It does not show that a method suits your work, and it is not a qualification.
What was not checked
Bray and Curtis 1957 and Sørensen 1948 were not read; their equations rest on Somerfield 2008, which also says Bray and Curtis attributed the coefficient to Gleason 1920 and that it is Steinhaus's or Odum's. Bray and Curtis computed it after a double standardisation (species as a percentage of their maximum, then of the sample total; Yoshioka 2008, MEPS 368:309–310), which the tool does not offer: on values as given or per-sample proportions it is the coefficient Yoshioka calls Czekanowski's and Somerfield calls Bray–Curtis. Jaccard 1901 was read, and states the similarity, of which the dissimilarity is the complement (Drybench ruling, 11 November 2026). Rarefaction, quantitative Jaccard, phylogenetic metrics (UniFrac), ordination and any test are outside the method. Whether the taxa are listed in the same order in every sample is the caller's.
Definition or model
A closed form: the result follows from the inputs by the equations alone.
Equations
Equation 1
d = Σᵢ|uᵢ − vᵢ| / Σᵢ(uᵢ + vᵢ), on the values used (as given, or uᵢ/Σu and vᵢ/Σv)
| Symbol | Meaning and unit |
|---|---|
| d | Bray–Curtis dissimilarity of the pair |
| uᵢ, vᵢ | abundance of taxon i in each sample; a value given in % is divided by 100 first, so samples in % and in unit 1 are put on one scale |
Source: Somerfield PJ. Identification of the Bray-Curtis similarity index: Comment on Yoshioka (2008). Marine Ecology Progress Series 2008; 372: 303–306, equation 1 and 2, p. 303–304, section after Bray and Curtis 1957, as stated in Somerfield 2008: S_jk = 100·Σᵢ 2 min(y_ij, y_ik)/Σᵢ(y_ij + y_ik) (Eq. 1) = 100·{1 − Σᵢ|y_ij − y_ik|/Σᵢ(y_ij + y_ik)} (Eq. 2), and dissimilarity = 1 − similarity on the unit scale (p. 305); the rescaling to proportions is the record's option, a pretreatment Somerfield keeps apart from the coefficient (p. 304), version of record (Inter-Research, open access), the publisher's PDF; read in full on 2026-11-24 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning de1903bc1b96. Free to read (To be checked (open access, free to read; 'Resale or republication not permitted without written consent of the publisher')), checked 2026-11-24. No erratum found (searched crossref), 2026-11-24.
Equation 2
d = (c10 + c01) / (c11 + c10 + c01), counting taxa present (value above 0) in both, in the first only and in the second only
| Symbol | Meaning and unit |
|---|---|
| d | Jaccard dissimilarity on presence/absence |
| c11, c10, c01 | numbers of taxa present in both, the first only, the second only |
Source: Jaccard P. Distribution de la flore alpine dans le bassin des Dranses et dans quelques régions voisines. Bulletin de la Société Vaudoise des Sciences Naturelles 1901; 37: 241–272, p. 249, footnote 1 (PDF page 271), section the coefficient of community: common species over the different species of the two lists, 295 of 525 for Trient and Wildhorn; Jaccard states the similarity, and the dissimilarity is one less it, which is this record's step, the printed volume as scanned (Smithsonian Libraries copy, digitised for the Biodiversity Heritage Library), a mirror: the Internet Archive's PDF of item bulletindelasoc371901soci; read in full on 2026-11-14 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning 034f92668d7b. Free to read (not in copyright (Biodiversity Heritage Library item statement)), checked 2026-11-14. No erratum found (searched the Internet Archive item's metadata, the volume's table of contents), 2026-11-14.
Equation 3
d = (c10 + c01) / (2·c11 + c10 + c01)
| Symbol | Meaning and unit |
|---|---|
| d | Sørensen dissimilarity on presence/absence |
| c11, c10, c01 | numbers of taxa present in both, the first only, the second only |
Source: Somerfield PJ. Identification of the Bray-Curtis similarity index: Comment on Yoshioka (2008). Marine Ecology Progress Series 2008; 372: 303–306, p. 304, section after Sørensen 1948, as stated in Somerfield 2008: 'For presence/absence data, Eqs. (1) or (2) become the Sørensen or Dice coefficient'; Eq. (2) on 0/1 indicators gives Σ|u − v| = c10 + c01 and Σ(u + v) = 2·c11 + c10 + c01, the record's derivation, version of record (Inter-Research, open access), the publisher's PDF; read in full on 2026-11-24 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning de1903bc1b96. Free to read (To be checked (open access, free to read; 'Resale or republication not permitted without written consent of the publisher')), checked 2026-11-24. No erratum found (searched crossref), 2026-11-24.
Conventions
What each mode computes:
metric = bray-curtis: Bray–Curtis dissimilarity, the sum of absolute differences over the sum of both samples, on the values as given or as proportions, in unit 1metric = jaccard: Jaccard dissimilarity, the share of taxa present in either sample that are present in only one, in unit 1metric = sorensen: Sørensen dissimilarity, taxa present in only one sample over the summed numbers of taxa present in each, in unit 1
Constants
Constants: none used.
Worked example
Worked example: one case of eco-beta-diversity@1.0.2, from its inputs through each step to the answer. Values are written as a person writes them; the working carries more digits, so your own figure may differ in the last digit shown.
Inputs
- metric = bray-curtis
- samples[0].name = u
- samples[0].abundances[0] = 1
- samples[0].abundances[1] = 1
- samples[0].abundances[2] = 0
- samples[1].name = v
- samples[1].abundances[0] = 0
- samples[1].abundances[1] = 1
- samples[1].abundances[2] = 0
- abundanceBasis = as-given
Steps
- d = 0.33333333, from samples[0].abundances, samples[1].abundances; by equation 1; gives dissimilarities[0].dissimilarity.
The working, as the case writes it:
sum|u - v| = 1 + 0 + 0 = 1
sum(u + v) = 1 + 2 + 0 = 3
d = 1/3 = 0.33333333 (SciPy's documentation prints 0.3333...).
Answer
dissimilarities[0].dissimilarity= 0.33333333
Where these values came from: an outside program, SciPy (scipy.spatial.distance) 1.18.1; scipy.spatial.distance (braycurtis) 1.18.1, run offline; exact fractions asserted to agree.
At build the tool returned this answer within the tolerance the file states: dissimilarities absolute 1e-14; statuses, codes, names, units and withheld rules exact.
Who worked this case: not recorded.
What it refuses, and its input ranges
TAXA_COUNTS_DIFFER(invalid input): the samples list different numbers of taxa
Changes
No correction is logged for eco-beta-diversity@1.0.2.
Tools that use it
Cite this version
Pairwise beta diversity between samples by Bray–Curtis, Jaccard or Sørensen dissimilarity. Drybench; eco-beta-diversity@1.0.2; https://www.drybench.com/methods/m/eco-beta-diversity/1.0.2 (accessed [date]).