Atlas
statminds
NonparametricThe underlying model family class (e.g. GLM, linear model, categorical matrix, log-linear).Parametric ReferenceStatistical methods that assume a specific probability distribution family (typically normal).12-stage workflow

Moses Test of Extreme Reactions

Nonparametric test for scale/variability equality between two groups; detects if experimental group has more extreme scores (wider spread) than control, particularly at distribution tails..

Model familyNonparametric
Hypothesisone-tailed (typically tests if experimental > control variability)
AliasesMoses Test · Test of Extreme Reactions
G1
association
G2
description
Visual Overview Dashboard
1

What is it?

Moses Test of Extreme Reactions evaluates if a treatment triggers extreme responses (high dispersion/variance) in either direction compared to a control group.

2

When to use it

  • Dispersion Difference: Check if treatment increases variance (extreme low/high reactions).
  • Nonparametric: No normality requirements for distribution shapes.
3

Core Idea

Combines and ranks control and treatment. Measures the rank span containing all control observations. A wide span indicates treatment scores cluster at the extremes:

Control Span (Moses Rank boundary)
4

Hypotheses

H0: Control and treatment dispersion are identical
Ha: Treatment group displays extreme positive/negative reactions
5

How it works

  1. Combine Control and Treatment scores and sort.
  2. Determine the ranks of the Control observations.
  3. Locate minimum and maximum control ranks.
  4. Calculate Span: Span = Max Rank - Min Rank + 1. High span means treatment dominates the ends.
6

Assumptions

📊 Ordinal Scale: Outcomes are rankable.
👤 Independence: Control and treatment groups are independent.
7

Effect Size

Represented by the **control rank span width**. Wide spans relative to control sample size indicate strong extreme treatment responses.

8

Quick Example

GroupRanksMoses Span
Control (N=5)3, 4, 5, 6, 7Span = 5 (Identical)
Treatment1, 2, 8, 9, 10
Interactive Sandbox

Moses Extreme Reactions Live Laboratory

Stretch treatment variance dispersion to push control ranks to cluster together.

Presets
Treatment SD Stretch1.0
Size Control (N1)12
Size Treatment (N2)12
Sorted Combined Ranks (Amber: Control, Green: Treatment)Highlighted gray block defines the Control group rank span
123456789101112131415161718192021222324
Calculations Output
MetricValue
Min Control Rank1
Max Control Rank24
Moses Control Span (S)24
p-value (exact hypergeom)0.4500
Statistical Verdict
❌ Equal Dispersion
Control span fits standard expected overlap parameters (S = 24, p = 0.450). Fail to reject H0.
01Hypothesis test logic

Hypotheses

Pragmatic null and alternative hypotheses defined in mathematical notation.

A hypothesis is a question sharpened to a point. Ambiguity is the enemy of inference.
Logic Core
Null · H₀

H₀: The two groups have equal variability (scale)

Alternative · Hₐ

Hₐ: The experimental group has greater variability (wider spread, more extreme reactions)

Why it matters one-tailed (typically tests if experimental > control variability)

Tests SCALE (spread/variability), NOT location. Unlike Levene's test (which tests variance equality for any two groups), Moses test is specifically designed for experimental vs. control comparisons and is particularly sensitive to differences in the tails (extreme scores). If groups also differ in location, results may be difficult to interpret—ideally use when medians are similar.

02Model diagnostics

Assumptions

The core mathematical criteria needed to ensure that statistical testing remains unbiased and valid.

Build your analysis on rock, not sand. Verify the mathematical foundation before building the model.
Integrity Shield
6
Assumptions
1
Critical / High Severity
How to check
Design review; confirm no subject appears in both groups; check for matching or clustering
If violated
If paired/matched → use test for variance equality on differences (e.g., Pitman-Morgan test). If repeated measures → use variance comparison methods for repeated measures. If clustered → use mixed models with heterogeneous variance
How to check
Design review: identify which group serves as baseline/control vs. experimental/treatment. Moses test ranks all data, then examines span of control group within combined ranking
If violated
If no clear control group (two experimental groups) → use Levene's test, Mood's test, or Siegel-Tukey test (symmetric comparisons). If unclear which is control → run test both ways and compare, or use bidirectional test like Ansari-Bradley
How to check
Inspect variable type; verify values can be ordered from lowest to highest
If violated
If nominal (no ordering) → variance comparison not meaningful; use different analysis (e.g., chi-square for association). If binary → use logistic regression or risk ratio analysis
How to check
Quick
Compare medians: |Mdn₁ - Mdn₂| / pooled_IQR < 0.5 suggests similar location. Visualize: if boxplot medians are similar but box widths differ → scale difference. If medians differ substantially → both location AND scale differ
Rigorous
Run Mann-Whitney U test. If not significant (p > .05), locations are similar → Moses test isolates scale. If significant, locations differ → Moses result may reflect both location AND scale differences (confounded interpretation)
If violated
If locations differ: (1) Interpret carefully: Moses test may detect both location and scale differences; (2) Consider standardizing/centering data by group medians before test to remove location effects; (3) Report both location (Mann-Whitney) and scale (Moses) tests separately; (4) Use quantile regression to model specific quantiles if interested in upper/lower tail differences. Ideal: Moses test most interpretable when groups have similar medians but potentially different spreads
quantile regression
How to check
Quick
Minimum: control group n ≥ 5, experimental group n ≥ 5. Recommended: n_control ≥ 10, n_experimental ≥ 10 for adequate power. Moses test based on span of control group in ranked data, so very small control group (n<5) produces unstable estimates
Rigorous
Check control group size: n < 5 (inadequate), n = 5-10 (marginal, low power), n ≥ 10 (adequate). For small samples, use permutation test or bootstrap confidence intervals for variance ratio. Power analysis: Moses test has lower power than Levene's test for same sample size; compensate with 10-20% larger n
If violated
If n_control < 5 or n_experimental < 5: (1) Use exact permutation test (enumerate all possible rankings, compute span for each); (2) Use bootstrap resampling for confidence interval of variance ratio; (3) Use Levene's test (more robust to small samples); (4) Combine with additional data if possible. Report low power and interpret cautiously
How to check
Quick
Check control group IQR and range relative to full sample. If control group has suspiciously narrow range (e.g., IQR_control << IQR_experimental AND range_control << range_full), may indicate selection bias or restriction of range
Rigorous
Compare control group descriptive stats to expected population values. Check for: (1) Ceiling/floor effects in control (restricted range); (2) Outlier removal that disproportionately affected control; (3) Inclusion criteria that restricted control variability. If control is artificially homogeneous, Moses test will show inflated experimental variability
If violated
If control range restricted: (1) Investigate cause (selection bias? measurement issue?); (2) Check if restriction is legitimate (e.g., healthy controls expected to be less variable) or artifact (e.g., outlier removal); (3) Report restriction and interpret results in context; (4) Consider using robust scale measures (median absolute deviation) less sensitive to restriction; (5) If artifact, re-analyze with full data
03Residual Forensics

