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

Calculate parameters for Rayleigh distributed values.

Pascal
procedure RayleighFit(const X: TVec; out b: double; var PCIb: TTwoElmReal; Alpha: double = 0.05); overload;
Parameters 
Description 
Stores data which is assumed to be Rayleigh distributed. 
Returns Rayleigh distribution parameter estimator. 
PCIb 
b (1-Alpha)*100 percent confidence interval. 
Alpha 
Confidence interval percentage. 

RandomRayleigh, RayleighStat

The following example generates 100 random Rayleigh distributed values and then uses RayleighFit routine to extract used b parameter

var vec1: Vector;
resB : double;
CIb: TTwoElmReal;
begin
    // first, generate 1000 randomly Rayleigh distributed
    // numbers with b=1.3
    vec1.Size(1000);
    RandomRayleigh(1.3,vec1);
  // Now extract the r and it's 95% confidence intervals.
  RayleighFit(vec1,resb,CIb);
end;
#include "StatRandom.hpp"
#include "MtxExpr.hpp"
#include "Statistics.hpp"
void __fastcall Example();
{
  sVector vec1;
    // first, generate 1000 randomly Rayleigh distributed
    // numbers with b=1.3
    vec1.Size(1000,false);
    RandomRayleigh(1.3,vec1);
  // Now extract the r and it's 95% confidence intervals.
  double resb;
  TTwoElmReal CIb;
  RayleighFit(vec1,resb,CIb,0.05);
}
Examples on GitHub
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!