Home • SimpleStats • User Guide and Documentation

☰ Menu
We are updating all the pages, it will be complete soon!

Analyze/Stats: Baumgartner-Weiss-Schindler (BWS) Test

The Baumgartner-Weiss-Schindler (BWS) test is a statistical method used to compare two groups of data and determine whether they come from the same distribution. Unlike other common tests (like the Kolmogorov-Smirnov or Wilcoxon tests), the BWS test is particularly good at detecting differences in the tails of distributions—where extreme values lie.

Why Use This Test?

Unlike standard comparison tests that focus primarily on differences in means (like the t-test) or general distribution shapes (like the Kolmogorov-Smirnov test), the BWS test specifically emphasizes detecting discrepancies in the tails of distributions – the regions containing extreme high and low values.

This makes it uniquely powerful for situations where differences might not affect the average but could be important in outlier cases, such as comparing medical treatments where rare but severe reactions matter, or analyzing product reliability where failure extremes are critical. The test doesn’t require normally distributed data and maintains good statistical power even with moderate sample sizes.

When Should You Use the BWS Test?

  • You want to compare two independent groups (e.g., treatment vs. control).
  • You need high sensitivity to differences in the tails (not just the average).
  • Your sample sizes are small or moderate (works well even with limited data).
  • You prefer a nonparametric test (no assumption of normal distribution).

Common Alternatives (When BWS Isn’t the Best Fit)

How to Interpret the Results

The BWS test returns two key numbers:

  1. Test Statistic – Measures how different the two distributions are (larger values mean greater differences).
  2. P-value – Tells you whether the difference is statistically significant.

This is how you see the BWS results with SimpliStats

Decision Rule:
  • If p-value < 0.05 (or your chosen significance level): Reject the null hypothesis (the two groups likely have different distributions).
  • If p-value ≥ 0.05: No strong evidence of a difference (but doesn’t prove they’re the same).
Example:

Suppose you compare two teaching methods (Group A vs. Group B) and get:

  • BWS Statistic = 5.13
  • P-value = 0.0029

Since 0.0029 < 0.05, you conclude:
“There is statistical evidence that the two groups perform differently.”

How the Function is Called

				
					import numpy as np
from scipy.stats import bws_test
bws_test(x, y, alternative="")
				
			

Input

  • x and y: arrays of samples. Each arrays is one data column.
  • alternative: The alternative hypothesis (“two-sided”, “less”, “greater”).

Output

  • BWS-statistic
  • Null Distribution Size
  • p-value

Conclusion

The BWS test is a powerful tool for detecting differences between two datasets, especially when small or extreme variations matter. Unlike simpler tests, it focuses on the entire distribution, not just averages or medians.