About TrialChance

TrialChance is an educational binomial probability calculator and reproducible experiment simulator. It separates an exact theoretical model from finite simulated observations.

The probability model

For fixed n independent trials, two outcomes and the same success chance p on every trial, P(X = k) = C(n,k) pᵏ (1 − p)ⁿ⁻ᵏ. At most k and at least k both include k. Mean = np and variance = np(1 − p).

Enter 50 for 50%. The calculator accepts 0–1,000 trials, 0≤k≤n and 0–100% with at most 12 decimal places. Finite decimal percentages are kept as exact rational values. BigInt arithmetic computes the selected point and inclusive tails exactly; stable log probabilities support the chart and scientific percentage display. Rounded percentages are labeled. Long exact fractions remain complete in the result-data JSON and read-only result field.

Zero trials gives one empty outcome with 0 successes. At 0% all mass is at 0; at 100% all mass is at n. The calculator does not establish that independence or constant probability holds in real data.

Reproducible experiments

The simulator accepts 0–100 flips per experiment, 1–10,000 repetitions and a nonzero unsigned 32-bit seed from 1 to 4,294,967,295. It uses xorshift32 with shifts 13, 17, 5. Before every trial, the state is updated with left shift 13, unsigned right shift 17 and left shift 5, retaining 32 bits. A trial is heads exactly when state ÷ 2³² is less than p. Experiments consume consecutive blocks of n updates. This is an educational pseudorandom generator.

The default n = 10, 50%, 1,000 repetitions and seed 2026 produces 235 runs with exactly 5 heads. This observed 23.50% differs from exact theory 24.609375%. A finite run is not forced to agree with theory. Boundary models with n = 0 or p = 0%/100% are deterministic.

Exports and scope

PNG uses the selected current format and display options. Tall variants retain the complete square card without stretching or clipping and add theme bands. The full PDF report includes generator details and all settings regardless of image options. Trial CSV contains every actual simulated record; summary CSV contains every success-count bin and exact theoretical probability. Reports are sharp image PDFs with nonselectable text. Editable experiment links contain the settings, title and presentation options, and reproduce the data from the seed.

The main calculator can carry n,p,k into the simulator when n ≤ 100. For larger calculator models, the simulator opens its clearly labeled 10-flip example.

Guides and artwork

Binomial Probability Quick Start Guide and the paid Probability Experiments: A Binomial Modeling Workbook are planned. Finished guide/workbook files, email delivery, checkout and paid-file delivery have not been supplied. The disabled signup does not submit data. Optional tips are not connected.

Original standalone photography, logo and paperback artwork were unavailable. Sharp token/glass/desk artwork and a vector token-cover illustration were reconstructed from the approved mockups, with real shared typography and cover text. The cover is a visual concept, not a completed guide.

Back to calculator