QuantileCalculationMethod { public double quantileFromUnsorted(double level, double[] sample) { double[] sorted = sample.clone(); Arrays.sort(sorted); return quantileFromSorted(level, sorted); }  double quantileFromUnsorted(double level, double[] sample);  }
@Test public void excel() { double[] data = new double[] {1.0, 3.0, 2.0, 4.0}; double level = 0.3; double quantileComputed = ExcelInterpolationQuantileMethod.DEFAULT.quantileFromUnsorted(level, data); double quantileExpected = 1.9; assertEquals(quantileComputed, quantileExpected, TOLERANCE_QUANTILE); }