# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

## Compute Measures of Dispersion

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

The measures of dispersion summarize how spread out (or scattered) the data values are on the number line. MuPAD® provides the following functions for calculating the measures of dispersion. These functions describe the deviation from the arithmetic average (mean) of a data sample:

The standard deviation and the variance are popular measures of dispersion. The standard deviation is the square root of the variance and has the desirable property of being in the same units as the data. For example, if the data is in meters, the standard deviation is also in meters. Both the standard deviation and the variance are sensitive to outliers. A data value that is separate from the body of the data can increase the value of the statistics by an arbitrarily large amount. For example, compute the variance and the standard deviation of the list `x` that contains one outlier:

```L := [1, 1, 1, 1, 1, 1, 1, 1, 100.0]: variance = stats::variance(L); stdev = stats::stdev(L)```

The mean deviation is also sensitive to outliers. Nevertheless, the large outlier in the list `x` affects the mean deviation less than it affects the variance and the standard deviation:

`meandev = stats::meandev(L)`

Now, compute the variance, the standard deviation, and the mean deviation of the list `y` that contains one small outlier. Again, the mean deviation is less sensitive to the outlier than the other two measures:

```S := [100, 100, 100, 100, 100, 100, 100, 100, 1.0]: variance = stats::variance(S); stdev = stats::stdev(S); meandev = stats::meandev(S)```