---
title: "Statistic"
description: "Static statistical functions."
canonical_url: "https://www.zeyos.com/zymba/ref/statistic"
markdown_url: "https://www.zeyos.com/ai/guide/zymba/ref/statistic.md"
section: "zymba-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/zymbaref.json"
source_sha256: "05a361c6ddc32e74f4a6dc16fd06f218210ff1b7ce57f26ca1994bfffc407915"
---

# Statistic

## Statistic

```
object @Statistic() {
	arithmeticMean(object $values, ?object $weights): number {}
	average(object $values): number {}
	averageDeviation(object $values, ?number $center): number {}
	centralMoment(object $values, number $order, ?number $center): number {}
	count(object $values): int {}
	exponentialMovingAverage(object $values, ?number $exponent): number {}
	geometricMean(object $values, ?object $weights): float {}
	harmonicMean(object $values, ?object $weights): number {}
	kurtosisPop(object $values): number {}
	kurtosisSamp(object $values): number {}
	linearMovingAverage(object $values): number {}
	maximum(object $values): number {}
	median(object $values): number {}
	medianDeviation(object $values): number {}
	midrange(object $values): number {}
	minimum(object $values): number {}
	mode(object $values): object {}
	product(object $values): number {}
	quadraticMean(object $values): float {}
	range(object $values): number {}
	rawMoment(object $values, number $order): number {}
	skewnessPop(object $values): float {}
	skewnessSamp(object $values): float {}
	standardDeviationPop(object $values): float {}
	standardDeviationSamp(object $values): float {}
	standardScore(object $values): object {}
	sum(object $values): number {}
	variancePop(object $values): number {}
	varianceSamp(object $values): number {}
}
```

**Static statistical functions.**

## Functions


### `@Statistic.arithmeticMean()`


Calculates the arithmetic mean of a list of values.

```code
@Statistic.arithmeticMean(object $values, ?object $weights): number
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |
| weights | `?object`  |  | unweighted |

##### Returns

| Type | Value |
| --- | ---  |
| `number` |  |
| `null` |  |




### `@Statistic.average()`


Calculates the average of a list of values.

```code
@Statistic.average(object $values): number
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `number` |  |
| `null` |  |




### `@Statistic.averageDeviation()`


Calculates the average absolute deviation of a list of values.

```code
@Statistic.averageDeviation(object $values, ?number $center): number
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |
| center | `?number`  |  | arithmetic mean of values |

##### Returns

| Type | Value |
| --- | ---  |
| `number` |  |
| `null` |  |




### `@Statistic.centralMoment()`


Calculates the central moment of a list of values.

```code
@Statistic.centralMoment(object $values, number $order, ?number $center): number
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |
| order | `number`  |  | 2 |
| center | `?number`  |  | arithmetic mean of values |

##### Returns

| Type | Value |
| --- | ---  |
| `number` |  |
| `null` |  |




### `@Statistic.count()`


Counts the total number of values.

```code
@Statistic.count(object $values): int
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `int` |  |




### `@Statistic.exponentialMovingAverage()`


Calculates the exponential moving average of a list of values.

```code
@Statistic.exponentialMovingAverage(object $values, ?number $exponent): number
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |
| exponent | `?number`  | (default: 2/(N+1)) | null |

##### Returns

| Type | Value |
| --- | ---  |
| `number` |  |
| `null` |  |




### `@Statistic.geometricMean()`


Calculates the geometric mean of a list of values.

```code
@Statistic.geometricMean(object $values, ?object $weights): float
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |
| weights | `?object`  |  | unweighted |

##### Returns

| Type | Value |
| --- | ---  |
| `float` |  |
| `null` |  |




### `@Statistic.harmonicMean()`


Calculates the harmonic mean of a list of values.

```code
@Statistic.harmonicMean(object $values, ?object $weights): number
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |
| weights | `?object`  |  | unweighted |

##### Returns

| Type | Value |
| --- | ---  |
| `number` |  |
| `null` |  |




### `@Statistic.kurtosisPop()`


```code
@Statistic.kurtosisPop(object $values): number
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `number` |  |
| `null` |  |




### `@Statistic.kurtosisSamp()`


```code
@Statistic.kurtosisSamp(object $values): number
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `number` |  |
| `null` |  |




### `@Statistic.linearMovingAverage()`


Calculates the linear weighted moving average of a list of values.

```code
@Statistic.linearMovingAverage(object $values): number
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `number` |  |
| `null` |  |




### `@Statistic.maximum()`


Measures the maximum of a list of values.

```code
@Statistic.maximum(object $values): number
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `number` |  |
| `null` |  |




### `@Statistic.median()`


Measures the median of a list of values.

```code
@Statistic.median(object $values): number
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `number` |  |
| `null` |  |




### `@Statistic.medianDeviation()`


Calculates the median absolute deviation of a list of values.

```code
@Statistic.medianDeviation(object $values): number
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `number` |  |
| `null` |  |




### `@Statistic.midrange()`


Measures the mid-range of a list of values.

```code
@Statistic.midrange(object $values): number
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `number` |  |
| `null` |  |




### `@Statistic.minimum()`


Measures the minimum of a list of values.

```code
@Statistic.minimum(object $values): number
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `number` |  |
| `null` |  |




### `@Statistic.mode()`


Measures the mode of a list of values.

```code
@Statistic.mode(object $values): object
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [number, ...] |




### `@Statistic.product()`


Calculates the product of a list of values.

```code
@Statistic.product(object $values): number
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `number` |  |
| `null` |  |




### `@Statistic.quadraticMean()`


Calculates the quadratic mean of a list of values.

```code
@Statistic.quadraticMean(object $values): float
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `float` |  |
| `null` |  |




### `@Statistic.range()`


Measures the range of a list of values.

```code
@Statistic.range(object $values): number
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `number` |  |
| `null` |  |




### `@Statistic.rawMoment()`


Calculates the raw moment of a list of values.

```code
@Statistic.rawMoment(object $values, number $order): number
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |
| order | `number`  |  | 2 |

##### Returns

| Type | Value |
| --- | ---  |
| `number` |  |
| `null` |  |




### `@Statistic.skewnessPop()`


```code
@Statistic.skewnessPop(object $values): float
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `float` |  |
| `null` |  |




### `@Statistic.skewnessSamp()`


```code
@Statistic.skewnessSamp(object $values): float
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `float` |  |
| `null` |  |




### `@Statistic.standardDeviationPop()`


Calculates the population standard deviation of a list of values.

```code
@Statistic.standardDeviationPop(object $values): float
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `float` |  |
| `null` |  |




### `@Statistic.standardDeviationSamp()`


Calculates the sample standard deviation of a list of values.

```code
@Statistic.standardDeviationSamp(object $values): float
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `float` |  |
| `null` |  |




### `@Statistic.standardScore()`


Calculates the standard scores for a list of values.

```code
@Statistic.standardScore(object $values): object
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [score, ...] |




### `@Statistic.sum()`


Sums up a list of values.

```code
@Statistic.sum(object $values): number
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `number` |  |
| `null` |  |




### `@Statistic.variancePop()`


Calculates the population variance of a list of values.

```code
@Statistic.variancePop(object $values): number
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `number` |  |
| `null` |  |




### `@Statistic.varianceSamp()`


Calculates the sample variance of a list of values.

```code
@Statistic.varianceSamp(object $values): number
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| values | `object`  | [value, ...] | [] |

##### Returns

| Type | Value |
| --- | ---  |
| `number` |  |
| `null` |  |
