Statistics.BetaFit Method

Overload List

#SignatureDescription
1void BetaFit(TVec X, ref Double A, ref Double B, ref Double[] PCIA, ref Double[] PCIB, Int32 MaxIter, Double Tolerance, Double Alpha)Calculate parameters for Beta distributed values.
2void BetaFit(TVec X, ref Double A, ref Double B, Int32 MaxIter, Double Tolerance)Calculate parameters for Beta distributed values using MLE.

Overload 1: void BetaFit(TVec X, ref Double A, ref Double B, ref Double[] PCIA, ref Double[] PCIB, Int32 MaxIter, Double Tolerance, Double Alpha)

Calculate parameters for Beta distributed values.

#NameDescription
1XStores data which is assumed to be Beta distributed.
2AReturn Beta distribution parameter estimator a.
3BReturn Beta distribution parameter estimator b.
4MaxIterMaximum number of iterations needed for deriving a and b.
5ToleranceDefines the acceptable tolerance for calculating a and b.
6PCIAa (1-Alpha)*100 percent confidence interval.
7PCIBb (1-Alpha)*100 percent confidence interval.
8AlphaConfidence interval percentage.

Result: stored in self (calling object)

Examples
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
        Random rnd = new Random();
        StatRandom.RandomBeta(3.0, 2.0, v, rnd.Next());

        double esta, estb;
        double[] cia = new double[2];
        double[] cib = new double[2];
        // 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, ref cia, ref cib, 300, 1.0e-3, 0.05);
See Also: StatRandom.RandomBeta, Probabilities.BetaStat

Overload 2: void BetaFit(TVec X, ref Double A, ref Double B, Int32 MaxIter, Double Tolerance)

Calculate parameters for Beta distributed values using MLE.

#NameTypeDescription
1XTVecsource TVec
2ADouble (ref)output
3BDouble (ref)output
4MaxIterInt32
5ToleranceDoublescalar

Result: stored in self (calling object)