Variable Types & Distributions
Before any synthetic data can be generated, the module needs to know what kind of variable each column is and what distribution to draw it from. When you upload raw data, the module determines both automatically; when you use the manual or descriptive-statistics routes, you specify them.
Variable types
The module recognises six variable types:
| Type | Meaning | Example |
|---|---|---|
| Continuous | A measurement that can take any value in a range | Blood pressure, weight, income |
| Binary | A two-valued (0/1) outcome | Disease present/absent, pass/fail |
| Categorical | An unordered set of discrete categories | Blood type, treatment arm, region |
| Count | Non-negative integer counts of events | Number of hospital visits, defects per unit |
| Time-to-event | A positive duration until an event | Survival time, time to failure |
| Proportion | A value bounded between 0 and 1 | Adherence rate, fraction positive |
Each type maps to a default distribution (see below).
Automatic variable-type detection
When you upload raw data, the module analyses each column independently and classifies it. The detection logic runs in a specific order -- the first matching rule wins.
Step 0 -- Clean the column. Null, undefined, and empty-string values are removed before analysis. If nothing remains, the column is classified as categorical by default.
For columns where every value is numeric:
| Order | Rule | Classified as |
|---|---|---|
| 1 | All integers, 10 or fewer distinct values -- OR a name containing a categorical keyword (gender, sex, group, category, type, class, level, grade, status) with 20 or fewer distinct values | Categorical |
| 2 | Only 0s and 1s (2 or fewer distinct values, all 0 or 1) | Binary |
| 3 | Passes the time-to-event test (see below) | Time-to-event |
| 4 | Otherwise | Continuous |
For columns with any non-numeric value: the column is classified as categorical, with its categories and frequencies tabulated.
The time-to-event test
A numeric column (that is not categorical or binary) is classified as time-to-event if either:
- Its name contains a time-related keyword -- time, duration, survival, days, months, years, hours, minutes, weeks, wait, delay, interval, period, lifetime, lifespan, tenure, followup, follow_up -- OR
- It shows strong exponential characteristics (all of the following):
- All values positive
- Coefficient of variation (CV = SD / mean) between 0.9 and 1.2
- Right-skewed (mean > median x 1.1)
The name-keyword route is sufficient on its own; the statistical route is deliberately strict to avoid misclassifying ordinary positive continuous variables.
Detected summary statistics
| Type | Summary captured |
|---|---|
| Continuous | mean, std, min, max |
| Binary | proportion (mean), frequency of 0s and 1s |
| Categorical | category list, frequency of each category |
| Time-to-event | mean, std, min, max, and lambda estimate (1/mean) |
Distributions and their parameters
The type system defines nine distribution types: normal, uniform, binomial, categorical, exponential, poisson, lognormal, beta, gamma.
Each variable type maps to a default distribution:
| Variable type | Default distribution | Parameters seeded from the data |
|---|---|---|
| Continuous | Normal | mean, std (plus min, max for bounds) |
| Categorical | Categorical | categories, probabilities (from observed frequencies) |
| Binary | Binomial (n=1, Bernoulli) | p = observed proportion of 1s, clamped to [0.001, 0.999] |
| Time-to-event | Exponential | lambda = observed 1/mean (plus min, max) |
| Count | Poisson | lambda = observed mean (plus min, max) |
| Proportion | Beta | alpha = 2, beta = 2 (symmetric default) |
Categorical probabilities
For a categorical variable, category probabilities are computed from observed frequencies:
probability(category) = frequency(category) / total_count
If no frequencies are available, probabilities default to uniform (1 / number_of_categories).
Binary proportion
For a binary variable, the success probability p is taken from the exact frequency count:
p = count_of_1s / (count_of_1s + count_of_0s)
The value is clamped to [0.001, 0.999] so generation never has a degenerate probability.
Distribution parameter reference
| Distribution | Parameters | Meaning |
|---|---|---|
| Normal | mean, std | Centre and spread of a Gaussian |
| Uniform | min, max | Lower and upper bounds of a flat distribution |
| Binomial | n, p | Number of trials and success probability (n=1 gives Bernoulli) |
| Categorical | categories, probabilities | Category labels and selection probabilities |
| Exponential | lambda | Rate parameter (mean = 1/lambda) |
| Poisson | lambda | Mean event count |
| Lognormal | mean, std (on the log scale) | Parameters of the underlying normal |
| Beta | alpha, beta | Shape parameters bounding the variable to [0, 1] |
| Gamma | shape, scale | Shape and scale parameters for a positive skewed variable |
Data context
You can set an overall data context that tunes how the module interprets and presents the dataset:
| Context | Typical domain |
|---|---|
| General | Default -- no domain-specific assumptions |
| Medical | Clinical / health data |
| Financial | Financial / economic data |
| Behavioral | Psychology / behavioural science data |
| Manufacturing | Industrial / quality data |
| Environmental | Environmental / ecological data |
The data context helps the module frame the variables and results appropriately for your field.
Reviewing and adjusting detected types
After automatic detection, you review every variable in the Configure Settings step. For each variable you can:
- Confirm or change its type
- Confirm or change its distribution and edit the distribution parameters
- Include or exclude the variable from generation
This gives you the final say over how each column is modelled, while automatic detection does the heavy lifting of getting the defaults right.