Diagnostics

Checking residual plots and indices to examine model deviations and ensure standard error integrity.

Trust, but verify. The outliers often hold more truth than the averages.
System Health
Essential checks
  1. Visual comparison: boxplots showing spread differences (compare box widths and whisker lengths)
  2. Check medians are similar (Moses tests scale; if locations differ, result confounded)
  3. Compare IQRs and ranges (quick scale check: IQR_ratio, range_ratio)
  4. Calculate variance ratio (σ²_experimental / σ²_control) as effect size
  5. Verify control group span is reasonable (not at extreme ends of combined ranking)
Recommended checks
  1. Levene's test for comparison (tests variance equality, complements Moses test)
  2. Q-Q plot comparing quantiles (shows where distributions differ—tails vs center)
  3. Coefficient of variation (CV) comparison: CV = SD/Mean × 100 (standardized variability)
  4. Violin plots or density plots to visualize distribution shapes and spreads
  5. Plot of ranks showing control span within combined data (visualize Moses test logic)
  6. Bootstrap confidence interval for variance ratio (robust effect size estimate)
  7. Compare variance at different trim levels (e.g., 10% trimmed variance—isolates tail effects)
  8. Sensitivity analysis: Moses test with/without outliers
  9. Siegel-Tukey test for comparison (alternative rank-based scale test)
04Live Instances

Applied Minds

Review concrete study examples, data layout guidelines, and copy executable syntax scripts.

Theory is the map. Practice is the terrain. Simulation bridges the gap.
Applied Wisdom
Example 01

Drug Side Effect Variability - ADHD Medication Adverse Events

Research question: Does ADHD medication (experimental) produce more variable side effect severity than placebo (control)? Design: RCT with n=50 (25 per group). Outcome: Side effect severity score 0-10 (ordinal). Moses test used because research question specifically asks if treatment creates MORE EXTREME reactions (some patients have severe side effects, others minimal), not just different average severity. This is classic 'extreme reactions' question perfect for Moses test.

GroupsPlacebo_Control · ADHD_Medication
Total n50
Outcome ScaleSide effect severity (0-10, ordinal)
# ==============================================================================
# Moses Test: ADHD Medication Side Effect Variability
# Research Question: Does medication produce more extreme/variable reactions?
# ==============================================================================

library(tidyverse)      # Data manipulation and visualization
library(DescTools)      # MosesTest() function
library(car)            # Levene's test for comparison
library(effectsize)     # Effect size calculations

set.seed(2025)

# Simulate data:
# Placebo: Low variability (homogeneous minor side effects)
# Medication: High variability (some severe, some minimal side effects)
data <- data.frame(
  group = rep(c("Placebo", "Medication"), each=25),
  side_effect_severity = c(
    # Placebo: narrow spread around 2-3
    pmin(10, pmax(0, rnorm(25, mean=2.5, sd=1.2))),
    # Medication: wide spread (bimodal: responders + severe reactors)
    pmin(10, pmax(0, c(
      rnorm(12, mean=1.5, sd=1.5),  # low side effects
      rnorm(13, mean=6.5, sd=2.0)   # high side effects
    )))
  )
)

data$group <- factor(data$group, levels = c("Placebo", "Medication"))

# ==============================================================================
# STEP 1: DESCRIPTIVE STATISTICS
# ==============================================================================

cat("\n=== DESCRIPTIVE STATISTICS ===\n")

