The following example generates 1000 random Geometric distributed values and then uses GeometricFit routine to extract used P parameter
Uses MtxExpr, Math387, Statistics; procedure Example; var vec1: Vector; resp: double; CIp: TTwoElmReal; begin // first, generate 1000 randomly geometr. distributed // numbers with parameter p=0.713 vec1.Size(1000); RandomGeometric(0.713,vec1); // Now, extract the p and its 100*(1-0.05) = 95% // confidence interval GeometricFit(vec1,resp,CIp); end;
#include "StatRandom.hpp" #include "MtxExpr.hpp" #include "Statistics.hpp" void __fastcall Example() { sVector vec1; // first, generate 1000 randomly geometr. distributed // numbers with parameter p=0.713 vec1.Size(1000); RandomGeometric(0.713,vec1); // Now, extract the p and its 100*(1-0.05) = 95% // confidence interval double resp; TTwoElmReal CIp; GeometricFit(vec1,resp,CIp, 0.05); }
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
|