Description
Compare equal-size binomial and beta-binomial batches at the same beta-derived mean probability, using visible derived string-seeded sampler substreams; report observed population means/variances and theoretical variances, without claiming every realized batch is more dispersed or fitting real data.
Synthetic statistical data separates a specified generating model from the values observed in a finite draw. A model parameter, a sample summary, and the result of a fitted analysis answer different questions; retaining them separately makes numerical and statistical checks easier to interpret.
Compare equal-size binomial and beta-binomial batches at the same beta-derived mean probability, using visible derived string-seeded sampler substreams; report observed population means/variances and theoretical variances, without claiming every realized batch is more dispersed or fitting real data.
When to use this tool
Use this generator to create reproducible overdispersed count experiment cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.
How to use the tool and how it works
- Supply trials, alpha, beta, count in the field shapes below. Set seed when you need an explicit replay.
- Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
- Read model, binomial, betaBinomial. Use the conventions below and keep answer-bearing fields separate when presenting an exercise.
Derive separate sampler seeds for ordinary binomial and beta-binomial draws with the same theoretical mean probability alpha/(alpha+beta). Return observed population moments and theoretical variances, including the beta-binomial dispersion multiplier.1
Delegated operations used for this result: binomial sampler; beta binomial sampler. Their calculation or parsing conventions apply to the corresponding result fields.2, 3
| Input field | Meaning and units | Accepted input |
|---|---|---|
| trials | Trials | Required. Safe integer; minimum 0; maximum 1000000. |
| alpha | Alpha | Required. Finite number; strictly above 0. |
| beta | Beta | Required. Finite number; strictly above 0. |
| count | Requested count; the mechanics explain whether one draw expands into several returned records. | Required. Safe integer; minimum 1; maximum 512. |
| seed | Optional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed. | Optional. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| model | Model | Required. Object; no unknown keys. |
| model.trials | Trials | Required. Safe integer; minimum 0. |
| model.alpha | Alpha | Required. Finite number; strictly above 0. |
| model.beta | Beta | Required. Finite number; strictly above 0. |
| model.meanProbability | Mean Probability | Required. Finite number; minimum 0; maximum 1. |
| model.theoreticalMean | Theoretical Mean | Required. Finite number; minimum 0. |
| binomial | Binomial | Required. Object; no unknown keys. |
| binomial.samplerSeed | Sampler Seed | Required. Text; minimum UTF-16 length 1. |
| binomial.samples | Samples | Required. Array of Safe integer; minimum 0.; minimum items 1; maximum items 512. |
| binomial.observedMean | Observed Mean | Required. Finite number; minimum 0. |
| binomial.observedVariance | Observed Variance | Required. Finite number; minimum 0. |
| binomial.theoreticalVariance | Theoretical Variance | Required. Finite number; minimum 0. |
| betaBinomial | Beta Binomial | Required. Object; no unknown keys. |
| betaBinomial.samplerSeed | Sampler Seed | Required. Text; minimum UTF-16 length 1. |
| betaBinomial.samples | Samples | Required. Array of Safe integer; minimum 0.; minimum items 1; maximum items 512. |
| betaBinomial.observedMean | Observed Mean | Required. Finite number; minimum 0. |
| betaBinomial.observedVariance | Observed Variance | Required. Finite number; minimum 0. |
| betaBinomial.theoreticalVariance | Theoretical Variance | Required. Finite number; minimum 0. |
| randomness | Replay metadata: source is seed or context; seed is the normalized 32-bit seed or null for a context source. | Required. Object; no unknown keys. |
| randomness.seed | Optional numeric replay seed; normalization and precedence are explained below. | Required. Safe integer. or Null. |
| randomness.source | Source | Required. Text; one of "context", "seed". |
An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.
{
"input": {
"trials": 6,
"alpha": 2,
"beta": 2,
"count": 4,
"seed": 42
},
"output": {
"model": {
"trials": 6,
"alpha": 2,
"beta": 2,
"meanProbability": 0.5,
"theoreticalMean": 3
},
"binomial": {
"samplerSeed": "binomial:2581720956",
"samples": [
2,
5,
2,
0
],
"observedMean": 2.25,
"observedVariance": 3.1875,
"theoreticalVariance": 1.5
},
"betaBinomial": {
"samplerSeed": "beta-binomial:1925393290",
"samples": [
5,
6,
0,
3
],
"observedMean": 3.5,
"observedVariance": 5.25,
"theoreticalVariance": 3
},
"randomness": {
"seed": 42,
"source": "seed"
}
}
} Limitations and assumptions
- Overdispersion is a model comparison, not a guarantee that every finite sample has greater observed variance. Work is bounded by trials times count and rejected sampling parameters return a structured error.
- A replay requires the same complete input and implementation. Randomized construction does not guarantee uniform coverage of every feasible output; finite samples can repeat unless a distinct-selection rule is explicitly stated.
- The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.
Alternative or Complementary methods
For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.
References
Similar or alternative tools
- Random Heavy-Tail Comparison Experiment Generator
Compare matched-size Cauchy and Pareto Type I samples with visible derived sampler seeds, observed extremes, medians, and linearly interpolated empirical quantiles; preserve Pareto sampler 10-significant-digit rounding and epsilon tail clipping, and do not report a finite Cauchy population mean or variance.
- Random Mixture Distribution Experiment Generator
Generate labeled observations from explicitly weighted normal/exponential components via multinomial counts, separate visible component sampler seeds, and a seeded shuffle; preserve normal sampler 10-significant-digit rounding and inherited endpoint clipping, without fitting or classifying real data.