Skip to content

Frequency of responding cells from a limiting dilution assay

cell_limiting_dilution_frequency

Estimates the active-cell frequency with its interval from limiting dilution, by the single-hit model.

Runs
On the server
Level
Checked against a reference: the frequencies Hu & Smyth print; statsmodels 0.15.0 GLM (binomial, complementary log-log link, offset log dose, intercept only) run offline, on the estimate of the active fraction only; and a second implementation in Python by a separate agent of the same model family. The interval and the one-sided bounds have no outside comparison
Ask your assistant

What it is

Returns the active-cell frequency (1 in x cells) with its interval from limiting dilution, by the single-hit model. Use when cultures at cell doses were scored positive or negative (stem-cell, precursor or tumour-initiation assays), by Hu & Smyth 2009. Not for cells to seed per well: use `calc_cell_seeding`. Dose statement and level required; one-sided bounds when no culture or every culture is positive; doses outside 1e-6 to 1e12 cells refused.

Field: Cell culture, microbiology, virology.

What it does

You give

  • cellDose (required): Whether the cells per culture are a Poisson mean (dispensed by dilution) or counted exactly.
  • confidenceLevel (required): The confidence level of the interval, from 0.5 to 0.999; never defaulted. Must be at least 0.5 and at most 0.999.
  • cultures (required): The doses, one entry each.

No request is recorded for this tool.

Limits

  • Research arithmetic on counts and records the caller read; not for diagnosis, treatment decisions or product release, and no susceptibility, sterility or safety interpretation.
  • Active-cell frequency under the single-hit Poisson model, assumed and not tested; one group at a time; not a monoclonality assurance.
  • Every computed number a reply returns, other than an integer or an exact decimal, is rounded once to 12 significant figures: to the nearest, a change of at most 5 × 10⁻¹² of its value, except that a lower bound is rounded down and an upper bound up, a change of less than 1 × 10⁻¹¹; the method computes, and decides any pass or fail, on the unrounded value.

It will not answer when

  • a dose is outside the range over which the fit's bracket is proven to hold its root.
  • a dose has more positive cultures than cultures tested.
Every input, with its units3 inputs
  • cellDose (required): Whether the cells per culture are a Poisson mean (dispensed by dilution) or counted exactly.
  • confidenceLevel (required): The confidence level of the interval, from 0.5 to 0.999; never defaulted. Must be at least 0.5 and at most 0.999.
  • cultures (required): The doses, one entry each.
Every refusal, with its code2 refusals
CodeWhen
DOSE_OUTSIDE_RANGEa dose is outside the range over which the fit's bracket is proven to hold its root.
POSITIVE_ABOVE_TESTEDa dose has more positive cultures than cultures tested.

The calculation

The method's equations, constants and worked example.

Active-cell frequency from a limiting dilution assay by the single-hit model, with its intervallimiting-dilution-frequency@1.1.1

Equation 1

Σ [r·θ/(e^θ − 1) − (n − r)·θ] = 0 with θ = e^α·d, solved for α

λ = e^α (Poisson dose) or λ = 1 − exp(−e^α) (cells counted). The score of the binomial likelihood under Hu & Smyth's model 1 − p = exp(−λ·d) (their eq. 1

§4.2 for counted cells): this record's derivation, re-derived by a second agent of the same model family, not an equation the paper prints

SymbolMeaning
αthe GLM intercept: log λ, or log(−log(1 − λ)) when cells are counted
θe^α times the dose
dcells per culture
ncultures tested at the dose
rcultures positive at the dose
λactive-cell fraction

Source not recorded.

Equation 2

α ± z·se(α), se = (Σ n·θ²/(e^θ − 1))^(−1/2), z = Φ⁻¹(1 − (1 − level)/2)

each end mapped to λ as α is, and never clipped. The Wald interval on the intercept is Hu & Smyth's (§4.1)

se from the expected information is this record's derivation, re-derived by a second agent of the same model family, not an equation the paper prints

SymbolMeaning
αthe GLM intercept
sestandard error of α from the expected information
znormal quantile for the two-sided level
levelconfidence level stated by the caller

