If “ranking”, “Borda rule” or “Kemeny rule” are unfamiliar, start with the Theory page: the foundations of the method and a demo where you can vote yourself.
The problem
There are m results of measuring one quantity. Each has a centre xk and a standard uncertainty uk, i.e. an interval
We need one value — a consensus — and its uncertainty. The results may contradict each other: some are biased, others understate their uncertainty.
The idea in a minute
Each interval “votes”: it considers values inside it more plausible than values outside. The votes of all intervals are aggregated into a common ranking by the Borda rule. The winners are the values preferred by the largest number of intervals; their median is the preferential median (PM).
An important consequence: each interval casts exactly one vote, however narrow it is. A result with an understated uncertainty does not get a large weight, unlike in the weighted mean.
The algorithm step by step
Watch it live: press “Next”, and drag the intervals with the mouse at any step.
- Range of actual values (RAV) A = {a1 < a2 < … < an} — n equally spaced discrete values from a1 = mink xklow to an = maxk xkup, where xklow = xk − uk and xkup = xk + uk are the interval's lower and upper bounds. Adjacent values are one partition norm h = (an − a1) / (n − 1) apart. By default the number of values is chosen so that every interval contains at least one: n = max(⌈(an − a1) / mink 2uk⌉, 11).
- Interval-induced rankings. The interval Ik splits the RAV into Ak = {ai ∈ A | ai ∈ Ik} and the remaining values A \ Ak. Values in Ak are strictly preferred to the rest, and values within each group are tied: λk = Ak ≻ A \ Ak. Such a ranking is called an inranking (interval-induced ranking), and the set Λ(m, n) = {λ1, …, λm} is the profile.
- Aggregation by the Borda rule. The weighted n × n tournament matrix S = [sij] is built: sij = Σk=1m Cijk, where Cijk = 2 if ai ≻ aj in λk; 1 if ai ~ aj; 0 if aj ≻ ai; sii = 0. The Borda score of ai is the row sum zi = Σj=1n sij. For profiles of inrankings the Kemeny and Borda rules give the same PM, so the polynomial Borda rule is used.
- Winners. Abest = {ai | zi = maxj zj}, p = |Abest|. If the winners' indices are not consecutive, the PM is undefined for this n: n is increased by one and steps 1–4 are repeated. In the implementations on this site n stops at 201; then the widest block of consecutive winners is taken.
- Preferential median — the sample median of the winners sorted in ascending order: xpm = a(p+1)/2 for odd p and (ap/2 + ap/2+1) / 2 for even p (indices within Abest).
Fast computation
Let the coverage (summary indicator) ci be the number of intervals containing ai. Then
The first term does not depend on i. So the Borda winners are the values covered by the most intervals, and the score takes O(m·n) instead of O(m·n2) — without building the matrix S. Both forms give the same result; in the calculator the step-by-step breakdown shows ci and zi for your data.
Uncertainty of the result
The PM is one of the discrete RAV values or the midpoint of two adjacent ones, so its precision is limited by the partition norm. A conservative interval estimate is the bound ±0.5h. A GUM-style standard uncertainty follows if the error is approximated by a symmetric triangular distribution with half-width h:
The estimate is built from a finite sample, so the implementations on this site add in quadrature the standard error of the median of the interval centres — our addition, not part of the published method:
where MAD is the median absolute deviation of the centres xk from their median; 1.4826·MAD is a robust estimate of the standard deviation, and 1.2533 = √(π/2) turns it into the standard error of the median.
Versions of the method
The method develops in two directions: which rule aggregates the profile (the exact but NP-hard Kemeny rule or the polynomial Borda rule) and whether the result is refined again.
| Version | Rule | Self-refinement | Exact β guaranteed | Solution time | Uncertainty u* |
|---|---|---|---|---|---|
| IF&PA-B (base) | Kemeny | no | yes | O(n!) | ±0.5h |
| IF&PA-A (advanced) | Kemeny | yes | yes | O(W·n!) | ±0.5·10−Wh0 |
| IF&PA-L (light) | Borda | no | no | O(n2) | ±0.5h |
| IF&PA-LA (light advanced) | Borda | yes | no | O(W·n2) | ±0.5·10−Wh0 |
β is the consensus ranking; u* is the bound of the interval uncertainty of the fusion result x*; W is the number of completed self-refinement cycles (set by the stopping condition); h0 is the partition norm of the initial RAV. The Borda rule does not guarantee the exact consensus ranking β, but for profiles of inrankings it gives the same preferential median as the Kemeny rule. The standard uncertainty of the PM is upm ≈ 0.41h (see above).
Self-refinement
Cycles are numbered w = 1, 2, …; quantities of cycle w carry the index w, the initial computation is cycle 0.
- A new RAV around the result. a1w = x*w−1 − 0.5hw−1, anw = x*w−1 + 0.5hw−1; it is split into nw = 11 values, so hw = 0.1hw−1.
- A new profile. Intervals that do not intersect the new RAV are removed, the rest are renumbered (m = mw) and represented again by inrankings λkw, giving the profile Λw.
- The refined result. The consensus ranking of the new profile gives the result x*w. Cycles go on while the stopping condition holds — it compares the length of the new RAV with the lengths of its intersections with the intervals. After W cycles the result is x*W with uncertainty ±0.5hW = ±0.5·10−Wh0.
Which version is in the calculator. The calculator and the code on this site implement IF&PA-L (Borda rule, no self-refinement). Their uncertainty is the standard one: upm = 0.41h, combined with the sampling component (see above). The self-refining version is more accurate — an example on real Planck constant data is on the Applications page.
Notation: papers on the preferential median denote the result xpm and its uncertainty upm; earlier papers and presentations denote the fusion result x* and its uncertainty u*.
Pseudocode
function preferential_median(x[1..m], u[1..m]):
lo = x − u; hi = x + u # bounds of the intervals I_k
a1 = min(lo); an = max(hi) # bounds of the RAV
n = max(ceil((an − a1) / min(hi − lo)), 11)
loop:
h = (an − a1) / (n − 1) # partition norm
a[i] = a1 + (i − 1)·h, i = 1..n
c[i] = number of k with lo[k] ≤ a[i] ≤ hi[k] # coverage
A_best = { i : c[i] = max(c) } # Borda winners
if A_best is consecutive or n ≥ 201:
(if not consecutive — the widest block of consecutive indices)
x_pm = median(a[A_best])
u = sqrt((0.41·h)² + (1.2533·1.4826·MAD(x)/sqrt(m))²)
return x_pm, u
n = n + 1This is Algorithm 2 of Muravyov et al., Int. J. Data Sci. Anal., 2026 (doi:10.1007/s41060-026-01222-6) in a shortened form. In the paper the winners are found from the row sums zi of the tournament matrix S; here from the coverage ci. This is the same: for inrankings zi = Σk(n − |Ak| − 1) + n·ci, and the first term is the same for all i. The limit n ≤ 201 and the sampling component of the uncertainty are additions of the implementations on this site; in the paper upm = 0.41h.
Ready implementations in five languages are on the Code page.
From norms to a schedule
IF&PA is also used where the result is not a measurement but a norm for planning. The chain is: history of works → labour norm → resource demand of every part of the work → a calendar plan of minimum duration. An error at the first step carries over into the plan, so the norm must be robust to a contaminated history.
1. A labour norm from the history
The norm b is how many shifts a unit of volume takes. For each observation the actual duration Tk and the volume done Vk are known; their ratio Tk/Vk is a partial estimate of the norm. The ratios are usually close together, but delays (bad weather, downtime, waiting for materials) give rare large values, always in the same direction. The mean and the estimators that start from the median are biased upwards by such one-sided contamination.
In IF&PA each ratio becomes an interval [Tk/Vk − u; Tk/Vk + u] with half-width u = κ·MAD, where MAD is the median absolute deviation of the ratios and κ is the width multiplier. The norm is the preferential median of these intervals. The norm depends on the month: in winter the same works take longer, so it is estimated separately for every “work × month” pair.
2. A month is a knapsack problem
A work is split into packages — parts on sections of the route. Package j needs rj = bj·Vj shifts. In a month the crews can work R shifts — the capacity of the “knapsack”. The decision xj = 1 if the package is taken into the month:
There are usually several resources — crews, machinery, materials — and the packages must fit each of them: Σj rjlxj ≤ Rl for every resource type l. This is the multidimensional knapsack. The problem is NP-hard, but for sizes typical of a project it is solved exactly by branch and bound.
3. A project is a chain of month-knapsacks
A calendar plan is a set of knapsacks, one for every month t = 1, …, H, linked by the order of works. The decision xjt = 1 puts package j into month t; the demand rjtl depends on the month through the seasonal norm. The smallest duration
and the order is kept: a package of the next work on a section not before the previous one. Feasibility for a given H is checked by an integer solver, and the smallest H is found by enumeration or bisection from the resource lower bound.
4. Why an accurate and unbiased norm matters
- An understated norm. More work “fits” into a month than the crews can actually do: the plan is shorter, but in execution the months are overloaded and the deadline is missed.
- An overstated norm. The plan is feasible but longer than necessary — a hidden reserve nobody sees or uses.
So the norm estimator is chosen not only by its spread but also by its bias. A step-by-step explanation with the knapsack is in the interactive lecture; the full model with several resources, seasonal norms and an exact solver is in the Planner.
Notation
| Symbol | Meaning |
|---|---|
| m, k | number of results (intervals) and the result index, k = 1, …, m |
| Ik = [xk − uk; xk + uk] | interval of the k-th result: centre xk, uncertainty uk |
| xklow, xkup | lower and upper bounds of the interval Ik |
| A = {a1, …, an} | range of actual values (RAV): n discrete values, the alternatives |
| n, h | number of RAV values and the partition norm — the distance between adjacent values |
| Ak | RAV values lying in the interval Ik |
| λk, Λ(m, n) | inranking induced by the interval Ik, and the profile of m inrankings |
| S = [sij], Cijk | weighted tournament matrix and the contribution of the k-th inranking (2, 1 or 0) |
| zi | Borda score of ai — a row sum of S |
| ci | coverage (summary indicator) — the number of intervals containing ai |
| Abest, p | set of Borda winners and their number |
| xpm, upm | preferential median and its standard uncertainty 0.41h |
| us, MAD | sampling component of the uncertainty (a site addition) and the median absolute deviation of the centres |
| β | consensus ranking |
| x*, u* | fusion result and the bound of its uncertainty — notation of earlier papers and of the versions table |
| w, W | self-refinement cycle number and the number of completed cycles |
| h0, hw, mw | partition norm of the initial RAV, the norm and the number of remaining intervals in cycle w |
| b, Tk, Vk | labour norm; duration and volume of the k-th observation (section “From norms to a schedule”) |
| rjtl, Rtl | demand of package j for resource l in month t and the monthly capacity of that resource |
| xjt, H | decision “package j in month t” and the project duration in months |
How the PM differs from similar estimators
| Estimator | What it does with the intervals | A narrow outlier interval |
|---|---|---|
| Preferential median | counts how many intervals cover each value | one vote, like everyone else |
| Weighted mean | averages centres with weights 1/uk2 | huge weight — pulls the estimate |
| Mixture model mode | finds the maximum of the sum of densities N(xk, uk2) | a tall narrow peak — may win |
| Largest consistent subset (Cox) | excludes results by the χ² test, then the weighted mean | excluded if enough others remain |
| Median, ISO 13528 Algorithm A | do not use the uncertainties at all | an ordinary outlier |
Which estimator is more accurate on which data — check in the applicability configurator.
Primary sources
- Muravyov S.V., Khudonogova L.I., Emelyanova E.Yu. Interval data fusion with preference aggregation. Measurement, 2018, 116, 621–630. doi:10.1016/j.measurement.2017.08.045
- Muravyov S.V., Khudonogova L.I., Ho M.D. Analysis of heteroscedastic measurement data by the self-refining method of interval fusion with preference aggregation – IF&PA // Measurement. 2021. Vol. 183. Art. 109851. DOI: 10.1016/j.measurement.2021.109851.
- Muravyov S.V., Khudonogova L.I., Shabramov V.S., Ignatyev V.D. Comparative studies of preferential and weighted medians accuracy in robust estimation of central tendency // International Journal of Data Science and Analytics. 2026. Vol. 22, No. 1. Art. 262. DOI: 10.1007/s41060-026-01222-6.
- Muravyov S.V., Khudonogova L.I., Shabramov V.S., Ignatyev V.D., Andreyev D.I. Kemeny and Borda rules in constructing central tendency estimators based on the preferential median. Proc. AISP'25, 2025. DOI: 10.1109/AISP68263.2025.11396113.