Statistics.LogNormalFit Method

Overload List

#SignatureDescription
1void LogNormalFit(TVec X, ref Double mu, ref Double sigma)Calculate parameters for log-normally distributed values.
2void LogNormalFit(TVec X, ref Double mu, ref Double sigma, ref Double[] PCIMu, ref Double[] PCISigma, Double Alpha)Calculate parameters for log-normally distributed values.

Overload 1: void LogNormalFit(TVec X, ref Double mu, ref Double sigma)

Calculate parameters for log-normally distributed values.

#NameTypeDescription
1XTVecsource TVec
2muDouble (ref)output
3sigmaDouble (ref)output

Result: stored in self (calling object)

Overload 2: void LogNormalFit(TVec X, ref Double mu, ref Double sigma, ref Double[] PCIMu, ref Double[] PCISigma, Double Alpha)

Calculate parameters for log-normally distributed values.

#NameDescription
1XStores data which is assumed to be log-normaly distributed.
2muReturn log-normal distribution parameter estimator M u.
3sigmaReturn log-normal distribution parameter estimator Sigma.
4PCIMuMu (1-Alpha)*100 percent confidence interval.
5PCISigmaSigma (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 Data = new Vector(0);
        Data.Size(100, false);
        StatRandom.RandomLogNormal(3, 0.2, Data, -1);
        double mu, sigma;
        double[] MuCI = new double[2];
        double[] SigmaCI = new double[2];
        Statistics.LogNormalFit(Data, out mu, out sigma, out MuCI, out SigmaCI, 0.05);
        // mu approx 3.0
        // sigma approx 0.2
    }
}
See Also: StatRandom.RandomLogNormal