descriptives <- data %>%
  group_by(group) %>%
  summarise(
    n = n(),
    mean = mean(side_effect_severity),
    sd = sd(side_effect_severity),
    median = median(side_effect_severity),
    IQR = IQR(side_effect_severity),
    min = min(side_effect_severity),
    max = max(side_effect_severity),
    range = max - min,
    cv = (sd / mean) * 100  # coefficient of variation
  )
print(descriptives)

cat("\nKey observation: Check if SDs/IQRs differ(scale) while medians similar(location).\n")

# ==============================================================================
# STEP 2: ASSUMPTION CHECKING
# ==============================================================================

cat("\n=== ASSUMPTION CHECKS ===\n")

# Assumption 1: Independence
cat("1. Independence: Between-subjects RCT design confirmed(independent groups).\n")

# Assumption 2: Adequate sample size
cat("\n2. Sample Size Check:\n")
n_placebo <- sum(data$group == "Placebo")
n_medication <- sum(data$group == "Medication")
cat(sprintf("   Placebo(control): n = %d(≥10 ✓)\n", n_placebo))
cat(sprintf("   Medication(experimental): n = %d(≥10 ✓)\n", n_medication))
cat("   Adequate sample sizes for Moses test.\n")

# Assumption 3: Check if medians are similar (critical for Moses test interpretation)
cat("\n3. Location Similarity Check(for clear scale interpretation):\n")
placebo_vals <- data %>% filter(group == "Placebo") %>% pull(side_effect_severity)
medication_vals <- data %>% filter(group == "Medication") %>% pull(side_effect_severity)

mdn_placebo <- median(placebo_vals)
mdn_medication <- median(medication_vals)
mdn_diff <- abs(mdn_placebo - mdn_medication)
pooled_iqr <- (IQR(placebo_vals) + IQR(medication_vals)) / 2

cat(sprintf("   Placebo median: %.2f\n", mdn_placebo))
cat(sprintf("   Medication median: %.2f\n", mdn_medication))
cat(sprintf("   Median difference: %.2f\n", mdn_diff))
cat(sprintf("   Relative difference: %.2f (< 0.5 suggests similar location)\n", 
    mdn_diff / pooled_iqr))

# Mann-Whitney to formally test location
mw_result <- wilcox.test(medication_vals, placebo_vals)
cat(sprintf("\n   Mann-Whitney U test: W = %.1f, p = %.4f\n", 
    mw_result$statistic, mw_result$p.value))
if(mw_result$p.value > 0.05) {
  cat("   Locations are similar(p > .05) → Moses test isolates SCALE difference. ✓\n")
} else {
  cat("   Locations differ(p < .05) → Moses result may reflect both location AND scale.\n")
}

# ==============================================================================
# STEP 3: VISUALIZATIONS
# ==============================================================================

cat("\n=== GENERATING VISUALIZATIONS ===\n")

# Visualization 1: Boxplots (focus on spread)
p1 <- ggplot(data, aes(x=group, y=side_effect_severity, fill=group)) +
  geom_boxplot(alpha=0.7, outlier.shape=NA) +
  geom_jitter(width=0.2, alpha=0.5, size=2.5) +
  stat_summary(fun=median, geom="point", shape=23, size=4, fill="red") +
  labs(title="Side Effect Severity: Placebo vs. Medication",
       subtitle="Moses test: Is medication group more variable(wider box/whiskers)?",
       x="Group", y="Side Effect Severity(0-10)") +
  theme_minimal() +
  theme(legend.position="none")
print(p1)

# Visualization 2: Violin plots (show full distribution shape)
p2 <- ggplot(data, aes(x=group, y=side_effect_severity, fill=group)) +
  geom_violin(alpha=0.6, trim=FALSE) +
  geom_boxplot(width=0.1, fill="white", alpha=0.8) +
  labs(title="Distribution Shapes: Medication Shows Greater Spread",
       subtitle="Wider violin = more variability(extreme reactions)",
       x="Group", y="Side Effect Severity") +
  theme_minimal() +
  theme(legend.position="none")
print(p2)

# Visualization 3: Q-Q plot (compare quantiles)
placebo_quantiles <- quantile(placebo_vals, probs = seq(0, 1, 0.1))
medication_quantiles <- quantile(medication_vals, probs = seq(0, 1, 0.1))

qq_data <- data.frame(
  placebo_q = placebo_quantiles,
  medication_q = medication_quantiles
)

p3 <- ggplot(qq_data, aes(x=placebo_q, y=medication_q)) +
  geom_point(size=3, color="blue") +
  geom_abline(slope=1, intercept=0, linetype="dashed", color="red") +
  labs(title="Q-Q Plot: Medication vs. Placebo",
       subtitle="Points above line = medication more variable at that quantile",
       x="Placebo Quantiles", y="Medication Quantiles") +
  theme_minimal()
print(p3)

# Visualization 4: Rank plot showing control span (Moses test logic)
data_ranked <- data %>%
  arrange(side_effect_severity) %>%
  mutate(rank = row_number())

# Identify control group span
control_ranks <- data_ranked %>% 
  filter(group == "Placebo") %>% 
  pull(rank)
control_span <- max(control_ranks) - min(control_ranks) + 1

