Skip to content

Main content

Random Overdispersed Count Experiment Generator

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.

Loading tool…

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

  1. Supply trials, alpha, beta, count in the field shapes below. Set seed when you need an explicit replay.
  2. 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.
  3. 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 fieldMeaning and unitsAccepted input
trialsTrialsRequired. Safe integer; minimum 0; maximum 1000000.
alphaAlphaRequired. Finite number; strictly above 0.
betaBetaRequired. Finite number; strictly above 0.
countRequested count; the mechanics explain whether one draw expands into several returned records.Required. Safe integer; minimum 1; maximum 512.
seedOptional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed.Optional. Safe integer.
Output fieldInterpretationReturned shape
modelModelRequired. Object; no unknown keys.
model.trialsTrialsRequired. Safe integer; minimum 0.
model.alphaAlphaRequired. Finite number; strictly above 0.
model.betaBetaRequired. Finite number; strictly above 0.
model.meanProbabilityMean ProbabilityRequired. Finite number; minimum 0; maximum 1.
model.theoreticalMeanTheoretical MeanRequired. Finite number; minimum 0.
binomialBinomialRequired. Object; no unknown keys.
binomial.samplerSeedSampler SeedRequired. Text; minimum UTF-16 length 1.
binomial.samplesSamplesRequired. Array of Safe integer; minimum 0.; minimum items 1; maximum items 512.
binomial.observedMeanObserved MeanRequired. Finite number; minimum 0.
binomial.observedVarianceObserved VarianceRequired. Finite number; minimum 0.
binomial.theoreticalVarianceTheoretical VarianceRequired. Finite number; minimum 0.
betaBinomialBeta BinomialRequired. Object; no unknown keys.
betaBinomial.samplerSeedSampler SeedRequired. Text; minimum UTF-16 length 1.
betaBinomial.samplesSamplesRequired. Array of Safe integer; minimum 0.; minimum items 1; maximum items 512.
betaBinomial.observedMeanObserved MeanRequired. Finite number; minimum 0.
betaBinomial.observedVarianceObserved VarianceRequired. Finite number; minimum 0.
betaBinomial.theoreticalVarianceTheoretical VarianceRequired. Finite number; minimum 0.
randomnessReplay 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.seedOptional numeric replay seed; normalization and precedence are explained below.Required. Safe integer. or Null.
randomness.sourceSourceRequired. 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.

json
{
  "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

  1. Tool behavior and example: Random Overdispersed Count Experiment Generator — tool.io

  2. Calculation or validation: probability/binomial-sampler — tool.io

  3. Calculation or validation: probability/beta-binomial-sampler — tool.io

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.