Click or drag to resize

Univariate Class

Contains methods for analyzing univariate samples.
Inheritance Hierarchy
SystemObject
  Meta.Numerics.StatisticsUnivariate

Namespace:  Meta.Numerics.Statistics
Assembly:  Meta.Numerics (in Meta.Numerics.dll) Version: 4.1.4
Syntax
public static class Univariate

The Univariate type exposes the following members.

Methods
  NameDescription
Public methodStatic memberCentralMoment
Computes the given sample central moment.
Public methodStatic memberChiSquaredTest
Tests whether the sample is compatible with the given discrete distribution.
Public methodStatic memberCorrectedStandardDeviation
Computes the Bessel-corrected standard deviation.
Public methodStatic memberFisherFTest
Tests whether the variances of two samples are compatible.
Public methodStatic memberFitToBeta
Finds the Beta distribution that best fits the given sample.
Public methodStatic memberFitToExponential
Finds the exponential distribution that best fits the given sample.
Public methodStatic memberFitToGamma
Finds the Gamma distribution that best fits the given sample.
Public methodStatic memberFitToGumbel
Find the Gumbel distribution that best fit the given sample.
Public methodStatic memberFitToLognormal
Finds the log-normal distribution that best fits the given sample.
Public methodStatic memberFitToNormal
Finds the normal distribution that best fits the given sample.
Public methodStatic memberFitToRayleigh
Finds the Rayleigh distribution that best fits the given sample.
Public methodStatic memberFitToWald
Finds the Wald distribution that best fits a sample.
Public methodStatic memberFitToWeibull
Finds the Weibull distribution that best fits the given sample.
Public methodStatic memberInterquartileRange
Finds the interquartile range.
Public methodStatic memberInverseLeftProbability
Finds the sample value corresponding to a given percentile.
Public methodStatic memberKolmogorovSmirnovTest(IReadOnlyListDouble, ContinuousDistribution)
Tests whether the sample is compatible with the given distribution.
Public methodStatic memberKolmogorovSmirnovTest(IReadOnlyListDouble, IReadOnlyListDouble)
Tests whether the sample is compatible with another sample.
Public methodStatic memberKruskalWallisTest(IReadOnlyListIReadOnlyListDouble)
Performs a Kruskal-Wallis test on the given samples.
Public methodStatic memberKruskalWallisTest(IReadOnlyListDouble)
Performs a Kruskal-Wallis test on the given samples.
Public methodStatic memberKuiperTest
Tests whether the sample is compatible with the given distribution.
Public methodStatic memberLeftProbability
Gets the fraction of values equal to or less than the given value.
Public methodStatic memberMannWhitneyTest
Tests whether one sample median is compatible with another sample median.
Public methodStatic memberMaximum
Finds the maximum value.
Public methodStatic memberMaximumLikelihoodFit
Finds the parameters that make an arbitrary, parameterized distribution best fit the sample.
Public methodStatic memberMean
Computes the sample mean.
Public methodStatic memberMedian
Finds the median.
Public methodStatic memberMinimum
Finds the minimum value.
Public methodStatic memberOneWayAnovaTest(IReadOnlyCollectionIReadOnlyCollectionDouble)
Performs a one-way analysis of variance (ANOVA).
Public methodStatic memberOneWayAnovaTest(IReadOnlyCollectionDouble)
Performs a one-way analysis of variance (ANOVA).
Public methodStatic memberPopulationCentralMoment
Estimates the given central moment of the underlying population.
Public methodStatic memberPopulationMean
Estimates the mean of the underlying population.
Public methodStatic memberPopulationRawMoment
Estimates the given raw moment of the underlying population.
Public methodStatic memberPopulationStandardDeviation
Estimates of the standard deviation of the underlying population.
Public methodStatic memberPopulationVariance
Estimates of the variance of the underlying population.
Public methodStatic memberRawMoment
Computes the given sample raw moment.
Public methodStatic memberShapiroFranciaTest
Performs a Shapiro-Francia test of normality on the sample.
Public methodStatic memberSignTest
Tests whether the sample median is compatible with the given reference value.
Public methodStatic memberSkewness
Computes the sample skewness.
Public methodStatic memberStandardDeviation
Computes the sample standard deviation.
Public methodStatic memberStudentTTest(IReadOnlyCollectionDouble, IReadOnlyCollectionDouble)
Tests whether one sample mean is compatible with another sample mean.
Public methodStatic memberCode exampleStudentTTest(IReadOnlyCollectionDouble, Double)
Tests whether the sample mean is compatible with the reference mean.
Public methodStatic memberTrimean
Finds the tri-mean.
Public methodStatic memberTwoWayAnovaTest
Performs a two-way analysis of variance.
Public methodStatic memberVariance
Computes the sample variance.
Public methodStatic memberCode exampleZTest
Performs a z-test to test whether the given sample is compatible with the given normal reference population.
Top
Remarks

This is the central class for the analysis of univariate samples of independent, identically distributed values.

To compute moments of the sample data, you can use methods such as Mean, Variance, RawMoment, and CentralMoment. Note that these are moments of the sample data, not estimates of the moments of the underlying population from which the sample was drawn.

To obtain estimates of the moments of the underlying population from which the sample was drawn, you can use methods such as PopulationMean, PopulationStandardDeviation, PopulationRawMoment, and PopulationCentralMoment. These estimates all come with associated error bars, so they return UncertainValue structures.

You can fit a sample to any number of distributions using methods such as FitToExponential(IReadOnlyListDouble), FitToLognormal(IReadOnlyListDouble), FitToNormal(IReadOnlyListDouble), FitToWeibull(IReadOnlyListDouble).

You can perform statistical tests on a single sample, such as the StudentTTest(IReadOnlyCollectionDouble, Double) or SignTest(IReadOnlyCollectionDouble, Double) to compare a sample to a reference value, or the ShapiroFranciaTest(IReadOnlyListDouble) to test a sample for normality. You can also perform statistical tests comparing multiple samples, such as the two-sample StudentTTest(IReadOnlyCollectionDouble, IReadOnlyCollectionDouble), and MannWhitneyTest(IReadOnlyListDouble, IReadOnlyListDouble), or the multi-sample OneWayAnovaTest(IReadOnlyCollectionDouble) and KruskalWallisTest(IReadOnlyListDouble).

Most of the methods in this class are extension methods that accept as a sample any type that implements the appropriate collection interface. So, for example, given sample values in a List<string> named s, you could estimate the variance of the population from which it was drawn either by s.PopulationVariance() or Univariate.PopulationVariance(s).

See Also