Bland-Altman Plotter
Bland-Altman limits of agreement and Passing-Bablok regression from two methods measured on the same samples.
Paste two columns of measurements taken on the same samples and see how far apart the methods sit on average, as a Bland-Altman plot, and whether that gap changes across the measuring range, by Passing-Bablok regression.
The left column is X and the right column is Y. Differences are always Y − X, so putting the established method in X makes the sign read as “how much higher the new method runs”.
One sample per line, the two values separated by a tab, a space or a comma. Copying two columns straight out of a spreadsheet works. Calculated from 3 pairs and accepted up to 500.
A correlation coefficient does not answer whether two methods agree: two methods that are always 5 units apart correlate perfectly. So this tool reports Bland-Altman, which shows how far apart they are, alongside Passing-Bablok, which shows whether that distance is constant.
Bland-Altman takes the difference (Y − X) and the average of each pair, then reports the mean of the differences and the limits of agreement at mean ± 1.96 SD. The standard deviation is the sample one (n − 1).
Passing-Bablok is a non-parametric regression for the case where both axes carry error. It takes the slope between every pair of points and uses their median — a shifted median, because the pairwise slopes are not independent and the plain median would be biased. The intercept is the median of y − b·x.
- Pairs with the same x and the same y — the same point twice — are dropped. Pairs with the same x but different y are kept as a vertical slope.
- Pairs whose slope is exactly −1 are dropped, as the paper directs. That is what makes the fit of Y on X agree with the fit of X on Y.
- The shift K is the number of pairwise slopes below −1. Some packages define that step differently, which can move the last digits, so N and K are shown on screen.
- Confidence intervals follow the rank-order method from the original paper, two-sided 95%. No bootstrap is used.
- When the difference visibly grows with the size of the measurement it is usual to re-read Bland-Altman on a percentage scale; this tool does not offer that view yet.
- How many samples do I need?
- CLSI EP09 asks for at least 40. This tool will calculate from 3 pairs, but the confidence intervals from that few are so wide that they cannot support a decision.
- Which method goes in X?
- Usually the established or reference method. Differences are computed as Y − X, so the sign then reads as the new method running higher or lower. Swapping the columns does not change what Passing-Bablok concludes about whether the slope interval contains 1.
- Why not ordinary least squares?
- Least squares assumes X was fixed without error. In a method comparison X is a measurement too, so that assumption fails and the slope is pulled towards zero. Passing-Bablok accepts error on both axes and is robust to outliers.
- Another package gives me slightly different digits.
- The original paper leaves the definition of the shifted median ambiguous in one place, so packages count K differently. This tool uses the number of pairwise slopes below −1. N and K are printed under the chart, and those are the two numbers to compare first.
- Is Deming regression available?
- No. Deming needs the ratio of the two methods' error variances as an input, and getting that honestly means measuring each method in replicate first. A guessed ratio changes the answer quietly, so it was left out.
- Where do my values go?
- Nowhere. Everything is computed inside your browser and nothing you type is stored.