|
Dew Stats for .NET
|
Calculate parameters for Beta distributed values.
public BetaFit(TVec X, ref double A, ref double B, ref TTwoElmReal PCIA, ref TTwoElmReal PCIB, int MaxIter, double Tolerance, double alpha);
|
Parameters |
Description |
|
X |
Stores data which is assumed to be Beta distributed. |
|
A |
Return Beta distribution parameter estimator a. |
|
B |
Return Beta distribution parameter estimator b. |
|
PCIA |
a (1-Alpha)*100 percent confidence interval. |
|
PCIB |
b (1-Alpha)*100 percent confidence interval. |
|
MaxIter |
Maximum number of iterations needed for deriving a and b. |
|
Tolerance |
Defines the acceptable tolerance for calculating a and b. |
|
alpha |
Confidence interval percentage. |
RandomBeta, BetaStat
The following example generates 100 random Beta distributed values and then uses BetaFit routine to extract used a and b parameters:
using Dew.Math; using Dew.Stats; using Dew.Stats.Units; namespace Dew.Examples; { private void Example() { Vector v = new Vector(1000,false); // first, generate 1000 randomly beta distributed // numbers with parameters a=3 and b =2 StatRandom.RandomBeta(3.0, 2.0, v); double esta,estb; double[2] cia,cib; // Now extract the a,b and their 95% confidence intervals. //Use at max 300 iterations and tolerance 0.001 Statistics.BetaFit(v,out esta, out estb, out cia, out cib, 300, 1.0e-3, 0.05);
|
What do you think about this topic? Send feedback!
|
|
Copyright (c) 1999-2010 by Dew Research. All rights reserved.
|