Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - Português - 日本語 -

Please note that the recommended version of Scilab is 6.1.1. This page might be outdated.
However, this page did not exist in the previous stable version.

# stdev

standard deviation (row orcolumn-wise) of vector/matrix entries

### Calling Sequence

```y = stdev(x)
y = stdev(x, '*')
y = stdev(x, 'r')
y = stdev(x, 'c')
y = stdev(x, orien, m)```

### Arguments

x, y

real vector, matrix or hypermatrix

y

real scalar, vector or matrix

orien

string scalar or positive integer, can be `"*"`, `"r"` (or `1`) or `"c"` (or `2`)

m

real scalar, vector or hypermatrix, the a priori mean

### Description

stdev computes the "sample" standard deviation, that is, it is normalized by N-1, where N is the sequence length. If `m` is present, then `stdev` computes the mean squared deviation (normalized by N) using the a priori mean defined by `m`.

For a vector or a matrix `x`, `y=stdev(x)` returns in the scalar `y` the standard deviation of all the entries of `x`.

`y=stdev(x,'r')` (or, equivalently, `y=stdev(x,1)`) is the rowwise standard deviation. It returns in each entry of the row vector `y` the standard deviation of each column of `x`.

`y=stdev(x,'c')` (or, equivalently, `y=stdev(x,2)`) is the columnwise stdev. It returns in each entry of the column vector `y` the standard deviation of each row of `x`.

By extension, `y=stdev(x,n)` with `n` a positive integer returns the deviation along the `n`-th dimension, and if `n>ndims(x)`, then `stdev(x,n)` returns `zeros(x)`.

 If `m` is a scalar, then it is expanded to match the size of `mean(x)` along the `n`-th dimension.

### Examples

```A = [1 2 10; 7 7.1 7.01];
stdev(A)
stdev(A, 'r')
stdev(A, 'c')
stdev(A, 'c', mean(A,'c'))
stdev(A, 'c', 1)```

### See Also

• nanstdev — standard deviation (ignoring the NANs).
• stdevf — standard deviation
• sum — сумма элементов массива
• median — median (row median, column median,...) of vector/matrix/array entries
• mean — mean (row mean, column mean) of vector/matrix entries

### History

 Версия Описание 5.5.0 Can now compute the mean squared deviation using the a priori mean defined by `m`

### Comments

Add a comment:
Please login to comment this page.

 Report an issue << st_deviation Descriptive Statistics stdevf >>

 Scilab EnterprisesCopyright (c) 2011-2017 (Scilab Enterprises)Copyright (c) 1989-2012 (INRIA)Copyright (c) 1989-2007 (ENPC)with contributors Last updated:Fri Apr 11 14:19:39 CEST 2014