scipy.stats.shapiro

scipy.stats.shapiro(x, a=None, reta=0)

Perform the Shapiro-Wilk test for normality.

The Shapiro-Wilk test tests the null hypothesis that the data was drawn from a normal distribution.

Parameters :

x : array_like

array of sample data

a : array_like, optional

array of internal parameters used in the calculation. If these are not given, they will be computed internally. If x has length n, then a must have length n/2.

reta : {True, False}

whether or not to return the internally computed a values. The default is False.

Returns :

W : float

The test statistic

p-value : float

The p-value for the hypothesis test

a : array_like, optional

If reta is True, then these are the internally computed “a” values that may be passed into this function on future calls.

See also

anderson
The Anderson-Darling test for normality

References

[R65]http://www.itl.nist.gov/div898/handbook/prc/section2/prc213.htm

Previous topic

scipy.stats.levene

Next topic

scipy.stats.anderson

This Page