Stats.GetMeanEstimate Method

Definition

Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0

Overload List

GetMeanEstimate(Vector<Double>) Returns an estimate for the mean of the variable.
GetMeanEstimate(ReadOnlySpan<Double>, Boolean) Returns an estimate for the mean of the values in a span.

GetMeanEstimate(Vector<Double>)

Returns an estimate for the mean of the variable.
C#
public static Parameter<double> GetMeanEstimate(
	this Vector<double> values
)

Parameters

values  Vector<Double>
A vector.

Return Value

Parameter<Double>
A Parameter<T> value containing information about the value and the distribution of the mean of the variable.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<Double>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

The estimate is a snapshot. Missing-aware vectors exclude missing observations. At least two observed values are required to define the Student t distribution.

Exceptions

ArgumentNullExceptionvalues is null.

GetMeanEstimate(ReadOnlySpan<Double>, Boolean)

Returns an estimate for the mean of the values in a span.
C#
public static Parameter<double> GetMeanEstimate(
	this ReadOnlySpan<double> values,
	bool skipMissingValues = false
)

Parameters

values  ReadOnlySpan<Double>
A read-only span.
skipMissingValues  Boolean  (Optional)
Optional. Specifies whether missing values should be excluded from the calculation. The default is false.

Return Value

Parameter<Double>
A Parameter<T> value containing information about the value and the distribution of the mean of the variable.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ReadOnlySpan<Double>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

The estimate is a snapshot. At least two observed values are required.

Exceptions

ArgumentOutOfRangeExceptionFewer than two observed values remain.

See Also