Statistics.UniformFit Method

Overload List

#SignatureDescription
1void UniformFit(TVec X, ref Double low, ref Double high)Calculate parameters for uniformly distributed values.
2void UniformFit(TVec X, ref Double low, ref Double high, ref Double[] PCILow, ref Double[] PCIHigh, Double Alpha)Calculate parameters for uniformly distributed values.

Overload 1: void UniformFit(TVec X, ref Double low, ref Double high)

Calculate parameters for uniformly distributed values.

#NameTypeDescription
1XTVecsource TVec
2lowDouble (ref)output
3highDouble (ref)output

Result: stored in self (calling object)

Overload 2: void UniformFit(TVec X, ref Double low, ref Double high, ref Double[] PCILow, ref Double[] PCIHigh, Double Alpha)

Calculate parameters for uniformly distributed values.

#NameDescription
1XStores data which is assumed to be uniformly distributed.
2lowReturn uniform distribution parameter estimator Low.
3highReturn uniform distribution parameter estimator High.
4PCILowLow (1-Alpha)*100 percent confidence interval.
5PCIHighHigh (1-Alpha)*100 percent confidence interval.
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);
        // first, generate 1000 randomly Weibull distributed
        // numbers with parameters Low=1.5 and High =2.2
            StatRandom.RandomUniform(1.5,2.2,vec1,-1);
        // Now extract the Low,High and their 95% confidence intervals.
        double resLow,resHigh;
        double[] CILow = new double[2];
        double[] CIHigh = new double[2];
        Statistics.UniformFit(vec1,out resLow,out resHigh,out CILow,out CIHigh, 0.05);
    }
}
See Also: StatRandom.RandomUniform, Probabilities.UniformStat