Statistics::UniformFit Function

Overload List

#SignatureDescription
1void UniformFit(TVec *X, double &low, double &high);Calculate parameters for uniformly distributed values.
2void UniformFit(TVec *X, double &low, double &high, DewArray<double> &PCILow, DewArray<double> &PCIHigh, double Alpha = 0.05);Calculate parameters for uniformly distributed values.

Overload 1: void UniformFit(TVec *X, double &low, double &high);

Calculate parameters for uniformly distributed values.

#NameTypeDescription
1XTVec *
2lowdouble &
3highdouble &
Examples
#include "MtxExpr.h"
#include "Units.StatRandom.h"
#include "Units.Statistics.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Stats;
using namespace Dew::Stats::Units::StatRandom;
using namespace Dew::Stats::Units::Statistics;

void Example()
{
    Vector vec1;
    double resLow, resHigh;
    DewArray<double> CILow(2), CIHigh(2);

    // first, generate 1000 randomly Uniformly distributed
    // numbers with parameters Low=1.5 and High =2.2
    vec1.Size(1000);
    RandomUniform(1.5,2.2,vec1);
    // Now extract the Low,High and their 95% confidence intervals.
    UniformFit(vec1,resLow,resHigh,CILow,CIHigh);
}
Declared in Dew::Stats::Units::Statistics · Dew.Stats/Units.Statistics.h · Cross-compiler

Overload 2: void UniformFit(TVec *X, double &low, double &high, DewArray<double> &PCILow, DewArray<double> &PCIHigh, double Alpha = 0.05);

Calculate parameters for uniformly distributed values.

#NameTypeDescription
1XTVec *Stores data which is assumed to be uniformly distributed.
2lowdouble &Return uniform distribution parameter estimator Low.
3highdouble &Return uniform distribution parameter estimator High.
4PCILowDewArray<double> &Low (1-Alpha)*100 percent confidence interval.
5PCIHighDewArray<double> &High (1-Alpha)*100 percent confidence interval.
6Alpha = 0.05doubleConfidence interval percentage.
Examples
#include "MtxExpr.h"
#include "Units.StatRandom.h"
#include "Units.Statistics.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Stats;
using namespace Dew::Stats::Units::StatRandom;
using namespace Dew::Stats::Units::Statistics;

void Example()
{
    Vector vec1(1000,false);
        // first, generate 1000 randomly Weibull distributed
        // numbers with parameters Low=1.5 and High =2.2
        RandomUniform(1.5,2.2,vec1,-1);
    // Now extract the Low,High and their 95% confidence intervals.
    double resLow, resHigh;
    DewArray<double> CILow(2);
    DewArray<double> CIHigh(2);
    UniformFit(vec1,resLow,resHigh,CILow,CIHigh, 0.05);
}
See Also: RandomUniform, UniformStat
Declared in Dew::Stats::Units::Statistics · Dew.Stats/Units.Statistics.h · Cross-compiler