Genex v0.2.1 Genex.Support.Statistics View Source

Provides basic summary statistics for use in the Population struct.

Link to this section Summary

Functions

Takes the max of list.

Takes the mean of list.

Takes the min of list.

Takes the standard deviation of list.

Takes the variance of list.

Link to this section Functions

Takes the max of list.

Returns Number.

Parameters

  • list: List of values.

Examples

iex> list = [1, 2, 3, 4, 5]
iex> max(list)
5

iex> list = []
iex> max(list)
nil

Takes the mean of list.

Returns Number.

Parameters

  • list: List of values.

Examples

iex> list = [1, 2, 3, 4, 5]
iex> mean(list)
3.0

iex> list = []
iex> mean(list)
0

Takes the min of list.

Returns Number.

Parameters

  • list: List of values.

Examples

iex> list = [1, 2, 3, 4, 5]
iex> min(list)
1

iex> list = []
iex> min(list)
nil

Takes the standard deviation of list.

Returns Number.

Parameters

  • list: List of values.

Examples

iex> list = [0, 1, 1, 1]
iex> stdev(list)
0.5

iex> list = []
iex> stdev(list)
0

Takes the variance of list.

Returns Number.

Parameters

  • list: List of values.

Examples

iex> list = [0, 1, 1, 1]
iex> variance(list)
0.25

iex> list = []
iex> variance(list)
0