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

The following example generates 1000 random discrete uniform distributed values and then uses UniformDFit routine to extract used N parameter

var vec1: Vector;
  resN: Integer;
  CIN: TTwoElmReal;
begin
  // first, generate 1000 randomly disc.uniformly distributed
  // numbers with parameter N = 12
  vec1.Size(1000);
  RandomUniformD(12,vec1);
  // Now, extract N and its 95%
  // confidence interval
  UniformDFit(vec1,resN,CIN);
end;
#include "StatRandom.hpp"
#include "MtxExpr.hpp"
#include "Statistics.hpp"
void __fastcall Example()
{
    sVector vec1;

    // first, generate 1000 randomly disc.uniformly distributed
    // numbers with parameter N = 12
    vec1.Size(1000,false);
    RandomUniformD(12,vec1);

    // Now, extract N and its 95%
    // confidence interval
    int resN;
    TTwoElmReal CIN;
    UniformDFit(vec1,resN,CIN,0.05);
}
Copyright (c) 1999-2025 by Dew Research. All rights reserved.