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

Calculate mean for given values, excluding top and bottom 25% i.e 50%.

Uses MtxExpr, Statistics, Math387;
procedure Example;
var a: Vector;
  MT : double;
begin
  a.SetIt(false,[1, 2, 97, 98, 99, 100, 190]);
  MT := MeanT(a,0.5); // MT = 79.2
end;
#include "MtxExpr.hpp"
#include "Statistics.hpp"
void __fastcall Example()
{
  sVector a;
  a.SetIt(false, OPENARRAY(double,(1, 2, 97, 98, 99, 100, 190)));
  double MT = MeanT(a,0.5);
  // MT = 79.2
}
Copyright (c) 1999-2024 by Dew Research. All rights reserved.