|
|
@ -4,7 +4,7 @@ |
|
|
// http://github.com/mathnet/mathnet-numerics
|
|
|
// http://github.com/mathnet/mathnet-numerics
|
|
|
// http://mathnetnumerics.codeplex.com
|
|
|
// http://mathnetnumerics.codeplex.com
|
|
|
//
|
|
|
//
|
|
|
// Copyright (c) 2009-2013 Math.NET
|
|
|
// Copyright (c) 2009-2015 Math.NET
|
|
|
//
|
|
|
//
|
|
|
// Permission is hereby granted, free of charge, to any person
|
|
|
// Permission is hereby granted, free of charge, to any person
|
|
|
// obtaining a copy of this software and associated documentation
|
|
|
// obtaining a copy of this software and associated documentation
|
|
|
@ -30,6 +30,7 @@ |
|
|
|
|
|
|
|
|
using System; |
|
|
using System; |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Generic; |
|
|
|
|
|
using System.Runtime.Serialization; |
|
|
|
|
|
|
|
|
namespace MathNet.Numerics.Statistics |
|
|
namespace MathNet.Numerics.Statistics |
|
|
{ |
|
|
{ |
|
|
@ -40,6 +41,7 @@ namespace MathNet.Numerics.Statistics |
|
|
/// in increased accuracy mode.
|
|
|
/// in increased accuracy mode.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
/// <remarks>Consider to use RunningStatistics instead.</remarks>
|
|
|
/// <remarks>Consider to use RunningStatistics instead.</remarks>
|
|
|
|
|
|
[DataContract(Namespace = "urn:MathNet/Numerics")] |
|
|
public class DescriptiveStatistics |
|
|
public class DescriptiveStatistics |
|
|
{ |
|
|
{ |
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
@ -104,24 +106,28 @@ namespace MathNet.Numerics.Statistics |
|
|
/// Gets the size of the sample.
|
|
|
/// Gets the size of the sample.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
/// <value>The size of the sample.</value>
|
|
|
/// <value>The size of the sample.</value>
|
|
|
|
|
|
[DataMember(Order = 1)] |
|
|
public long Count { get; private set; } |
|
|
public long Count { get; private set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets the sample mean.
|
|
|
/// Gets the sample mean.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
/// <value>The sample mean.</value>
|
|
|
/// <value>The sample mean.</value>
|
|
|
|
|
|
[DataMember(Order = 2)] |
|
|
public double Mean { get; private set; } |
|
|
public double Mean { get; private set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets the unbiased population variance estimator (on a dataset of size N will use an N-1 normalizer).
|
|
|
/// Gets the unbiased population variance estimator (on a dataset of size N will use an N-1 normalizer).
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
/// <value>The sample variance.</value>
|
|
|
/// <value>The sample variance.</value>
|
|
|
|
|
|
[DataMember(Order = 3)] |
|
|
public double Variance { get; private set; } |
|
|
public double Variance { get; private set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets the unbiased population standard deviation (on a dataset of size N will use an N-1 normalizer).
|
|
|
/// Gets the unbiased population standard deviation (on a dataset of size N will use an N-1 normalizer).
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
/// <value>The sample standard deviation.</value>
|
|
|
/// <value>The sample standard deviation.</value>
|
|
|
|
|
|
[DataMember(Order = 4)] |
|
|
public double StandardDeviation { get; private set; } |
|
|
public double StandardDeviation { get; private set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
@ -129,6 +135,7 @@ namespace MathNet.Numerics.Statistics |
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
/// <value>The sample skewness.</value>
|
|
|
/// <value>The sample skewness.</value>
|
|
|
/// <remarks>Returns zero if <see cref="Count"/> is less than three. </remarks>
|
|
|
/// <remarks>Returns zero if <see cref="Count"/> is less than three. </remarks>
|
|
|
|
|
|
[DataMember(Order = 5)] |
|
|
public double Skewness { get; private set; } |
|
|
public double Skewness { get; private set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
@ -136,18 +143,21 @@ namespace MathNet.Numerics.Statistics |
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
/// <value>The sample kurtosis.</value>
|
|
|
/// <value>The sample kurtosis.</value>
|
|
|
/// <remarks>Returns zero if <see cref="Count"/> is less than four. </remarks>
|
|
|
/// <remarks>Returns zero if <see cref="Count"/> is less than four. </remarks>
|
|
|
|
|
|
[DataMember(Order = 6)] |
|
|
public double Kurtosis { get; private set; } |
|
|
public double Kurtosis { get; private set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets the maximum sample value.
|
|
|
/// Gets the maximum sample value.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
/// <value>The maximum sample value.</value>
|
|
|
/// <value>The maximum sample value.</value>
|
|
|
|
|
|
[DataMember(Order = 7)] |
|
|
public double Maximum { get; private set; } |
|
|
public double Maximum { get; private set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets the minimum sample value.
|
|
|
/// Gets the minimum sample value.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
/// <value>The minimum sample value.</value>
|
|
|
/// <value>The minimum sample value.</value>
|
|
|
|
|
|
[DataMember(Order = 8)] |
|
|
public double Minimum { get; private set; } |
|
|
public double Minimum { get; private set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
|