Quantcast
Channel: Math.NET Numerics
Viewing all articles
Browse latest Browse all 971

New Post: Percentile obsolete, how to use quantile?

$
0
0
I see that Percentile is obsolete, to be removed in 3.0. I have been attempting to use Quantile in 2.6.1.30 to get behavior similar to that of percentile for an array of tau values, adapting examples from documentation. I am interested in obtaining 21 points of the cumulative distribution function (0.0, .05, .10,... 0.95,1.0), for data generated from a Monte Carlo simulation.

1) What, if any, is the equivalent use of quantile similar to percentile.Compute(list of values)?
2) in the following code, the value calculated by testQuantile is nowhere near the value of percentile 25

Much appreciate any suggestions, expect that I am missing something obvious.
var rmmSamples=new Normal(10.0,20.0).Samples().Take(10000);  // generate test data
var percentile = new Percentile(rmmSamples);
var percentile25 = percentile.Compute(0.25);
var percentiles = percentile.Compute(new[] {0.0, .25, .5, .75,1.0 });
var testQuantile = SortedArrayStatistics.Quantile(rmmSamples.ToArray(), .25);
        
Thanks in advance. Wonderful library, very useful.

Dick
Cincinnati, Ohio, USA

Viewing all articles
Browse latest Browse all 971

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>