Statistics::Percentile Function

Overload List

#SignatureDescription
1double Percentile(TVec *X, double P, TPercentileMethod Method = TPercentileMethod::pctMethodNPlus);Percentile.
2void Percentile(TVec *X, const DewArray<double> &P, DewArray<double> &Percentiles, TPercentileMethod Method = TPercentileMethod::pctMethodNPlus);Percentile (several percentiles in one go).

Overload 1: double Percentile(TVec *X, double P, TPercentileMethod Method = TPercentileMethod::pctMethodNPlus);

Percentile.

#NameTypeDescription
1XTVec *Data. An exception is raised if X is complex.
2PdoubleDefines the 100*p percentile. The parameter P must lie in the interval (0,1), otherwise an exception is raised.
3Method = TPercentileMethod::pctMethodNPlusTPercentileMethodDefines 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: the 100*P th percentile of all X vector elements. The 100*P -th percentile is defined as the value that is greater than 100*P percent of the values in X.

See Also: Statistics::InterQuartile
Declared in Dew::Stats::Units::Statistics · Dew.Stats/Units.Statistics.h · Cross-compiler

Overload 2: void Percentile(TVec *X, const DewArray<double> &P, DewArray<double> &Percentiles, TPercentileMethod Method = TPercentileMethod::pctMethodNPlus);

Percentile (several percentiles in one go).

#NameTypeDescription
1XTVec *
2Pconst DewArray<double> &
3PercentilesDewArray<double> &
4Method = TPercentileMethod::pctMethodNPlusTPercentileMethod
Remarks:

This overload calculates percentiles for all P elements in one pass. The advantage of this overload is X sample values only have to be sorted once.

Declared in Dew::Stats::Units::Statistics · Dew.Stats/Units.Statistics.h · Cross-compiler