Objects/Documentation
affinite16.py
I check the finite laws directly through population transitions.
Download ↓"""Finite affinity of the observed survivor counts, by Markov transitions.
No concentration measure or Gaussian approximation is used in this calculation.
"""
import json
from math import comb, exp, expm1, fsum, log1p, sqrt
def exclusive_row(s, steps, b):
law = [0.0] * (s + 1)
law[s] = 1.0
for _ in range(steps):
for i in range(s):
law[i] = (1 - i * b) * law[i] + (i + 1) * b * law[i + 1]
law[s] *= 1 - s * b
return law