p4 <- ggplot(data_ranked, aes(x=rank, y=side_effect_severity, 
                               color=group, shape=group)) +
  geom_point(size=3, alpha=0.7) +
  geom_segment(aes(x=min(control_ranks), xend=max(control_ranks),
                   y=-0.5, yend=-0.5), color="darkgreen", size=2) +
  annotate("text", x=mean(control_ranks), y=-1, 
           label=sprintf("Control span = %d", control_span), 
           color="darkgreen", fontface="bold") +
  labs(title="Moses Test Logic: Control Group Span in Combined Ranking",
       subtitle="Short span = control clustered(less variable); Medication more spread out",
       x="Rank(Combined Data)", y="Side Effect Severity") +
  theme_minimal()
print(p4)

# ==============================================================================
# STEP 4: MOSES TEST OF EXTREME REACTIONS
# ==============================================================================

cat("\n=== MOSES TEST OF EXTREME REACTIONS ===\n")

# Moses test: tests if experimental group (medication) has greater variability
# Uses DescTools package
moses_result <- MosesTest(
  x = medication_vals,  # experimental group
  y = placebo_vals,     # control group
  alternative = "greater"  # one-sided: experimental > control variability
)

print(moses_result)

cat("\n--- Test Summary ---\n")
cat(sprintf("Control group(Placebo): n = %d\n", n_placebo))
cat(sprintf("Experimental group(Medication): n = %d\n", n_medication))
cat(sprintf("Control span: %d\n", moses_result$statistic))
cat(sprintf("p-value: %.4f\n", moses_result$p.value))
cat(sprintf("Result: %s at α = .05\n",
    ifelse(moses_result$p.value < 0.05, "SIGNIFICANT", "Not significant")))

if(moses_result$p.value < 0.05) {
  cat("\nInterpretation: Medication group has significantly greater variability\n")
  cat("(more extreme reactions) than placebo. This indicates responder heterogeneity:\n")
  cat("some patients experience severe side effects, others minimal.\n")
}

# ==============================================================================
# STEP 5: EFFECT SIZE
# ==============================================================================

cat("\n=== EFFECT SIZE ===\n")

# Variance ratio (primary effect size for scale tests)
var_medication <- var(medication_vals)
var_placebo <- var(placebo_vals)
variance_ratio <- var_medication / var_placebo

cat(sprintf("Variance ratio(Medication / Placebo): %.3f\n", variance_ratio))
cat("Interpretation: ratio = 1.0 (equal variability), >1.5 (substantially more variable)\n")

# IQR ratio
iqr_ratio <- IQR(medication_vals) / IQR(placebo_vals)
cat(sprintf("\nIQR ratio(Medication / Placebo): %.3f\n", iqr_ratio))

# Coefficient of variation ratio
cv_placebo <- (sd(placebo_vals) / mean(placebo_vals)) * 100
cv_medication <- (sd(medication_vals) / mean(medication_vals)) * 100
cv_ratio <- cv_medication / cv_placebo

cat(sprintf("\nCoefficient of Variation:\n"))
cat(sprintf("   Placebo: %.1f%%\n", cv_placebo))
cat(sprintf("   Medication: %.1f%%\n", cv_medication))
cat(sprintf("   CV ratio: %.2f\n", cv_ratio))

# ==============================================================================
# STEP 6: COMPARE WITH LEVENE'S TEST
# ==============================================================================

cat("\n=== COMPARISON: LEVENE'S TEST FOR VARIANCE EQUALITY ===\n")
cat("Levene's test(parametric) vs. Moses test(nonparametric)\n\n")

levene_result <- leveneTest(side_effect_severity ~ group, data=data)
print(levene_result)

cat("\n--- Comparison Summary ---\n")
cat(sprintf("Moses test: p = %.4f (%s)\n", 
    moses_result$p.value,
    ifelse(moses_result$p.value < 0.05, "significant", "not significant")))
cat(sprintf("Levene's test: p = %.4f (%s)\n",
    levene_result$`Pr(>F)`[1],
    ifelse(levene_result$`Pr(>F)`[1] < 0.05, "significant", "not significant")))

if(moses_result$p.value < 0.05 && levene_result$`Pr(>F)`[1] < 0.05) {
  cat("\nBoth tests agree: variability differs significantly.\n")
  cat("Convergent evidence strengthens conclusion.\n")
}

# ==============================================================================
# STEP 7: INTERPRETATION
# ==============================================================================

cat("\n=== INTERPRETATION ===\n")

if(moses_result$p.value < 0.05) {
  cat("\nThe Moses test showed significantly greater variability in the medication\n")
  cat(sprintf("group compared to placebo, p = %.4f. The medication group(SD=%.2f,\n",
      moses_result$p.value, sd(medication_vals)))
  cat(sprintf("IQR=%.2f, range=%.1f-%.1f) exhibited more extreme reactions than placebo\n",
      IQR(medication_vals), min(medication_vals), max(medication_vals)))
  cat(sprintf("(SD=%.2f, IQR=%.2f, range=%.1f-%.1f).\n",
      sd(placebo_vals), IQR(placebo_vals), min(placebo_vals), max(placebo_vals)))
  cat(sprintf("\nVariance ratio: %.2f (medication %.0fx more variable than placebo).\n",
      variance_ratio, variance_ratio))
  cat("\nClinical significance: Responder heterogeneity suggests some patients are\n")
  cat("highly susceptible to side effects while others tolerate medication well.\n")
  cat("Consider investigating predictors of adverse reactions for personalized dosing.\n")
} else {
  cat("\nThe Moses test showed no significant difference in variability between\n")
  cat("groups. Both medication and placebo produced similar variability in side effects.\n")
}

