Statistics.ShapiroFrancia Method

Double ShapiroFrancia(TVec Data, ref THypothesisResult hRes, ref Double Signif, THypothesisType hType, Double Alpha)

The Shapiro-Francia test for normality of data.

#NameDescription
1DataData vector, containing ordered and unique deviates from unknown distribution.
2hResReturns the result of the null hypothesis (default assumption is that data comes from normal distribution).
3hTypeDefines the type of the null hypothesis (left, right and two - tailed).
4Signif(Significance level) returns the probability of observing the given result by chance given that the null hypothesis is true.
5AlphaDefines the desired significance level. If the significance probability (Signif) is bellow the desired significance (Alpha), the null hypothesis is rejected.

Returns: Double - the Shapiro-Francia statistics.

Remarks:

Performs the The Shapiro-Francia test for normality of data.

Note
Basic assumption is Data values i.e. deviates from unknown distribution are ordered and unique.

Examples
using Dew.Math;
using Dew.Stats;
using Dew.Stats.Units;
namespace Dew.Examples
{
    private void Example()
    {
        Vector a = new Vector(0);
        Vector b = new Vector(0);
        a.Size(1000,false);
        StatRandom.RandomWeibull(2.5,1.0,a,-1);
        // filter original data, retain only sorted unique values
        Statistics.Unique(a,b, null);
        THypothesisResult hres;
        double sign;
        ShapiroFrancia(b,out hres, out sign,THypothesisType.htTwoTailed,0.05);
        // Significance approx. 0
        // hres = hrReject -> data is not coming from normal distribution
    }
}
See Also: Statistics.Unique, Statistics.ShapiroWilks