PROBABILITY LAB
Probability & randomness lab
See how random outcomes vary from their exact probabilities. Run coin, dice, or weighted-choice experiments; inspect a sample locally.
Set an experiment
Each weight is a relative ticket count; these bars preview the exact share.
Cryptographic randomness is the default. Seeded output is repeatable for learning and simulation only; do not use it for decisions, passwords, or audited draws.
Changing a setting affects the next run. Each outcome is generated in your browser with crypto.getRandomValues(). Non-sensitive settings are remembered on this device; pasted sequences and generated results stay in this page unless downloaded, and are not sent to Twirlseed.
Results
ObservedExpected
Bars compare observed and expected within each row. Displayed percentages are rounded to at most two decimal places; calculations use unrounded probabilities.
Cumulative outcome frequency
Follow one outcome’s observed share as draws accumulate and compare it with the configured probability. A finite path may move farther away temporarily; this descriptive view does not certify randomness.
Observed cumulative shareConfigured probability
Cumulative checkpoints table
| Draws | Observed count | Observed share | Configured probability |
|---|
The expected probability comes directly from the configured experiment. Random samples naturally vary.
Sequence inspector
Paste observations you already have to compare their frequencies with a proposed probability model. Use H/T for coins, side numbers for dice, or one choice per line. Maximum 10,000 observations.
Cumulative outcome frequency
Follow one outcome’s observed share in the supplied sequence and compare it with the configured probability.
Observed cumulative shareConfigured probability
Cumulative checkpoints table
| Observations | Observed count | Observed share | Configured probability |
|---|
Exact conditional distribution of runs
| Runs | Conditional probability |
|---|
For exactly two observed categories, runs are consecutive blocks. The exact conditional distribution is shown when either category occurs 10 times or fewer. A continuity-corrected normal approximation is used only when both counts exceed 10. This is not a median-threshold test for continuous values.
The conditional null treats every ordering with these category counts as equally likely. The exact two-sided p-value sums outcomes at least as far from the expected run count as the observed value.
A small p-value can flag disagreement with the model, but it does not identify a cause. A large p-value does not prove the model is true.
How to read the comparison
For the chi-square approximation, every expected count must be at least 5 and observations should be independent. Set probabilities before collecting data; fitting them to the same sequence invalidates the p-value.
This diagnostic describes how compatible these observations are with the stated model. It cannot show whether a generator is secure, prove fairness, or certify randomness. NIST cautions that statistical testing is not a substitute for cryptanalysis.
Experiment settings are remembered on this device. Pasted observations and generated results stay in this page unless downloaded; they are not sent to Twirlseed. Your browser may cache app files for offline use.