DADiSP Worksheet Functions > Function Categories > Statistics and Calculus > STD

 

STD

Purpose:

Calculates the sample or population standard deviation of a series.

Syntax:

STD(series, mode, dim)

series

-

Optional. Any series or expression resulting in a series. Defaults to the current Window.

mode

-

Optional. An integer, the normalization mode. For N = length(series):

0:

Normalize by 1/(N-1) (default)

1:

Normalize by 1/N

dim

-

Optional. An integer, the summation dimension.

1:

Compute standard deviation of each column (default)

2:

Compute standard deviation of each row

Returns:

A real scalar for a one column series or a 1xM real table for an M column series.

Example:

W1: 1..10

std(W1)

 

returns 3.0277 the sample standard deviation.

Example:

W1: 1..10

std(W1 + 1e7)

 

Returns 3.0277, same as above since the true standard deviation is independent of the mean value.

Example:

W1: 1..10

std(W1, 1)

 

Returns 2.8723, the population standard deviation.

Example:

W1: ravel(1..9, 3)^2

W2: std(W1, 0)

W3: std(W1, 0, 2)

 

W1 == {{1, 16, 49}

       {4, 25, 64},

       {9, 36, 81}}

 

W2 == {{4.0415, 10.0167, 16.0104}}

 

W3 == {24.5561,

       30.4467,

       36.3731}

 

W2 computes the standard deviation of each column of W1 and W3 computes the standard deviation of each row of W1.

Remarks:

For a series of length N, the basic form of the sample standard deviation (mode == 0) is:

 

image\std01.gif

 

where the arithmetic mean is defined as:

 

image\std02.gif

 

The population standard deviation (mode == 1) is defined as:

 

image\std03.gif

 

STD uses a fast, highly accurate running sums algorithm that exhibits insensitivity to round-off errors.

 

As shown in the second example, the standard deviation is independent of an additive mean value.

 

NaN values are ignored.

 

STD returns the standard deviation of each column for a multi-column series. See STDEV to return the standard deviation of a multi-column series as a whole.

See Also:

COLSTDEV

MEAN

MOVSTD

KURTOSIS

RMS

ROWSTDEV

SKEW

STATS

STDERR

STDEV