How this calculation works
Check first- and second-order dominance between two finite empirical outcome distributions. The output evaluates CDF and integrated-CDF inequalities at all support knots and identifies violating locations rather than substituting a single distribution-distance number.
X≽₁Y iff F_X(t)≤F_Y(t) for all t. X≽₂Y iff ∫_(−∞)^t F_X(u)du≤∫_(−∞)^t F_Y(u)du for all t; larger outcomes preferred.A worked example
X=(2,2,2) and Y=(0,2,4) have the same mean. Their empirical CDFs cross, so neither first-order dominates the other. X second-order dominates Y because the constant outcome removes the mean-preserving spread, under the convention that larger outcomes are preferred.
Good to know
1–200 finite outcomes per sample, equal weight within each sample. Weak empirical inequalities with numerical tolerance and larger-is-better orientation. Exact piecewise-linear integrated-CDF logic on finite support; no population significance test, utility estimation, unequal weights or dominance under reversed outcome preferences.
Reference: MIT stochastic-dominance lecture notes (opens in a new tab) ↗
State whether larger outcomes are desirable
This page uses the conventional orientation in which more of the outcome is preferred. First-order dominance then compares cumulative probabilities of low outcomes: X dominates Y when its CDF never rises above the CDF of Y.
If the numbers represent costs, delays or losses, this preference orientation may be inappropriate. Negating both samples can reverse their direction consistently, but simply relabeling the output without changing the mathematical interpretation risks reading the dominance relationship backward.
Compare this with the Two sample Kolmogorov Smirnov empirical distance calculator. A KS distance does not establish which distribution satisfies each dominance order.
Empirical probabilities are equal within each submitted sample
Each observation in a sample carries the same probability, so its CDF jumps by one divided by that sample’s size at each occurrence. Repeated values contribute several such jumps at a common support location.
The two sample sizes can differ. Their empirical distributions are still comparable because each is normalized separately. The calculation does not infer survey weights or give a larger sample greater total probability; unequal within-sample weights would define a different input model.
First-order checks every support jump
Between consecutive pooled support values, both empirical CDFs are constant. Checking their difference immediately after every pooled support knot is therefore enough to decide all the first-order inequalities for these finite empirical distributions.
An output marked false includes support values where the requested inequality fails. Equality is allowed because the page reports weak dominance. Identical empirical distributions consequently satisfy the relation in both directions, rather than being falsely classified as incomparable.
Second-order compares integrated CDFs
Integrating an empirical CDF accumulates the expected shortfall below each threshold. Between support knots the integrated difference is linear, so endpoint checks determine its sign over each interval and the sample means control the final tail.
The second-order criterion corresponds to the larger-is-better increasing-concave preference orientation. It permits some CDF crossing, unlike first-order dominance. It does not say that every increasing utility prefers one sample unless the stronger first-order inequalities also hold.
The equal-mean spread gives a worked distinction
The default X always returns two. Y returns zero, two or four with equal probability, so both means are two but Y adds symmetric spread. X has a smaller integrated CDF through the relevant thresholds and thus second-order dominates Y.
Their ordinary CDFs cross around the central support. Neither first-order relation holds, making this a useful check that the two dominance orders are not being collapsed into a simple comparison of means or a single signed maximum distance.
A descriptive empirical ordering is not a significance test
The inequalities apply to the entered finite empirical distributions. They do not prove that the underlying populations satisfy the same relation, because observed support points and their frequencies are subject to sampling variation.
The page does not supply bootstrap bands, a stochastic-dominance test or a tolerance calibrated to measurement uncertainty. Its small arithmetic tolerance only handles numerical comparison. Treating that tolerance as a scientific equivalence margin would change the intended question.
Use counterexamples to understand incomparability
When dominance fails, a violating threshold explains which lower-tail probability or accumulated shortfall prevents the ordering. Examining both directions can show why no single consistent ranking follows under the chosen preference family.
That does not make either distribution universally better or worse. Different decision-makers can favor different aspects of incomparable outcomes. Keep costs, units, sample design and the utility assumptions visible rather than selecting whichever dominance direction supports a preferred conclusion.
A few questions, answered
Does a larger mean guarantee first-order dominance?
No. CDF inequalities must hold at every threshold, not only in the mean.
Can the CDFs cross under second-order dominance?
Yes. Integrated-CDF inequalities can hold even when ordinary CDFs cross.
What if the samples are identical?
Weak dominance allows equality, so both directions hold for identical empirical distributions.
Is this a population hypothesis test?
No. It reports deterministic inequalities for the entered empirical distributions only.