Permalink
Browse files

BUG: stats: Corrected docstring for scipy.stats.normaltest. Closes ti…

…cket 1479.
  • Loading branch information...
1 parent 6fb3507 commit 73bd84611c0e7e1fd97bc8671ec18faa251d1158 Warren Weckesser committed Aug 8, 2011
Showing with 14 additions and 9 deletions.
  1. +14 −9 scipy/stats/stats.py
View
@@ -1218,7 +1218,7 @@ def kurtosistest(a, axis=0):
def normaltest(a, axis=0):
"""
- Tests whether a sample differs from a normal distribution
+ Tests whether a sample differs from a normal distribution.
This function tests the null hypothesis that a sample comes
from a normal distribution. It is based on D'Agostino and
@@ -1228,22 +1228,27 @@ def normaltest(a, axis=0):
Parameters
----------
- a : array
+ a : array_like
+ The array containing the data to be tested.
axis : int or None
+ If None, the array is treated as a single data set, regardless of
+ its shape. Otherwise, each 1-d array along axis `axis` is tested.
Returns
-------
- p-value : float
- A 2-sided chi squared probability for the hypothesis test
+ k2 : float or array
+ `s^2 + k^2`, where `s` is the z-score returned by `skewtest` and
+ `k` is the z-score returned by `kurtosistest`.
+ p-value : float or array
+ A 2-sided chi squared probability for the hypothesis test.
References
----------
- .. [1] D'Agostino, R. B. and Pearson, E. S. (1971), "An Omnibus Test of
- Normality for Moderate and Large Sample Size,"
- Biometrika, 58, 341-348
+ .. [1] D'Agostino, R. B. (1971), "An omnibus test of normality for
+ moderate and large sample size," Biometrika, 58, 341-348
- .. [2] D'Agostino, R. B. and Pearson, E. S. (1973), "Testing for
- departures from Normality," Biometrika, 60, 613-622
+ .. [2] D'Agostino, R. and Pearson, E. S. (1973), "Testing for
+ departures from normality," Biometrika, 60, 613-622
"""
a, axis = _chk_asarray(a, axis)

0 comments on commit 73bd846

Please sign in to comment.