Dew Stats Master .NET
UniformFit Routines
Summary
Calculate parameters for uniformly distributed values.

Unit
Statistics

Declaration
Procedure UniformFit(X: TVec; out low, high: TSample; out PCILow, PCIHigh: TTwoElmReal; alpha: TSample = 0.05);
 Parameter  Description 
Stores data which is assumed to be uniformly distributed. 
low,high Return uniform distribution parameter estimators. 
PCILow,PCIHigh (1-Alpha)*100 percent confidence intervals. 
Alpha Confidence interval percentage. 

Description
Calculate parameters for uniformly distributed values.
Categories
Distribution parameters estimation
 See Also 
RandomUniform 
MVUniform 

Example 1

The following example generates 100 random uniformly distributed values and then uses UniformFit routine to extract used Low and High parameters:

Uses MtxExpr, Math387, Statistics; procedure Example; var vec1: Vector; resLow, resHigh : TSample; CILow,CIHigh: TTwoElmReal; begin // first, generate 1000 randomly Weibull distributed // numbers with parameters Low=1.5 and High =2.2 vec1.Size(1000); RandomUniform(1.5,2.2,vec1); // Now extract the Low,High and their 95% confidence intervals. UniformFit(vec1,resLow,resHigh,CILow,CIHigh); end;
#include "StatRandom.hpp" #include "MtxVecCpp.h" #include "Statistics.hpp" void __fastcall Example(); { Vector vec1; // first, generate 1000 randomly Weibull distributed // numbers with parameters Low=1.5 and High =2.2 vec1->Size(1000,false); RandomUniform(1.5,2.2,vec1); // Now extract the Low,High and their 95% confidence intervals. double resLow,resHigh; double CILow[2]; double CIHigh[2]; UniformFit(vec1,resLow,resHigh,CILow,CIHigh,0.05); }
using Dew.Math; using Dew.Stats; using Dew.Stats.Units; namespace Dew.Examples; { private void Example() { Vector vec1 = new Vector(1000,false); // first, generate 1000 randomly Weibull distributed // numbers with parameters Low=1.5 and High =2.2 StatRandom.RandomUniform(1.5,2.2,vec1); // Now extract the Low,High and their 95% confidence intervals. double resLow,resHigh; double[2] CILow; double[2] CIHigh; Statistics.UniformFit(vec1,out resLow,out resHigh,out CILow,out CIHigh, 0.05); } }



Declaration
Procedure UniformFit(X: TVec; out low, high: TSample);

Copyright 2008 Dew Research
http://www.dewresearch.com