You are here: Symbol Reference > Statistics Namespace > Functions > Statistics.InterQuartile Function
Stats Master VCL
ContentsIndex
Example

Calculate the IQR for given values.

Uses MtxExpr, Statistics, Math387;
function Example: double;
var a: Vector;
    Res: double;
begin
    a.Size(4);
    a.SetIt([2,0.1,3,4]);
    Result := InterQuartile(a, TPercentileMethod.pctMethodNMinus); // Res = 1.725  //Excel convention
end;
end;
#include "MtxExpr.hpp"
#include "Statistics.hpp"
#include "Math387.hpp"
void __fastcall Example()
{
    sVector a;
    a.SetIt(false, OPENARRAY(double,(2,0.1,3,4)));
    double res = InterQuartile(a,pctMethodNMinus); // Res = 1.725  //Excel convention
}
Copyright (c) 1999-2025 by Dew Research. All rights reserved.