Data Preprocessing
Before statistical analysis, AB-Labz Workbench automatically processes data to improve result accuracy.
Why Preprocessing is Needed
Real experiment data often contains:
- Outliers - extreme values (for example, a $10,000 order with an average check of $50)
- Skewness - data heavily shifted in one direction (for example, most orders are $20-50, but there are single orders of $1000+)
- Noise - random anomalies that distort the picture
Without processing, such data can lead to false conclusions: one buyer with a huge check can "outweigh" hundreds of regular users.
How Analysis Works
The system conducts multi-stage analysis of each metric's distribution before choosing a processing method.
Distribution Characteristics
Shape measurement:
- Skewness - determines the direction and strength of data "bias"
- Kurtosis - evaluates the "heaviness of tails" of the distribution and probability of extreme values
- Modality - checks for multiple "peaks" in data (bimodal or multimodal distribution)
Spread analysis:
- IQR (interquartile range) - main measure of data spread between 25% and 75% percentiles
- CV (coefficient of variation) - relative measure of variability, shows spread relative to mean value
- Standard deviation - absolute measure of data spread
Outlier detection:
- Number of outliers beyond 3IQR - extreme values going far beyond normal boundaries
- Number of outliers beyond 1.5IQR - standard method for detecting anomalies
- Percentage of extreme values - proportion of data requiring special attention
Additional checks:
- Presence of zero and negative values
- Distribution density in different ranges
- Ratio of median to mean (skewness indicator)
Based on the entire set of these characteristics, the system makes a decision about the most appropriate transformation method.
Transformation Methods
Logarithm
With strong distribution skewness, heavy tails, and high kurtosis, the system applies logarithmic transformation. Logarithm "compresses" large numbers more than small ones, bringing data to a more symmetric form.
For example, values [10, 15, 20, 500, 1000] become [2.3, 2.7, 3.0, 6.2, 6.9] - now extreme values do not dominate over others. This makes statistical tests more correct and reliable.
3IQR Cleaning
When a large number of extreme outliers and anomalous points in distribution tails are detected, the system trims values beyond the normal range.
For example, if in data [50, 55, 60, 65, 9999] the last value is clearly anomalous, it is replaced with the upper normal boundary (for example, 200). This way extreme anomalies do not affect results, but data is not lost.
5% Winsorization
With moderate outliers and increased data variability, a softer method is applied. The system replaces 5% of the largest and 5% of the smallest values with the nearest "normal" ones.
For data [1, 5, 10, 15, 20, 25, 30, 1000, 2000], extreme values become [10, 10, 10, 15, 20, 25, 30, 30, 30]. This reduces the influence of outliers while preserving the overall distribution structure.
1% Winsorization
This is the default method for relatively stable distributions with minimal deviations. Only 1% of extreme values on each side are replaced - basic protection against rare anomalies that barely touches the data.
For Ratio Metrics
For metrics like "revenue per user", the system additionally applies linearization:
Linearized metric = Numerator - θ × Denominatorwhere θ is the ratio in the control group.
Why: Ratio metrics have a complex distribution (division creates additional skewness). Linearization allows correctly applying statistical tests.
Automatic Selection
You don't need to choose a method manually - the system analyzes each metric and applies the optimal transformation. Information about the applied method is displayed in analysis results.
