APPLIED STUDY · ORIGINAL LESSON
Learning plan and prerequisites
Before you begin: Complete volume percentiles and robust baselines, and understand a data revision and a strict comparison.
- Compute a median absolute deviation score with stated scaling
- Compare classifications across predefined thresholds
- Handle a zero-dispersion baseline without inventing a score
Mechanism and interpretation
A volume spike can be defined by a ratio, a percentile or a dispersion-based score. Robustness analysis asks whether the classification survives reasonable, predefined changes in the data or specification. It does not search for whichever threshold makes a later successful example look strongest. Keep data-version sensitivity separate from parameter sensitivity: correcting a reported quantity changes the observation, while changing a ratio threshold changes the detector.
Median absolute deviation, or MAD, is the median of absolute distances from the sample median. This lesson uses an unscaled score (candidate minus median)/MAD, measured in raw MAD units. It is not a normal-distribution z-score. A separately scaled MAD would give different numerical scores and needs its own formula. When MAD equals zero, division is undefined. A ratio to a positive median may still be available, but it should be reported as a different statistic rather than substituted silently into the missing dispersion score.
Worked case — synthetic data
Synthetic prior same-slot quantities are [100,110,90,105,95]. Their mean and median are both 100. Absolute deviations from the median are [0,10,10,5,5], whose median is five. Candidate quantity 160 has a median ratio of 1.6 and raw-MAD score (160-100)/5 = 12. If a documented source revision changes the candidate to 130, the ratio becomes 1.3 and the score becomes six. Neither score establishes a probability of reversal.
Predeclare strict ratio thresholds 1.3, 1.5 and 1.7. The original 1.6 ratio passes the first two and fails the third. The revised 1.3 ratio fails all three because equality does not pass a strict test. For a separate baseline-contamination check, replace only the prior 110 with 1,010. The median remains 100 and MAD remains five, while the mean rises to 280. The original candidate's mean-based ratio then falls to about 0.5714, showing why baseline choice and anomalous records need separate inspection.
Context and failure modes
Agreement across two of three thresholds is a descriptive stability count, not a 66.67% probability that a trade will succeed. The threshold grid should be chosen without consulting future returns and should not be narrowed after results are known. A robust statistic can also discount legitimate exceptional activity; inspect the event type before labeling it a data problem. Keep raw quantities, revised quantities and the detector version so a changed signal has a traceable cause.
Practice task
Prior quantities are [50,50,50,50,60], and a candidate records 100. Compute the median, MAD and median ratio. Can the stated raw-MAD score be calculated? Describe a defensible reporting response without adding an arbitrary tiny denominator.
Worked practice answer
The median is 50. Absolute deviations are [0,0,0,0,10], so MAD is zero. The median ratio is 100/50 = two, but the raw-MAD score is undefined. Report that status and use a separately predeclared fallback rule, or exclude dispersion-score classification for this baseline. Replacing zero with a convenient small value after seeing the event would manufacture a large score and change the specification.