# ==============================================================================
# APA REPORTING TEMPLATE
# ==============================================================================

cat("\n=== APA-STYLE REPORTING ===\n")
cat("A Moses test of extreme reactions was conducted to compare side effect\n")
cat("variability between placebo(control, n=25) and ADHD medication(experimental,\n")
cat("n=25). Moses test evaluates whether the experimental group exhibits greater\n")
cat("variability(more extreme scores) than control. Groups had similar medians\n")
cat(sprintf("(Placebo: Mdn=%.1f, Medication: Mdn=%.1f, Mann-Whitney p=%.3f), isolating\n",
    mdn_placebo, mdn_medication, mw_result$p.value))
cat(sprintf("scale from location effects. Results showed %s, p = %.4f.\n",
    ifelse(moses_result$p.value < 0.05, 
           "significantly greater variability in medication group",
           "no significant variability difference"),
    moses_result$p.value))

if(moses_result$p.value < 0.05) {
  cat(sprintf("\nThe medication group(SD=%.2f, IQR=%.2f) was %.1fx more variable than\n",
      sd(medication_vals), IQR(medication_vals), variance_ratio))
  cat(sprintf("placebo(SD=%.2f, IQR=%.2f), as confirmed by Levene's test(F=%.2f,\n",
      sd(placebo_vals), IQR(placebo_vals), levene_result$`F value`[1]))
  cat(sprintf("p<.001). This responder heterogeneity—with some patients experiencing\n"))
  cat("severe side effects and others minimal reactions—suggests individual\n")
  cat("differences in drug metabolism or sensitivity. Clinical implication: identify\n")
  cat("predictive biomarkers for personalized treatment planning.\n")
}
Interpretation Blueprint

Mood's p = .003, Levene's p = .001 (both significant). Medication group 2.8x more variable than placebo (variance ratio = 2.8, IQR ratio = 2.3). Similar medians (M-W p = .42) but very different spreads. Finding demonstrates responder heterogeneity: some patients have severe side effects (score 8-9), others minimal (score 1-2), while placebo shows consistent mild effects (scores 2-3). Critical for personalized medicine.

05Tactical Pivots

Alternatives

Structured fallback pathways for choosing alternative tests when normality or slopes requirements fail.

When the path is blocked, pivot. Rigor is not rigidity; it is the intelligent adaptation to reality.
Adaptive Strategy
Measurement Precision Ladder Ideal · Continuous / Ratio
Ratio
Maintain Moses logic. Optimal for auditing if an intervention 'Splits' the group into extreme responders vs. non-responders.
Peak Sensitivity
Interval
Ideal for Dispersion Forensics. Ensure the 'Span' of the control group provides a stable clinical anchor.
Standard Robustness
Ordinal / Nominal
Abandon Moses. Use Chi-Square or Diversity Indices to model categorical spread.
Information Suicide
Temporal Trajectory Audit Static Dispersion Snapshot
Static Variance
Single point audit.
Stay with Moses Test. Identify if treatment increases the overall range of the outcome.
Massive-N
N > 50.
Pivot to Levene's Test or Brown-Forsythe to audit mean-based variance differences.
Adaptive Technical Safeguards · adaptive safeguards
focus on mean difference
  • Mann-Whitney U Test — Switch if you care about the 'Central Tendency' rather than the extreme spread.
equal variance priority
  • Siegel-Tukey Test — A non-parametric alternative that audits dispersion while protecting the median rank.
extreme ties detected
  • Permutation Dispersion Strike — Use exact significance to bypass the rank-tie penalty in the range calculation.
06Adjusted Comparisons

Post-hoc

Group mean comparisons and correction controls (e.g. Tukey HSD, Bonferroni) to protect against Family-Wise Error Rates.

The omnibus test opens the door; post-hoc analysis explores the room.
Forensic Detail
Adjusted Comparisons
  • Compare with Levene's test (parametric alternative)
  • Compare with Brown-Forsythe test
  • Compare with Ansari-Bradley test (another nonparametric spread test)
  • Examine trimming parameter sensitivity (default vs custom span)
  • Bootstrap confidence intervals for spread difference
Interpretation Guidelines

Moses test compares variability/spread between two groups. Post-hoc tests are not applicable.

07Standardized scale impact

Effect Size

