Skip to content

Main content

Random Correlated Point Dataset Generator

Generate bivariate Box–Muller coordinates under a supplied population correlation, preserving the normal core's epsilon clipping and the normalized Pearson core's 15-significant-digit diagnostic; constant coordinates produce null and sample correlation is not forced to the target.

Loading tool…

Description

Generate bivariate Box–Muller coordinates under a supplied population correlation, preserving the normal core's epsilon clipping and the normalized Pearson core's 15-significant-digit diagnostic; constant coordinates produce null and sample correlation is not forced to the target.

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 bivariate Box–Muller coordinates under a supplied population correlation, preserving the normal core's epsilon clipping and the normalized Pearson core's 15-significant-digit diagnostic; constant coordinates produce null and sample correlation is not forced to the target.

When to use this tool

Use this generator to create reproducible correlated point dataset 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 count, meanX, meanY, standardDeviationX, standardDeviationY, targetCorrelation 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 x, y, targetCorrelation, diagnostics. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.

Draw two standard-normal variates per observation and combine them as correlated Gaussian coordinates using targetCorrelation and supplied means and standard deviations. Return x/y arrays and an observed Pearson diagnostic.1

Input fieldMeaning and unitsAccepted input
countCountRequired. Safe integer; minimum 2; maximum 2048.
meanXMean XRequired. Finite number.
meanYMean YRequired. Finite number.
standardDeviationXStandard Deviation XRequired. Finite number; minimum 0.
standardDeviationYStandard Deviation YRequired. Finite number; minimum 0.
targetCorrelationTarget CorrelationRequired. Finite number; minimum -1; maximum 1.
seedOptional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed.Optional. Safe integer.
Output fieldInterpretationReturned shape
xXRequired. Array of Finite number.; minimum items 2; maximum items 2048.
yYRequired. Array of Finite number.; minimum items 2; maximum items 2048.
targetCorrelationTarget CorrelationRequired. Finite number; minimum -1; maximum 1.
diagnosticsDiagnosticsRequired. Object; no unknown keys.
diagnostics.sampleCorrelationSample CorrelationRequired. Finite number; minimum -1; maximum 1. or Null.
randomnessReplay source and normalized 32-bit seed, or null seed for an advancing context source.Required. Object; no unknown keys.
randomness.seedOptional safe-integer 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": {
    "count": 6,
    "meanX": 10,
    "meanY": -5,
    "standardDeviationX": 2,
    "standardDeviationY": 1,
    "targetCorrelation": 0.7,
    "seed": 42
  },
  "output": {
    "x": [
      8.087675541231702,
      6.3167456304328065,
      8.94113241256717,
      9.46296454674551,
      8.668001703485878,
      11.130573722141582
    ],
    "y": [
      -5.864293199283204,
      -7.103891794861108,
      -4.493214419635946,
      -6.474700282182268,
      -7.807928869718577,
      -3.8877287338231175
    ],
    "targetCorrelation": 0.7,
    "diagnostics": {
      "sampleCorrelation": 0.643258763230912
    },
    "randomness": {
      "seed": 42,
      "source": "seed"
    }
  }
}

Limitations and assumptions

  • Target correlation is a population-model parameter, not an exact finite-sample result. Degenerate samples can have undefined correlation under the linked diagnostic; coordinates and noise must remain finite.
  • A replay requires the same complete input and implementation. The stated sampling convention applies within its eligible space. A finite draw does not exhaust all possible outputs; repeats remain possible unless a distinct-selection rule is explicit.
  • 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 Correlated Point Dataset Generator — tool.io

Similar or alternative tools

  • Random Clustered Point Dataset Generator

    Generate bounded-count caller-parameterized Gaussian point groups with retained source labels, shuffle them and delegate scale-normalized deterministic k-means; fitted labels are separate from generating groups and exact fixed-point verification is reported without an optimality claim.

  • FP-Growth Frequent Itemset Mining Tool

    Mine bounded transaction itemsets with actual FP-trees and weighted conditional pattern bases, counting each item once per transaction and retaining empty transactions in support denominators.