The OpenD Programming Language

mir.stat

This package publicly imports mir.stat.* modules.

ModulesDescription
mir.stat.constantConstants used in other statistical modules
mir.stat.descriptiveDescriptive Statistics
mir.stat.distributionStatistical Distributions
mir.stat.inferenceProbability Density/Mass Functions
mir.stat.transformAlgorithms for statistical inference

Example

import mir.algorithm.iteration: all;
import mir.math.common: approxEqual, pow;
import mir.stat;
import mir.test: shouldApprox;

// mir.stat.descriptive
auto x = [1.0, 2, 3, 4];
x.mean.shouldApprox == 2.5;
x.kurtosis.shouldApprox == -1.2;

// mir.stat.distribution
4.binomialPMF(6, 2.0 / 3).shouldApprox == (15.0 * pow(2.0 / 3, 4) * pow(1.0 / 3, 2));

// mir.stat.transform
assert(x.zscore.all!approxEqual([-1.161895, -0.387298, 0.387298, 1.161895]));

// mir.stat.inference
auto y = [0.0, 1.0, 1.5, 2.0, 3.5, 4.25,
          2.0, 7.5, 5.0, 1.0, 1.5, 0.0];
double p;
y.dAgostinoPearsonTest(p).shouldApprox == 4.151936053369771;

Modules

constant
module mir.stat.constant

This module contains constants used in statistical algorithms.

descriptive
module mir.stat.descriptive

This package publicly imports mir.stat.descriptive.* modules.

distribution
module mir.stat.distribution

This package publicly imports mir.stat.distribution.* modules.

inference
module mir.stat.inference

This module contains statistical inference algorithms.

transform
module mir.stat.transform

This module contains algorithms for transforming data that are useful in statistical applications.

Public Imports

mir.stat.constant
public import mir.stat.constant;
mir.stat.descriptive
public import mir.stat.descriptive;
mir.stat.distribution
public import mir.stat.distribution;
mir.stat.inference
public import mir.stat.inference;
mir.stat.transform
public import mir.stat.transform;

Meta

Authors

John Michael Hall, Ilya Yaroshenko