calc_rank_of_mrca_bounds_among

calc_rank_of_mrca_bounds_among(population: Iterable[Union[HereditaryStratigraphicColumn, HereditaryStratigraphicSpecimen]], prior: str, confidence_level: float = 0.95) Tuple[int, int] | None

Within what generation range did MRCA fall?

Calculate bounds on estimate for the number of depositions elapsed along the line of descent before the most recent common ancestor among population.

Parameters

prior{“arbitrary”}

Prior probability density distribution over possible generations of the MRCA.

Currently only “arbitrary” supported.

confidence_levelfloat, optional

Bounds must capture what probability of containing the true rank of the MRCA? Default 0.95.

Returns

(int, int), optional

Inclusive lower and then exclusive upper bound on estimate or None if no common ancestor between first and second can be resolved with sufficient confidence. (Sufficient confidence depends on confidence_level.) Also returns None for empty or singleton population.

Notes

Currently implementaiton uses a naive O(n^2) approach. A more efficient implementation should be possible.

The true rank of the MRCA is guaranteed to never fall above the bounds but may fall below.