Statistics.BinomFit Method

Overload List

#SignatureDescription
1void BinomFit(TVec X, TVec N, TVec p)
2void BinomFit(TVec X, Double N, TVec p)Calculate parameters for binomial distributed values.
3void BinomFit(TVec X, Double N, TVec p, TVec Low, TVec High, Double Alpha)Calculate parameters for binomial distributed values.
4void BinomFit(TVec X, ref Int32 N, ref Double p)

Overload 1: void BinomFit(TVec X, TVec N, TVec p)

#NameTypeDescription
1XTVecsource TVec
2NTVecsource TVec
3pTVecsource TVec

Result: stored in self (calling object)

Overload 2: void BinomFit(TVec X, Double N, TVec p)

Calculate parameters for binomial distributed values.

#NameTypeDescription
1XTVecsource TVec
2NDoublescalar
3pTVecsource TVec

Result: stored in self (calling object)

Overload 3: void BinomFit(TVec X, Double N, TVec p, TVec Low, TVec High, Double Alpha)

Calculate parameters for binomial distributed values.

#NameDescription
1XStores data which is assumed to be binomial distributed.
2NDefines binomial distribution n parameter.
3pReturns binomial distribution p parameter, estimated at each X value.
4Low
5Highp (1-Alpha)*100 percent confidence intervals. Each pair of Low and High values defines lower and upper CI for corresponding p value.
6AlphaConfidence 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 vec1 = new Vector(1000, false);
        Vector LowInt = new Vector(0);
        Vector HighInt = new Vector(0);
        Vector p = new Vector(0);
        StatRandom.RandomBinom(35, 0.25, vec1, -1);

        // Now extract p-s and its 100*(1-Alpha)
        // confidence intervals.

        Statistics.BinomFit(vec1, 35, p, LowInt, HighInt, 0.05);

        // vector p holds the p for each element in vec1,
        // vectors LowInt and HighInt hold the lower and upper conf. int. limit
        // for each element in p
    }
}
See Also: StatRandom.RandomBinom, Probabilities.BinomStat

Overload 4: void BinomFit(TVec X, ref Int32 N, ref Double p)

#NameTypeDescription
1XTVecsource TVec
2NInt32 (ref)output
3pDouble (ref)output

Result: stored in self (calling object)