function ShapiroFrancia(const Data: TVec; out hRes: THypothesisResult; out Signif: Double; hType: THypothesisType; Alpha: Double): Double;
The Shapiro-Francia test for normality of data.
| # | Name | Description |
|---|---|---|
| 1 | Data | Data vector, containing ordered and unique deviates from unknown distribution. |
| 2 | hRes | Returns the result of the null hypothesis (default assumption is that data comes from normal distribution). |
| 3 | hType | Defines the type of the null hypothesis (left, right and two - tailed). |
| 4 | Signif | (Significance level) returns the probability of observing the given result by chance given that the null hypothesis is true. |
| 5 | Alpha | Defines 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
Uses MtxExpr, Math387, Statistics;
procedure Example;
var avec,bvec: Vector;
hres: THypothesisResult;
Signif: double;
begin
avec.Size(1000,false);
RandomWeibull(2.5,1,avec);
// filter original data, retain only sorted unique values
Unique(avec,bvec);
ShapiroFrancia(bvec,hres,signif);
// Significance approx. 0
// hres = hrReject -> data is not coming from normal distribution
end;
See Also: Statistics.Unique, Statistics.ShapiroWilks