An R Introduction to Statistics

Central Moment

The kth central moment (or moment about the mean) of a data population is:

     1-∑N       k
μk = N    (xi - μ)
       i=1

Similarly, the kth central moment of a data sample is:

     1-∑n       k
mk = n    (xi - ¯x)
       i=1

In particular, the second central moment of a population is its variance.

Problem

Find the third central moment of eruption duration in the data set faithful.

Solution

We apply the function moment from the e1071 package. As it is not in the core R library, the package has to be installed and loaded into the R workspace.

> library(e1071)                    # load e1071 
> duration = faithful$eruptions     # eruption durations 
> moment(duration, order=3, center=TRUE) 
[1] -0.6149

Answer

The third central moment of eruption duration is -0.6149.

Exercise

Find the third central moment of eruption waiting period in faithful.