changeset 17698:9bb5d3f63cdd

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.
author Rik <rik@octave.org>
date Sat, 19 Oct 2013 07:33:59 -0700
parents f0e777cf348f
children 1be2993d3656
files NEWS scripts/statistics/base/kurtosis.m
diffstat 2 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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".
 
--- 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