Enter Sample Data
Example Data Table
| Observation | Sample A | Sample B |
|---|---|---|
| 1 | 12 | 8 |
| 2 | 14 | 9 |
| 3 | 15 | 11 |
| 4 | 18 | 16 |
| 5 | 19 | 17 |
| 6 | 21 | 24 |
| 7 | 23 | 29 |
Formula Used
The Lepage test combines a rank-based location check and a rank-based scale check. It is useful when either central tendency, spread, or both may differ.
1. Pool both samples and assign midranks ri.
2. Compute the location score sum for Sample A: W = Σri.
3. Assign symmetric Ansari-Bradley scores ai from the outer ranks toward the center, averaging tied positions when needed.
4. Compute the scale score sum for Sample A: A = Σai.
5. Standardize both sums with Z = (S - E[S]) / √Var(S), where E[S] = mμ and Var(S) = mnσ² / (N - 1).
6. Form the Lepage statistic: K = Zlocation2 + Zscale2.
7. The calculator reports the approximate combined p-value with a chi-square distribution using two degrees of freedom.
How to Use This Calculator
- Paste Sample A values into the first box.
- Paste Sample B values into the second box.
- Set the significance level α, such as 0.05.
- Click the calculate button.
- Review the combined statistic and p-value first.
- Check the location Z score for directional shift.
- Check the scale Z score for dispersion change.
- Use the graph and detailed table for auditability.
- Download CSV or PDF when you need a report.
Practical Interpretation
This calculator treats Sample A as the reference group. A positive location component means Sample A tends to be larger. A negative location component means it tends to be smaller.
For the scale component, higher scores occur near the center. A positive standardized scale value therefore suggests Sample A is less dispersed. A negative value suggests Sample A is more dispersed.
The overall Lepage statistic is omnibus. It does not force you to choose between location and scale beforehand, making it useful in screening, quality comparison, process validation, and exploratory analysis.
Frequently Asked Questions
1. What does the Lepage test examine?
It tests whether two independent samples differ in location, scale, or both, using one combined nonparametric statistic built from rank information.
2. When is this test useful?
Use it when you want one procedure that can detect a shift in center, spread, or a mix of both, without assuming normality.
3. Does the calculator handle ties?
Yes. It assigns average midranks and average Ansari-Bradley scores for tied values, which is a practical approach for repeated observations.
4. What does a positive location component mean?
A positive location Z score means Sample A tends to contain larger observations than Sample B after pooling and ranking.
5. What does a positive scale component mean?
A positive scale Z score means Sample A is more concentrated near the center, so it appears less dispersed than Sample B.
6. Is the reported p-value exact?
No. The combined p-value shown here uses the common chi-square approximation with two degrees of freedom for the Lepage statistic.
7. Can I use very small samples?
You can, but extremely small samples reduce stability. Interpret results carefully and consider exact methods or resampling for critical decisions.
8. Why are there separate component statistics?
They help you understand whether the combined signal mostly comes from a location shift, a scale shift, or contributions from both.