# HG changeset patch # User Rik # Date 1382193239 25200 # Node ID 9bb5d3f63cdd9cc079813a06edd3416f601c9178 # Parent f0e777cf348f385b93bb360d749867c70c94c1b1 NEWS: Announce change in definition of kurtosis function for Matlab compatibility. * NEWS: Announce that kurtosis no longer calculates "excess kurtosis". * scripts/statistics/base/kurtosis.m: Tweak docstring. diff -r f0e777cf348f -r 9bb5d3f63cdd NEWS --- a/NEWS Fri Oct 18 13:23:56 2013 +0200 +++ b/NEWS Sat Oct 19 07:33:59 2013 -0700 @@ -261,6 +261,11 @@ "relax" option has been replaced by the "rtest" option. The numeric values of error codes and of some options have also changed. + ** The kurtosis function has changed definition to be compatible with + Matlab. It now returns the base kurtosis instead of the "excess kurtosis". + The old behavior can be had by changing scripts to normalize with -3. + "excess kurtosis" = kurtosis (x) - 3 + ** The default name of the Octave crash dump file is now "octave-workspace" instead of "octave-core". diff -r f0e777cf348f -r 9bb5d3f63cdd scripts/statistics/base/kurtosis.m --- a/scripts/statistics/base/kurtosis.m Fri Oct 18 13:23:56 2013 +0200 +++ b/scripts/statistics/base/kurtosis.m Sat Oct 19 07:33:59 2013 -0700 @@ -27,7 +27,7 @@ ## \kappa_1 = {{{1\over N}\, ## \sum_{i=1}^N (@var{x}_i - \bar{@var{x}})^4} \over \sigma^4}, ## $$ -## where $N$ is the length of @var{x}, $\bar{@var{x}}$ its mean and $\sigma$ +## where $N$ is the length of @var{x}, $\bar{@var{x}}$ its mean, and $\sigma$ ## its (uncorrected) standard deviation. ## @end tex ## @ifnottex @@ -35,7 +35,7 @@ ## @example ## @group ## mean ((@var{x} - mean (@var{x})).^4) -## k1 = ------------------------. +## k1 = ------------------------ ## std (@var{x}).^4 ## @end group ## @end example @@ -46,11 +46,11 @@ ## The optional argument @var{flag} controls which normalization is used. ## If @var{flag} is equal to 1 (default value, used when @var{flag} is omitted ## or empty), return the sample kurtosis as defined above. If @var{flag} is -## equal to 0, return the "bias-corrected" kurtosis coefficient instead: +## equal to 0, return the @w{"bias-corrected"} kurtosis coefficient instead: ## @tex ## $$ ## \kappa_0 = 3 + {\scriptstyle N - 1 \over \scriptstyle (N - 2)(N - 3)} \, -## \left( (N + 1)\, \kappa_1 - 3 (N - 1) \right). +## \left( (N + 1)\, \kappa_1 - 3 (N - 1) \right) ## $$ ## @end tex ## @ifnottex @@ -65,7 +65,7 @@ ## ## @end ifnottex ## The bias-corrected kurtosis coefficient is obtained by replacing the sample -## second and fourth central moments by their unbiased versions. It is an +## second and fourth central moments by their unbiased versions. It is an ## unbiased estimate of the population kurtosis for normal populations. ## ## If @var{x} is a matrix, or more generally a multi-dimensional array, return