2.13.1.12 moments

Brief Information

Compute moments on worksheet data

Command Line Usage

1. moments ix:=Col(1);

2. moments ix:=Col(1) mean:=mymean;

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input ix

Input

vector

<active>

Specifies the input data range

Mean mean

Output

double

<unassigned>

The variable specifies the output for the arithmetic average.

Standard Deviation sd

Output

double

<unassigned>

The variable specifies the output for the standard deviation, which is a statistical measure of the distance a quantity is likely to lie from the average value of a group of data.

SE of Mean se

Output

double

<unassigned>

The variable specifies the output for the standard error of the mean, which is used to estimate the deviation of the population mean.

Number of Observations n

Output

int

<unassigned>

The variable specifies the output for the number of valid observations

Sum sum

Output

double

<unassigned>

The variable specifies the output for the arithmetic sum of selected dataset

Skewness skewness

Output

double

<unassigned>

The variable specifies the output for skewness, which reveals the symmetry of sample distribution. A positive skewness implies the distribution curve skew to right while a negative value indicates the curve skew to left

Kurtosis kurtosis

Output

double

<unassigned>

The variable specifies the output for kurtosis, which indicates how flat or peaked a distribution is. Negative values correspond to flat distributions, while positive values correspond to peaked distributions.

Coefficient of Variation cv

Output

double

<unassigned>

The variable specifies the coefficient of variation, which gives a measure of how dispersed a dataset is. This measure can be used to compare distributions of different sizes and with different means.

Description

The "moments" command displays the mean, standard deviation, and other summary statistics of a given dataset. moments are used to describe certain basic features of the data in a study.

In the context of statistical analysis, moments include measures such as mean, standard deviation, standard error, kurtosis, skewness, and coefficient of variation.

Examples

1. List all input and output results of descriptive statistics of given dataset, we assume data are put in 1st column of active worksheet.
In Command Window, type the following:

moments ix:=col(a);

2. To return the standard deviation of given dataset from the Command Window, type the following (we assume that the data are put in 1st column of active worksheet):
moments ix:=col(a) sd:=mysd; mysd=

Algorithm

Let Moments help English files image002.gif for Moments help English files image004.gif denotes the input values, then:

1. Mean is computed using the following equation: Moments help English files image006.gif

2. Standard deviation is computed as follows: Moments help English files image008.gif

3. Standard error is computed as: Moments help English files image010.gif

4. Sample size is the total number of valid values in a data set

5. Sum is computed using following equation: Moments help English files image012.gif

6. Skewness is computed as: Moments help English files image014.gif

7. Kurtosis is computed as: Moments help English files image016.gif

8. Coefficient of variance is computed as: Moments help English files image018.gif

References

Silverman, B.W. (1986), Density Estimation for Statistics and Data Analysis. New York: Chapman and Hall.

Tukey, J.W. (1977), Exploratory Data Analysis. Reading, MA: Addison-Wesley.

Erickson, B.H. and Nosanchuk, T.A. (1992) Understanding Data. Second Edition. Buckingham: Open University Press.

Related X-Functions

stats, quantiles, rowstats, rowquantiles


Keywords:summary statistics, mean, median, standard deviation, skewness, kurtosis