business analytics
slug: step-indexCalculates performance indices that compare segment rates against a baseline, highlighting over/under-performing segments with statistical significance flags. Essential for identifying efficiency, effectiveness, and opportunity areas within data.
measure (string) - Base column to analyze (e.g., "conversion")metric (string) - Rate-based metric to use (e.g., "mean", "median")indexAgainst (string) - Baseline selection method (default: level0):
level0 - Use grand total (top level) as baselineparent - Use parent segment as baseline (hierarchical comparison)baselineFilterbaselineFilter (object) - Custom criteria to identify baseline rowindexColumn (string) - Name for the index column (default: {measure}Index)significanceThreshold (number) - Minimum deviation to flag as significant (default: 20)includeComposition (boolean) - Add composition percentage column (default: true)flagThreshold (boolean) - Add index flag columns (default: true)measure.metricAll original columns plus:
segmentRate - Rate value for this segmentbaselineRate - Baseline rate value used for comparison{measure}Index - Calculated index value (segment/baseline × 100)composition - Percentage of total frequency (optional)indexFlag - Significance flag: 'significant' or 'at_par' (optional)overUnderFlag - Direction flag: 'over', 'under', or null (optional)Detailed statistics stored in extras.stats.index:
measure - Measure used in analysismetric - Rate-based metric usedindexAgainst - Baseline approach usedbaselineRate - Value of the baseline ratesignificanceThreshold - Deviation threshold for significancesegmentsAnalyzed - Number of segments analyzedoverIndexing - Count of significantly over-indexing segmentsatPar - Count of segments at parity with baselineunderIndexing - Count of significantly under-indexing segmentsstrongestOverIndex - Details about highest over-indexing segmentweakestUnderIndex - Details about lowest under-indexing segmentindex:
measure: conversion
metric: mean
significanceThreshold: 15
index:
measure: engagement
metric: mean
indexAgainst: parent
includeComposition: true
flagThreshold: true
index:
measure: response_rate
metric: mean
baselineFilter:
region: "National"
segment: "All"
| level | region | customer_segment | conversion.mean | freq |
|---|---|---|---|---|
| 0 | All | All | 3.5 | 1000 |
| 1 | North | All | 4.2 | 400 |
| 1 | South | All | 3.0 | 600 |
| 2 | North | Premium | 5.8 | 150 |
| 2 | North | Standard | 3.2 | 250 |
| 2 | South | Premium | 4.5 | 200 |
| 2 | South | Standard | 2.2 | 400 |
| level | region | customer_segment | conversion.mean | freq | segmentRate | baselineRate | conversionIndex | composition | indexFlag | overUnderFlag |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | All | All | 3.5 | 1000 | 3.5 | 3.5 | 100.00 | 100.00 | at_par | null |
| 1 | North | All | 4.2 | 400 | 4.2 | 3.5 | 120.00 | 40.00 | significant | over |
| 1 | South | All | 3.0 | 600 | 3.0 | 3.5 | 85.71 | 60.00 | significant | under |
| 2 | North | Premium | 5.8 | 150 | 5.8 | 3.5 | 165.71 | 15.00 | significant | over |
| 2 | North | Standard | 3.2 | 250 | 3.2 | 3.5 | 91.43 | 25.00 | at_par | null |
| 2 | South | Premium | 4.5 | 200 | 4.5 | 3.5 | 128.57 | 20.00 | significant | over |
| 2 | South | Standard | 2.2 | 400 | 2.2 | 3.5 | 62.86 | 40.00 | significant | under |
extras.stats.index = {
"measure": "conversion",
"metric": "mean",
"indexAgainst": "level0",
"baselineRate": 3.5,
"significanceThreshold": 20,
"segmentsAnalyzed": 7,
"overIndexing": 3,
"atPar": 2,
"underIndexing": 2,
"strongestOverIndex": {
"segment": "North|Premium",
"index": 165.71,
"composition": 15.00
},
"weakestUnderIndex": {
"segment": "South|Standard",
"index": 62.86,
"composition": 40.00
}
}