# 2.13.1.20 stats

## Brief Information

Compute descriptive statistics on data columns

## Command Line Usage

 

1. stats ix:=col(1) 

2. stats ix:=col(1) mean:=mymean sd:=mysd sum:=mysum; 

## Variables

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

Input

vector

<active>

This variable specifies the range of input data for which descriptive statistics will be calculated.

Mean mean

Output

double

<unassigned>

This variable specifies the name of output mean value.

Standard Deviation sd

Output

double

<unassigned>

This variable specifies the name of the output standard deviation value.

Number of Observations n

Output

int

<unassigned>

This variable specifies the name or label for the sample size.

Minimum min

Output

double

<unassigned>

This variable specifies a label for the minimum value of the data set.

Maximum max

Output

double

<unassigned>

This command specifies the name of output maximum value.

Sum sum

Output

double

<unassigned>

This command specifies a name for the output sum value, which can be used in later operations.

Number of Missing Values missing

Output

int

<unassigned>

This command outputs the number of missing data points in the data set.

## Description

Descriptive statistics are used to describe the basic aspects of a group of data, including its average and standard deviation. These statistics summarize sample data with standard measures so that general properties of the data are known, and the data set can be compared to other sets of similar data.

## Examples

1. To return descriptive statistics for a column of data that is highlighted, type into the Command Window:
stats
Otherwise, specify the column on which to perform analysis in the script by typing, for example:
stats ix:=col(A);

2. You can also define labels for the variables and use them in later operations, for example:
stats ix:=col(a) mean:=m sd:=std sum:=mysum

## Algorithm

Let denote the input values. Then the computation equations can be expressed as follows

## References

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