Class WeightedMedian
- java.lang.Object
-
- dev.nm.stat.descriptive.moment.weighted.WeightedMedian
-
- All Implemented Interfaces:
Statistic
public class WeightedMedian extends Object implements Statistic
A weighted median of a sample is the 50% weighted percentile.It was first proposed by F. Y. Edgeworth in 1888.Like the median, it is useful as an estimator of central tendency, robust against outliers. It allows for non-uniform statistical weights related to, e.g., varying precision measurements in the sample.- Since:
- 2019/11/29
- See Also:
- Wikipedia: Weighted median
-
-
Constructor Summary
Constructors Constructor Description WeightedMedian(double[] x, double[] w)
Finds the weighted median of an array.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addData(double... arg0)
Recompute the statistic with more data, incrementally if possible.long
N()
Get the size of the sample.double
value()
Get the value of the statistic.
-