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:

TypeMeaningExample
ContinuousA measurement that can take any value in a rangeBlood pressure, weight, income
BinaryA two-valued (0/1) outcomeDisease present/absent, pass/fail
CategoricalAn unordered set of discrete categoriesBlood type, treatment arm, region
CountNon-negative integer counts of eventsNumber of hospital visits, defects per unit
Time-to-eventA positive duration until an eventSurvival time, time to failure
ProportionA value bounded between 0 and 1Adherence 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:

OrderRuleClassified as
1All 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 valuesCategorical
2Only 0s and 1s (2 or fewer distinct values, all 0 or 1)Binary
3Passes the time-to-event test (see below)Time-to-event
4OtherwiseContinuous

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:

  1. 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
  2. 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

TypeSummary captured
Continuousmean, std, min, max
Binaryproportion (mean), frequency of 0s and 1s
Categoricalcategory list, frequency of each category
Time-to-eventmean, 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 typeDefault distributionParameters seeded from the data
ContinuousNormalmean, std (plus min, max for bounds)
CategoricalCategoricalcategories, probabilities (from observed frequencies)
BinaryBinomial (n=1, Bernoulli)p = observed proportion of 1s, clamped to [0.001, 0.999]
Time-to-eventExponentiallambda = observed 1/mean (plus min, max)
CountPoissonlambda = observed mean (plus min, max)
ProportionBetaalpha = 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

DistributionParametersMeaning
Normalmean, stdCentre and spread of a Gaussian
Uniformmin, maxLower and upper bounds of a flat distribution
Binomialn, pNumber of trials and success probability (n=1 gives Bernoulli)
Categoricalcategories, probabilitiesCategory labels and selection probabilities
ExponentiallambdaRate parameter (mean = 1/lambda)
PoissonlambdaMean event count
Lognormalmean, std (on the log scale)Parameters of the underlying normal
Betaalpha, betaShape parameters bounding the variable to [0, 1]
Gammashape, scaleShape 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:

ContextTypical domain
GeneralDefault -- no domain-specific assumptions
MedicalClinical / health data
FinancialFinancial / economic data
BehavioralPsychology / behavioural science data
ManufacturingIndustrial / quality data
EnvironmentalEnvironmental / 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.