Standard Deviation
Standard deviation quantifies spread — the heartbeat of reliability metrics like transit time or pick accuracy.
Measure the mean and standard deviation of the series, then mark alert bands—often at two or three sigmas on either side of the average. Points breaking those thresholds reveal processes operating beyond typical variation and warrant investigation.
Image source: generate_visuals.py
Code examples
Implementing standard deviation
import pandas as pd
# Daily returns for a portfolio or product line
returns = pd.Series([0.8, 1.2, 1.0, 0.9, 1.5, 0.7, 1.1])
# Core statistics for the series
mean = returns.mean()
std_dev = returns.std(ddof=1)
# Define tolerance thresholds two standard deviations away
upper_limit = mean + 2 * std_dev
lower_limit = mean - 2 * std_dev
# Highlight values outside the control band
alerts = returns[(returns < lower_limit) | (returns > upper_limit)]
print(alerts)
' Average and standard deviation for the sample
=AVERAGE($B$2:$B$8)
=STDEV.S($B$2:$B$8)
' Upper and lower control limits (±2σ)
=Average + 2*StdDev
=Average - 2*StdDev
' Flag values outside the band
=IF(OR(B2<Lower_Limit,B2>Upper_Limit),"Investigate","OK")
// Mean of the metric across the selected context
Std Avg = AVERAGE('Metrics'[Value])
// Standard deviation computed from a summarised table
Std Dev =
VAR SummaryTable =
ADDCOLUMNS(
SUMMARIZE('Metrics', 'Metrics'[Date]),
"Value", CALCULATE(AVERAGE('Metrics'[Value]))
)
RETURN
STDEVX.P(SummaryTable, [Value])
// Upper and lower bounds two standard deviations from the mean
Std Upper = [Std Avg] + 2 * [Std Dev]
Std Lower = [Std Avg] - 2 * [Std Dev]
// Flag observations outside the tolerance band
Std Alert =
IF(
AVERAGE('Metrics'[Value]) > [Std Upper]
|| AVERAGE('Metrics'[Value]) < [Std Lower],
"Outside band",
"In band"
)
Key takeaways
- Shaded sigma zones translate statistics into intuitive reliability expectations.
- Route-specific spreads highlight when geography, not discipline, drives variation.
- Standard deviation reframes SLA debates around typical behaviour rather than one-off delays.