nan_statistic Descriptive Statistics nan_sumsq

NaN Toolbox >> NaN Toolbox > Descriptive Statistics > nan_std

nan_std

calculates the standard deviation.

Calling Sequence

[y,v] = nan_std(x [, opt[, DIM [, W]]])

Parameters

opt :

option

0:

normalizes with N-1 [default]

1:

normalizes with N,

otherwise:

DIM:

dimension

default or []:

first DIMENSION, with more than 1 element

W:

weights to compute weighted s.d. (default: [])

y:

estimated standard deviation

Description

features:

- provides an unbiased estimation of the S.D. - can deal with NaN's (missing values) - weighting of data - dimension argument also in Octave - compatible to Matlab and Octave

Examples

X=testmatrix('magi',3)
X([1 6:9]) = %nan*ones(1,5)
X  =
Nan   1.    Nan
3.    5.    Nan
4.    Nan   Nan
y = nan_std(X)
y =
0.7071068    2.8284271    Nan

See also

Bibliography

[1] http://mathworld.wolfram.com/StandardDeviationDistribution.html

Authors

nan_statistic Descriptive Statistics nan_sumsq