Statwise.Descriptive (Statwise v0.1.0)

Copy Markdown View Source

Basic descriptive statistics for lists and one-dimensional Nx tensors.

All functions accept nan_policy: :raise | :propagate | :omit.

Summary

Functions

Returns the number of observations after applying nan_policy.

Returns the arithmetic mean of a non-empty sample.

Returns the sample standard error.

Returns the square root of variance/2.

Returns the sum of a non-empty sample.

Returns sample variance by default. Use correction: 0 for population variance.

Types

nan_policy()

@type nan_policy() :: :raise | :propagate | :omit

sample()

@type sample() :: [number() | :nan] | Nx.Tensor.t()

Functions

count(sample, opts \\ [])

@spec count(
  sample(),
  keyword()
) :: non_neg_integer()

Returns the number of observations after applying nan_policy.

mean(sample, opts \\ [])

@spec mean(
  sample(),
  keyword()
) :: float() | :nan

Returns the arithmetic mean of a non-empty sample.

standard_error(sample, opts \\ [])

@spec standard_error(
  sample(),
  keyword()
) :: float() | :nan

Returns the sample standard error.

stddev(sample, opts \\ [])

@spec stddev(
  sample(),
  keyword()
) :: float() | :nan

Returns the square root of variance/2.

sum(sample, opts \\ [])

@spec sum(
  sample(),
  keyword()
) :: float() | :nan

Returns the sum of a non-empty sample.

variance(sample, opts \\ [])

@spec variance(
  sample(),
  keyword()
) :: float() | :nan

Returns sample variance by default. Use correction: 0 for population variance.