Double InterQuartile(TVec X, TPercentileMethod Method)
InterQuartile range.
| # | Name | Description |
|---|---|---|
| 1 | X | Data. An exception is raised if X is complex. |
| 2 | Method | Defines one of the available methods for calculating percentile. Software packages use different methods to calculate percentiles. For example, Excel uses pctMethodNMinus, while on the other hand, NCSS's default method is pctMethodNPlus. |
Returns: Double - the interquartile range of all X vector elements. The interquartile range is defined as a difference between 75th percentile and 25th percentile of given values.
Examples
using Dew.Math;
using Dew.Stats.Units;
using Dew.Stats;
namespace Dew.Examples
{
private void Example()
{
Vector a = new Vector(0);
a.SetIt(false, new double[] {2,0.1,3,4});
double res = Statistics.InterQuartile(a,TPercentileMethod.pctMethodNMinus); // Res = 1.725 //Excel convention
}
}
See Also: Statistics.Percentile