# stats::meandev

Mean deviation of a data sample

### Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

## Syntax

```stats::meandev(`x1, x2, …`)
stats::meandev(`[x1, x2, …]`)
stats::meandev(`s`, <`c`>)
```

## Description

```stats::meandev( x1, x2, …, xn)``` returns the mean deviation

,

where is the mean of the data xi.

If all data are floating-point numbers, a float is returned. For symbolic data, the mean is returned as a symbolic expression.

The column index `c` is optional if the data are given by a `stats::sample` object containing only one non-string column.

External statistical data stored in an ASCII file can be imported into a MuPAD® session via `import::readdata`. In particular, see Example 1 of the corresponding help page.

## Examples

### Example 1

We calculate the mean deviation of some data:

`stats::meandev(2, 33/7, PI)`

Alternatively, the data may be passed as a list:

`data:=[2, 33/7, PI]: stats::meandev(data)`

If all data are floating-point numbers, the result is a float:

`stats::meandev(float(data))`

`delete data:`

### Example 2

We create a sample of type `stats::sample`:

`s := stats::sample([[22, 4, 1], [9, 8/3, 1], [2.0, 3, x]])`
``` 22 4 1 9 8/3 1 2.0 3 x ```

The mean deviations of the columns are computed:

`stats::meandev(s, 1), stats::meandev(s, 2), stats::meandev(s, 3)`

`delete s:`

### Example 3

With symbolic arguments, the mean deviation is returned as a symbolic expression:

`stats::meandev(x1, x2, x3)`

## Parameters

 `x1, x2, …` The statistical data: arithmetical expressions `s` A sample of domain type stats::sample `c` A column index of the sample `s`: a positive integer. This column provides the data `x1`, `x2` etc.