Statistical Methods

Calculate a Total Count When Event Probabilities Differ

Define the task

A binomial count assumes a shared event probability. If independent binary events have different known probabilities, a Poisson-binomial calculation retains that heterogeneity. List one probability per event and explain its provenance. Independence is a substantive assumption: shared exposures, clustering or repeated observations may invalidate it. The calculation does not estimate the supplied risks or account for their estimation uncertainty.

Carry out the check

Build the count distribution by successively combining each Bernoulli event with the previous count probabilities. Check that all masses sum to one. The expected count is the sum of probabilities, and the variance is the sum of p(1−p) under independence. Distinguish P(count=k) from P(count≥k). The browser tool sums upper-tail masses directly and uses floating-point arithmetic; extremely tiny probabilities can underflow. Do not substitute a Poisson approximation without checking its suitability.

Worked hypothetical example

Hypothetical example: risks [0.2,0.5,0.8] produce probabilities [0.08,0.42,0.42,0.08] for counts 0,1,2,3. Thus P(count≥2)=0.50, the expected count is 1.5 and variance is 0.57. Replacing all risks by their mean 0.5 preserves the expectation but changes the variance to 0.75. Report the probability vector and independence assumption so another analyst can reproduce the scenario.

Method checked 22 November 2026 against Primary method documentation: scipy.stats.poisson_binom.

Open the unequal-risk event count.

Download the unequal event probability worksheet.

Related reading

Reading path: Analyze data. Guide 198 of 202. Choose any guide to suit your project.

Statistical Methods

Check State Probabilities Across Repeated Model Cycles

Practical steps and a hypothetical example: Propagate a stated distribution through fixed transition probabilities.

Statistical Methods

Calculate an Acceptance Probability for a Count-Based Sampling Rule

Practical steps and a hypothetical example: Calculate a count-based acceptance plan under independent binary sampling.

Browse this reading pathTools for this stageGuides and downloads for this stage