 the null hypothesis that the
data was drawn from a normal distribution.

Parameters
----------
x : array_like
    Array of sample data. Must contain at least three observations.

Returns
-------
statistic : float
    The test statistic.
p-value : float
    The p-value for the hypothesis test.

See Also
--------
anderson : The Anderson-Darling test for normality
kstest : The Kolmogorov-Smirnov test for goodness of fit.
:ref:`hypothesis_shapiro` : Extended example

Notes
-----
The algorithm used is described in [4]_ but censoring parameters as
described are not implemented. For N > 5000 the W test statistic is
accurate, but the p-value may not be.

References
----------
.. [1] https://www.itl.nist.gov/div898/handbook/prc/section2/prc213.htm
       :doi:`10.18434/M32189`
.. [2] Shapiro, S. S. & Wilk, M.B, "An analysis of variance test for
       normality (complete samples)", Biometrika, 1965, Vol. 52,
       pp. 591-611, :doi:`10.2307/2333709`
.. [3] Razali, N. M. & Wah, Y. B., "Power comparisons of Shapiro-Wilk,
       Kolmogorov-Smirnov, Lilliefors and Anderson-Darling tests", Journal
       of Statistical Modeling and Analytics, 2011, Vol. 2, pp. 21-33.
.. [4] Royston P., "Remark AS R94: A Remark on Algorithm AS 181: The
       W-test for Normality", 1995, Applied Statistics, Vol. 44,
       :doi:`10.2307/2986146`

Examples
--------

>>> import numpy as np
>>> from scipy import stats
>>> rng = np.random.default_rng()
>>> x = stats.norm.rvs(loc=5, scale=3, size=100, random_state=rng)
>>> shapiro_test = stats.shapiro(x)
>>> shapiro_test
ShapiroResult(statistic=0.9813305735588074, pvalue=0.16855233907699585)
>>> shapiro_test.statistic
0.9813305735588074
>>> shapiro_test.pvalue
0.16855233907699585

For a more detailed example, see :ref:`hypothesis_shapiro`.
r‹