Understanding effect sizes (e.g., Cohen's d, Partial Eta-Squared) and clinical impact benchmarks.

Significance is noise. Magnitude is the signal. Measure the impact, not just the probability.
Impact Magnitude

Ratio of variances: σ²₁/σ²₂. Interpretation: 1.0 = equal variability, 1.5 = 50% more variable, 2.0 = twice as variable, >3.0 = substantially more variable. Most intuitive scale effect size. Can be calculated with/without trimming to assess tail contributions.

Ratio of interquartile ranges: IQR₁/IQR₂. Robust to outliers. Focuses on middle 50% of data. Interpretation similar to variance ratio but less influenced by extreme values. Useful when outliers present or distributions skewed.

Ratio of coefficients of variation: (SD₁/Mean₁)/(SD₂/Mean₂). Standardizes by mean, useful when groups differ in location as well as scale. Unitless measure allowing comparison across different scales. Interpretation: >1.5 indicates substantially greater relative variability.

Ratio of ranges: (Max₁-Min₁)/(Max₂-Min₂). Simple but sensitive to single extreme value. Useful for initial exploration but not recommended as primary effect size due to outlier sensitivity. Consider interquartile range instead.

Recommended Metric: Report variance ratio as primary effect size (most standard). Supplement with IQR ratio if outliers present or distributions non-normal. Include coefficient of variation ratio if groups also differ in location (helps separate absolute from relative variability). Always report raw descriptive statistics (means, SDs, medians, IQRs) alongside ratios for full interpretability.
Small
0.2
Medium
0.5
Large
0.8
0.50
Report variance ratio as primary effect size (most standard). Supplement with IQR ratio if outliers present or distributions non-normal. Include coefficient of variation ratio if groups also differ in location (helps separate absolute from relative variability). Always report raw descriptive statistics (means, SDs, medians, IQRs) alongside ratios for full interpretability.
Recommended Measure
4
Available Metrics
ReportUse Report variance ratio as primary effect size (most standard). Supplement with IQR ratio if outliers present or distributions non-normal. Include coefficient of variation ratio if groups also differ in location (helps separate absolute from relative variability). Always report raw descriptive statistics (means, SDs, medians, IQRs) alongside ratios for full interpretability. to represent clinical impact magnitude.
08Statistical Power

Sample Size

Guidelines for minimum sample requirements and power analysis parameters.

An underpowered study is an ethical failure. Respect the data by collecting enough of it.
Power Protocol
Floor Requirements

Minimum: control group n ≥ 5, experimental group n ≥ 5. Recommended: n ≥ 10 per group for adequate power and stable span estimates. Moses test has lower power than Levene's test for equivalent sample size.

Effect SizeParametersRequired n
Small EffectVariance ratio ≈ 1.5Total N ≈ 200
Medium EffectVariance ratio ≈ 2.0Total N ≈ 100
Large EffectVariance ratio ≈ 3.0Total N ≈ 40
Key considerations

Power increases with larger control group (Moses test references control span). Balanced design (equal n) is NOT required but reduces sampling variability. Extremely unbalanced designs (e.g., n₁=50, n₂=10) reduce power; aim for ratio < 3:1. Presence of outliers decreases power for variance tests; consider robust alternatives if >5% outliers. Moses test most powerful when experimental group has more extreme values in tails.

G*Power StrategyNo standard power analysis software for Moses test. Use simulation or approximate with Levene's test power (Moses requires ~10-20% larger n for equivalent power). For Levene's test: use G*Power → t-tests → Means: Difference between two independent means (two groups) → select 'a priori' → input variance ratio as effect size.
09APA narrative blueprint

Reporting

How to compile statistical results into publication prose matching APA and journal style guides.

Data does not speak for itself. It requires a translator. Be clear, be precise, be honest.
Narrative Arc
Worked APA paragraph example
A Moses test of extreme reactions compared side effect variability between placebo (control, n=25) and ADHD medication (experimental, n=25). The Moses test evaluates whether the experimental group exhibits more extreme scores (greater variability) than control, particularly in distribution tails. Groups had similar medians (Placebo: Mdn=2.5, Medication: Mdn=3.0, Mann-Whitney U p=.42), isolating scale from location effects. Results showed significantly greater variability in the medication group, p = .003. The medication group (SD=2.8, IQR=4.2, range=0.5-9.5) was 2.8 times more variable than placebo (SD=1.2, IQR=1.8, range=1.0-5.0), variance ratio = 2.8, as confirmed by Levene's test (F=15.3, p=.001). This responder heterogeneity—with some patients experiencing severe side effects (scores 8-9) and others minimal reactions (scores 1-2), while placebo showed consistent mild effects (scores 2-3)—suggests individual differences in drug metabolism or sensitivity. Clinical implication: Identify predictive biomarkers (genetic polymorphisms, comorbidities) to guide personalized treatment planning and minimize adverse reactions through individualized dosing.
Reusable template

A Moses test of extreme reactions was conducted to compare outcome variability between Control group (n=X) and Experimental group (n=X). Groups had similar/different medians (Control: Mdn=XX, Experimental: Mdn=XX, Mann-Whitney p=.XX), isolating scale from location effects / indicating both location and scale differences. Results showed significantly greater/no significant difference in variability in the experimental group, p = .XXX. The experimental group (SD=XX, IQR=XX) was X.Xx more variable than control (SD=XX, IQR=XX), variance ratio = X.XX. If significant: This finding suggests interpretation of extreme reactions/responder heterogeneity. Include Levene's test for comparison if conducted. Clinical/practical implications.

Essential statistics to report
  • p-value
  • sample sizes (n per group)
  • descriptive statistics for both groups (means, SDs, medians, IQRs, ranges)
  • effect size (variance ratio, IQR ratio, and/or CV ratio)
  • Mann-Whitney U result if testing location similarity
  • Levene's test result if comparing with parametric approach
  • interpretation of what the variability difference means (extreme reactions, responder heterogeneity, inconsistent performance)
10Exhibit Builder

Manuscript Lab

Copy standard summary tables and forensic reporting grids to outline analysis details.

Table 1: Moses Test for Extreme Reactions (Dispersion)
GroupRange of RanksSpan (Statistic)p-valueConclusion
Group A72.445.012Significantly More Variable
Group B25.1
Note. N1 = 40, N2 = 40. Testing if Group A has a wider range of responses than Group B.
p = .012Identifies the 'Polarization Effect'. The treatment doesn't just shift scores; it makes outcomes less predictable, creating both high-responders and low-responders.
Header glossary

The Range Metric. Measures the distance between the highest and lowest ranks in the group, after trimming outliers.

The 'Hidden' effect. Some treatments might not change the mean, but they might make people much more 'unstable' or 'diverse' in their response.

11Algorithmic Logic

Command Center

Syntax libraries and function parameters for executing calculations in stats packages.

Code is the modern laboratory. Clean execution ensures reproducible discovery.
Execution Engine
# 1. Execute Moses Test for Extreme Reactions
DescTools::MosesTest(score ~ group, data = df)
Library stack
R
DescTools
Python
scipy.stats
Elite Forensic Strike

Traditional tests focus on 'The Average'. Moses focuses on 'The Spread'. Use it to detect if a treatment works great for some but fails for others.

# Execute Ansari-Bradley Test for dispersion comparison
coin::ansari_test(score ~ factor(group), data = df)
12The Over-adjustment Trap

Common Mistakes

Analytical caveats and corrections to maintain modeling integrity.

Wisdom is learning from the failures of others. Anticipate the error before it occurs.
Defensive Logic
Why it's wrong
Moses test is designed to test SCALE (variability), not location. If groups have very different medians/means (e.g., experimental mean = 50, control mean = 70), significant Moses result could reflect BOTH location AND scale differences, making interpretation ambiguous. You won't know if experimental group is 'more variable' or just 'shifted higher/lower with some variability'. Ideally, Moses test should be used when locations are similar, isolating the scale effect.
The correction
ALWAYS check location first: (1) Run Mann-Whitney U test to test medians; (2) If p > .05 (locations similar) → Moses test cleanly tests scale (IDEAL scenario); (3) If p < .05 (locations differ) → interpret Moses cautiously: 'both location and scale differ' or standardize data (subtract group medians) before Moses test to remove location effect. Report both location and scale tests separately. If primarily interested in scale, consider residualizing or matching on location.
Why it's wrong
Moses test is ASYMMETRIC: control group defines the reference span, experimental group is tested for greater variability. If you switch groups, you get different results. Unlike Levene's test (symmetric), Moses test is specifically designed for experimental vs. control comparison. Arbitrary assignment of 'control' invalidates test logic—you must have a priori reason to designate one group as baseline.
The correction
ALWAYS designate control group based on study design, not convenience: (1) In RCT → placebo/standard treatment = control, new drug/intervention = experimental; (2) In observational study → healthy/typical group = control, clinical/atypical = experimental; (3) If no clear control (two experimental groups) → use Levene's test or Siegel-Tukey test (symmetric tests) instead. Never swap groups to get desired p-value—this is data manipulation.
Why it's wrong
These tests are related but different: Moses test = nonparametric, asymmetric (experimental vs. control), span-based, particularly sensitive to tails. Mood's test = nonparametric, symmetric, median-based scale test. Levene's test = parametric (but robust), symmetric, tests variance equality. Using wrong test leads to inappropriate inference. E.g., Levene's assumes approximately normal data; Moses does not. Mood's is symmetric; Moses is directional (experimental > control).
The correction
Choose test based on design and assumptions: (1) Moses test: when you have clear control group, want nonparametric approach, and suspect experimental group has more extreme reactions; (2) Mood's test: for symmetric comparison of two groups' scales nonparametrically; (3) Levene's test: for general variance equality (2+ groups), robust parametric approach, or when normality approximately holds. Can run multiple tests for sensitivity analysis but report all.
Why it's wrong
p-value indicates statistical significance, not practical importance. With large samples, trivial variance differences become 'significant'. With small samples, large differences may be 'non-significant'. Effect size (variance ratio, IQR ratio) answers 'HOW MUCH more variable?' which is critical for interpreting practical/clinical importance. E.g., variance ratio = 1.05 (5% more variable, trivial) vs. 3.0 (3x more variable, substantial).
The correction
ALWAYS report effect size: (1) Variance ratio (primary): σ²_experimental / σ²_control; (2) IQR ratio (robust alternative); (3) Raw descriptive stats (SDs, IQRs, ranges) for both groups. Interpret: ratio = 1.0 (equal), 1.5 (50% more variable, moderate), 2.0 (2x more variable, large), >3.0 (very large). Example: 'Experimental group was 2.3x more variable (SD=18) than control (SD=8), variance ratio = 2.25, p = .003, indicating substantial responder heterogeneity.' Effect size essential for meta-analysis and clinical decision-making.
Why it's wrong
Moses test relies on control group span in combined ranking. With very small control group (e.g., n=5), span estimate is highly unstable—a single outlier can dramatically affect span, leading to unreliable p-values (typically too liberal, inflating Type I error). Power is also extremely low with small samples. Moses test requires larger samples than parametric tests for equivalent power.
The correction
Check sample sizes: (1) If n_control < 10 or n_experimental < 10 → use exact permutation test, bootstrap confidence intervals for variance ratio, or switch to Levene's test (more robust to small samples); (2) If total N < 20 → consider combining studies (meta-analysis) or interpreting with extreme caution (report low power). Minimum recommended: n ≥ 10 per group. Better: n ≥ 20 per group. Report actual power post-hoc if n is marginal.
Why it's wrong
Moses test (nonparametric) and Levene's test (parametric but robust) test similar hypotheses (variance equality) using different methods. If they agree → strong evidence. If they disagree → suggests one method's assumptions violated or test is picking up different aspects (tails vs. overall variance). Not comparing means you miss potential violations or nuances in interpretation.
The correction
ALWAYS run both Moses and Levene's tests and report results: (1) Both significant → strong convergent evidence (variances differ); (2) Moses significant, Levene's not → suggests tail differences (extreme values) rather than overall variance (interesting finding!); (3) Levene's significant, Moses not → unusual, suggests middle spread differs but tails similar; (4) Both non-significant → variances likely equal. Comparing tests strengthens inference and helps identify what aspect of scale differs.
Why it's wrong
Moses test p-value tells you IF variability differs, not WHY or HOW. Groups could differ in: (1) Overall spread (uniform wider distribution); (2) Tail extremity (same middle, more outliers); (3) Shape (e.g., bimodal vs. unimodal); (4) Skewness. Without visualization (boxplots, density plots, Q-Q plots), you miss the pattern driving the difference, which is critical for interpretation and actionable recommendations.
The correction
ALWAYS visualize before and after testing: (1) Boxplots: compare box widths and whisker lengths (spread); (2) Violin or density plots: see full distribution shapes (bimodality? skewness?); (3) Q-Q plots: identify where distributions differ (tails? middle?); (4) Strip plots with medians: see individual points and clustering. Describe visualization results in interpretation: 'Experimental group showed wider spread particularly in upper tail (scores >80), with several extreme high performers absent in control group, creating bimodal distribution.' This adds depth beyond p-value.
Why it's wrong
Moses test does NOT test central tendency (means or medians). It tests SCALE (spread/variability). Two groups can have identical means/medians but vastly different variability, and Moses test would be significant. Conversely, groups with different means but similar variability would not show significant Moses result. Confusing Moses test (scale) with t-test (means) or Mann-Whitney (medians) leads to incorrect interpretation like 'Experimental group scored higher' when actually 'Experimental group is more variable'.
The correction
Be clear about what Moses tests: VARIABILITY (spread, scale), not location (means/medians). Report location tests separately: 'Groups had similar medians (Mann-Whitney p = .52) but significantly different variability (Moses p = .003). The experimental group (SD=18) was 2x more variable than control (SD=9), indicating more extreme reactions—some patients improved greatly (>80), others minimally (<40), while control showed consistent moderate improvement (60-70).' Always distinguish location from scale in reporting.
13Academic Lineage

References

Scholarly lineage and citation keys grounding the statistical framework.

We stand on the shoulders of giants. Honor the source of the method.
Academic Lineage
[1]
Moses, L. E. (1963). Rank tests of dispersion. The Annals of Mathematical Statistics, 34(3), 973-983.
Original paper introducing Moses test of extreme reactions for comparing variability between experimental and control groups.
doi: 10.1214/aoms/1177704020
[2]
Siegel, S., & Castellan, N. J. (1988). Nonparametric Statistics for the Behavioral Sciences (2nd ed.). McGraw-Hill.
Comprehensive coverage of Moses test with examples and comparison to other scale tests. Chapter 9 covers tests of variability including Moses, Siegel-Tukey, and Ansari-Bradley tests.
[3]
Conover, W. J. (1999). Practical Nonparametric Statistics (3rd ed.). Wiley.
Detailed treatment of Moses test including power comparisons, handling of ties, and practical recommendations. Section 5.9 covers rank tests for scale.
[4]
Kofler, M. J., Rapport, M. D., Sarver, D. E., Raiker, J. S., Orban, S. A., Friedman, L. M., & Kolomeyer, E. G. (2013). Reaction time variability in ADHD: A meta-analytic review of 319 studies. Clinical Psychology Review, 33(6), 795-811.
Empirical support for RT variability as ADHD marker. Meta-analysis showing ADHD children have 50-100% greater RT variability than controls with similar mean RT, validating need for variability tests like Moses test.
doi: 10.1016/j.cpr.2013.06.001
[5]
Levene, H. (1960). Robust tests for equality of variances. In I. Olkin (Ed.), Contributions to Probability and Statistics: Essays in Honor of Harold Hotelling (pp. 278-292). Stanford University Press.
Classic reference for Levene's test, a parametric alternative to Moses test. Useful for comparing parametric vs. nonparametric approaches to variance equality testing.
[6]
Mood, A. M. (1954). On the asymptotic efficiency of certain nonparametric two-sample tests. The Annals of Mathematical Statistics, 25(3), 514-522.
Theoretical foundation for Mood's test (alternative nonparametric scale test). Discusses efficiency of rank-based scale tests relative to parametric F-test.
doi: 10.1214/aoms/1177728719
statminds · MosesMind reference · v2.2 · updated 2026-01-1715 of 15 sections