public class Quantile extends Object implements Statistic
quantile.| Modifier and Type | Class and Description |
|---|---|
static class |
Quantile.QuantileType
the available quantile definitions
|
| Constructor and Description |
|---|
Quantile(double[] data)
Construct a
Quantile calculator using the default type:
Quantile.QuantileType.APPROXIMATELY_MEDIAN_UNBIASED. |
Quantile(double[] data,
Quantile.QuantileType type)
Construct a
Quantile calculator. |
| Modifier and Type | Method and Description |
|---|---|
void |
addData(double... data)
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.
|
double |
value(double q)
Compute the sample value corresponding to a quantile.
|
public Quantile(double[] data,
Quantile.QuantileType type)
Quantile calculator.data - the datatype - the algorithm to compute Q(q)public Quantile(double[] data)
Quantile calculator using the default type:
Quantile.QuantileType.APPROXIMATELY_MEDIAN_UNBIASED.data - the datapublic double value(double q)
q - a quantileq quantilepublic void addData(double... data)
Statisticpublic double value()
StatisticCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.