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
- Supply count, meanX, meanY, standardDeviationX, standardDeviationY, targetCorrelation 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 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 field | Meaning and units | Accepted input |
|---|---|---|
| count | Count | Required. Safe integer; minimum 2; maximum 2048. |
| meanX | Mean X | Required. Finite number. |
| meanY | Mean Y | Required. Finite number. |
| standardDeviationX | Standard Deviation X | Required. Finite number; minimum 0. |
| standardDeviationY | Standard Deviation Y | Required. Finite number; minimum 0. |
| targetCorrelation | Target Correlation | Required. Finite number; minimum -1; maximum 1. |
| 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 |
|---|---|---|
| x | X | Required. Array of Finite number.; minimum items 2; maximum items 2048. |
| y | Y | Required. Array of Finite number.; minimum items 2; maximum items 2048. |
| targetCorrelation | Target Correlation | Required. Finite number; minimum -1; maximum 1. |
| diagnostics | Diagnostics | Required. Object; no unknown keys. |
| diagnostics.sampleCorrelation | Sample Correlation | Required. Finite number; minimum -1; maximum 1. or Null. |
| randomness | Replay source and normalized 32-bit seed, or null seed for an advancing context source. | Required. Object; no unknown keys. |
| randomness.seed | Optional safe-integer 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": {
"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
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.