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

The following example generates 100 random standard exponentially distributed values and then uses ExponentFit routine to extract used Mu parameter:

Uses MtxExpr,Math387,Statistics, StatRandom;
procedure Example;
var vec1: Vector;
  resMu: double;
  CIMu: TTwoElmReal;
begin
  // first, generate 1000 randomly exp. distributed
  // numbers with parameter mu=4.13
  vec1.Size(1000);
  RandomExponent(4.13,vec1);
  // Now, extract the mu and its 95% confidence interval
  ExponentFit(vec1,resMu,CIMu);
end;
#include "MtxExpr.hpp"
#include "Statistics.hpp"
#include "StatRandom.hpp"
void __fastcall Example()
{
    sVector vec1;
    vec1.Size(1000,false);
    // first, generate 1000 randomly beta distributed
    // numbers with parameter mu=4.13
    RandomExponent(4.13,vec1);
    double estmu;
    TTwoElmReal cimu;
    // Now extract the mu and its 95% confidence intervals.
    ExponentFit(vec1, estmu, cimu, 0.05);
}
Copyright (c) 1999-2025 by Dew Research. All rights reserved.