Skip to content

Main content

Random Outlier Detection Test Case Generator

Generate a Gaussian baseline plus explicitly labeled fixed-offset contamination, shuffle retained labels and delegate Tukey-IQR outlier counting after safe positive-affine normalization; injected labels are not detector truth and quartiles follow the inherited median-of-halves convention.

Loading tool…

Description

Generate a Gaussian baseline plus explicitly labeled fixed-offset contamination, shuffle retained labels and delegate Tukey-IQR outlier counting after safe positive-affine normalization; injected labels are not detector truth and quartiles follow the inherited median-of-halves convention.

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.

Generate a Gaussian baseline plus explicitly labeled fixed-offset contamination, shuffle retained labels and delegate Tukey-IQR outlier counting after safe positive-affine normalization; injected labels are not detector truth and quartiles follow the inherited median-of-halves convention.

When to use this tool

Use this generator to create reproducible outlier detection test case 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 baselineCount, baselineMean, baselineStandardDeviation, contaminationCount, contaminationOffset, contaminationSide 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 values, injected, injectedCount, detectedCount. Use the conventions below and keep answer-bearing fields separate when presenting an exercise.

Draw a Gaussian baseline and inject fixed-offset contaminants on the selected side or sides. Shuffle while retaining injected labels, normalize magnitudes for the delegated IQR detector, and return injected and detected counts separately.1

Delegated operations used for this result: outlier count iqr. Their calculation or parsing conventions apply to the corresponding result fields.2

Input fieldMeaning and unitsAccepted input
baselineCountBaseline CountRequired. Safe integer; minimum 4; maximum 1024.
baselineMeanBaseline MeanRequired. Finite number.
baselineStandardDeviationBaseline Standard DeviationRequired. Finite number; minimum 0.
contaminationCountContamination CountRequired. Safe integer; minimum 0; maximum 128.
contaminationOffsetContamination OffsetRequired. Finite number; minimum 0.
contaminationSideContamination SideRequired. Text; one of "upper", "lower", "both".
seedOptional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed.Optional. Safe integer.
Output fieldInterpretationReturned shape
valuesValuesRequired. Array of Finite number.; minimum items 4; maximum items 1152.
injectedInjectedRequired. Array of Boolean.; minimum items 4; maximum items 1152.
injectedCountInjected CountRequired. Safe integer; minimum 0; maximum 128.
detectedCountDetected CountRequired. Safe integer; minimum 0; maximum 1152.
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": {
    "baselineCount": 8,
    "baselineMean": 100,
    "baselineStandardDeviation": 5,
    "contaminationCount": 2,
    "contaminationOffset": 40,
    "contaminationSide": "both",
    "seed": 42
  },
  "output": {
    "values": [
      106.14295336531552,
      90.79186407608202,
      140,
      98.63486947558695,
      90.99103291156455,
      94.29558964522988,
      140,
      98.65741136686378,
      97.35283103141792,
      95.21918885307926
    ],
    "injected": [
      false,
      false,
      true,
      false,
      false,
      false,
      true,
      false,
      false,
      false
    ],
    "injectedCount": 2,
    "detectedCount": 2,
    "randomness": {
      "seed": 42,
      "source": "seed"
    }
  }
}

Limitations and assumptions

  • Injected labels describe construction, not what the detector must flag. Baseline points may be outliers and contaminants may remain unflagged; no real-world anomaly or diagnostic performance is established.
  • 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 Outlier Detection Test Case Generator — tool.io

  2. Calculation or validation: statistics/outlier-count-iqr — 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 Transaction Itemset Instance Generator

    Generate exact-count set-valued transactions by choosing a uniform size and a without-replacement subset from distinct supplied item labels; transactions may repeat and imported frequencies count transaction presence.