Source not recorded.

Equation 3

No culture positive: Π (1 − p)^n = 1 − level over the doses, with p = 1 − exp(−λ·d) (Poisson) or p = 1 − (1 − λ)^d (counted) the probability that a culture at dose d is positive (§4.5's pᵢ written in this record's symbols)

that is exp(−λ·Σ n·d) = 1 − level (Poisson) or (1 − λ)^(Σ n·d) = 1 − level (counted), solved for the upper bound λ0

SymbolMeaning
λthe one-sided upper bound on the active-cell fraction
ncultures tested at a dose
dcells per culture
pthe probability that a culture at dose d is positive (§4.5's pᵢ at the i-th dose): 1 − exp(−λ·d) for a Poisson dose, 1 − (1 − λ)^d for counted cells, both equal to 1 − exp(−e^α·d)
levelconfidence level stated by the caller

Source 1.

Equation 4

Every culture positive: Π p^n = 1 − level over the doses, with p = 1 − exp(−e^α·d) the probability that a culture at dose d is positive (§4.5's pᵢ written in this record's symbols, in both modes)

that is Π (1 − exp(−e^α·d))^n = 1 − level, solved for α

the lower bound λ0 = e^α (Poisson dose) or 1 − exp(−e^α) (cells counted)

SymbolMeaning
αthe GLM intercept at the bound
λ0the one-sided lower bound on the active-cell fraction
ncultures tested at a dose
dcells per culture
pthe probability that a culture at dose d is positive (§4.5's pᵢ at the i-th dose): 1 − exp(−λ·d) for a Poisson dose, 1 − (1 − λ)^d for counted cells, both equal to 1 − exp(−e^α·d)
levelconfidence level stated by the caller

Source 1.

Equation 5

cells per active cell = 1/λ

SymbolMeaning
1/λcells per active cell
λactive-cell fraction

Source 1.

Equation 6

a call is checked in this order, and the first rule it meets answers: (1) an unknown or misspelt argument, UNKNOWN_ARGUMENT

(2) cellDose: missing, CONVENTION_REQUIRED (invalid input, naming the two choices), a value other than poisson or counted, INVALID_OPTION

(3) confidenceLevel: missing, MISSING_ARGUMENT, then its type and unit, then below 0.5 or above 0.999, OUT_OF_RANGE

(4) cultures: missing, MISSING_ARGUMENT, then fewer than 1 or more than 100 doses and each dose in the order given (an unknown field, a type, a unit

d not above 0, n below 1 or above 10,000, r above 10,000, OUT_OF_RANGE), all invalid input

(5) refused: any dose with d below 1e-6 or above 1e12, DOSE_OUTSIDE_RANGE, before any check of (6) on any dose

the range includes both ends, so d = 1e-6 and d = 1e12 are computed

(6) each dose in the order given: r above n, POSITIVE_ABOVE_TESTED, then, with counted cells, d not a whole number, NOT_AN_INTEGER. A missing cellDose and a missing confidenceLevel have separate codes: CONVENTION_REQUIRED and MISSING_ARGUMENT

SymbolMeaning
dcells per culture at a dose (cultures[*].cells)
ncultures tested at the dose
rcultures positive at the dose

Source not recorded.

Conventions

  • ONE_SIDED_BOUND_LEVEL = one-sided at the stated level when no culture or every culture is positive; otherwise two-sided: Fixed by the method; not an argument. With no positive or no negative cultures, the bound is one-sided at the stated level, as in Hu & Smyth's section on one-sided confidence intervals; otherwise the interval is two-sided.
  • cellDose = poisson: the cells per culture are a mean, dispensed by dilution and Poisson-distributed; the frequency is 1/λ with λ = e^α
  • cellDose = counted: the cells per culture are counted exactly; the frequency is 1/λ with λ = 1 − exp(−e^α)

A definition, not a model: the equation states what the quantity means. A different convention gives a different number.

Worked example

Worked example: one case of limiting-dilution-frequency@1.1.1, 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

  • cellDose = poisson
  • confidenceLevel = 0.95
  • cultures[0].cells = 100
  • cultures[0].tested = 9
  • cultures[0].positive = 0
  • cultures[1].cells = 200
  • cultures[1].tested = 6
  • cultures[1].positive = 0

Steps

  1. lam = 0.0014265392, from cultures, confidenceLevel; by equation 3; gives activeFraction.upper.
  2. freq = 700.99722, from lam; by equation 5; gives cellsPerActiveCell.fewest.

The working, as the case writes it:

No culture positive: exp(−λ·Σ n·d) = 0.05 with Σ n·d = 9 × 100 + 6 × 200 = 2100

λ = ln 20/2100 = 1.4265345e-3

at least 1/λ = 2100/ln 20 = 700.99722 cells per active cell (the paper prints 701). A two-sided bound would use 0.025 and give about 569.

Answer

activeFraction.upper = 0.0014265392

cellsPerActiveCell.fewest = 700.99722

Where these values came from: an outside program, CPython decimal at 60 digits, checked against statmod elda() CPython 3.13.18; statmod 1.5.0 on R version 4.3.3 (2024-02-29); Hu & Smyth 2009 sections 4.1, 4.2 and 4.5, in 60-digit decimal arithmetic.

At build the tool returned this answer within the tolerance the file states: Frequencies and active fractions relative 1e-9 with a floor of 1e-21 below 1e-12; statuses, codes and withholding rules exact.

Sources

  1. Hu Y, Smyth GK. ELDA: extreme limiting dilution analysis for comparing depleted and enriched populations in stem cell and other assays. J Immunol Methods 2009;347:70-78

    Used for: Active-cell frequency from a limiting dilution assay by the single-hit model, with its interval. At: section 4.5; section 4.2 and 4.5; section 4.1.

    Read in full, 11 November 2026

How it is checked

Level

Checked against a reference.

Checked against

An outside program, CPython decimal at 60 digits, checked against statmod elda(), CPython 3.13.18; statmod 1.5.0 on R version 4.3.3 (2024-02-29); the source's own worked example, CPython decimal at 60 digits, checked against statmod elda(), CPython 3.13.18; statmod 1.5.0 on R version 4.3.3 (2024-02-29); a reference program this project wrote itself, second implementation (Python 3.13), 2026-11-14, mpmath 1.4.1 at 80 digits: the score equation by bisection, z by the inverse error function, rounded once; not an outside program; a reference program this project wrote itself, second implementation (Python 3.13), 2026-11-14, mpmath 1.4.1 at 240 bits: the score equation and the one-sided bounds by bisection to 2^-200, z by the inverse error function, rounded once; not an outside program.

Cases

No case set is linked to this version.

Not checked

The outside comparison is statsmodels 0.15.0 GLM (binomial, complementary log-log link, offset log dose), on the estimate of the active fraction only; the Wald interval and the one-sided bounds have no outside comparison, and the interval's coverage is not checked. An active fraction above one (the estimate or an interval end, which a Poisson dose allows since λ = e^α is unbounded) is served unclipped with a note; how often real data give it is not measured.

What was not checked, in fullfrom the method records
  • The outside comparison is statsmodels 0.15.0 GLM (binomial, complementary log-log link, offset log dose), on the estimate of the active fraction only; the Wald interval and the one-sided bounds have no outside comparison, and the interval's coverage is not checked.
  • An active fraction above one (the estimate or an interval end, which a Poisson dose allows since λ = e^α is unbounded) is served unclipped with a note; how often real data give it is not measured.
  • With every culture positive and cells counted, the bound solves section 4.5 in section 4.2's form (1/211.56 for Table 4); the paper prints 1/218, which its own equations do not give (its Table 3 pair obeys the section 4.2 relation, its Table 4 pair does not), and statmod 1.5.0 stops on the case, so the counted bound is checked through the Poisson bound and the section 4.2 map, not against a second program.
  • Group comparison and the goodness-of-fit test (sections 4.3, 4.4) are not built.
What this project's records still lack1 thing
  • The source's location for each equation for limiting-dilution-frequency@1.1.1.
Changes to its methods0 changes

No change is logged for these method versions.