Represents a statistical variable that takes on numerical values.

Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (Extreme.Numerics)

Syntax

Visual Basic (Declaration)
Public NotInheritable Class NumericalVariable _
	Inherits Variable _
	Implements IList(Of Double), ICollection(Of Double), IEnumerable(Of Double), IEnumerable
C#
public sealed class NumericalVariable : Variable, IList<double>, ICollection<double>, IEnumerable<double>, IEnumerable
C++
public ref class NumericalVariable sealed : public Variable, IList<double>, ICollection<double>, IEnumerable<double>, IEnumerable

Methods

IconTypeDescription
static memberAdd(NumericalVariable, NumericalVariable)
Returns the sum of two NumericalVariable objects.
static memberAdd(NumericalVariable, Double)
Returns a NumericalVariable obtained by adding a number to each value of a NumericalVariable.
static memberAdd(Double, NumericalVariable)
Returns a NumericalVariable obtained by adding a number to each value of a NumericalVariable.
Add(Double)
Adds an observation to the variable.
static memberAddition(NumericalVariable, NumericalVariable)
Returns the sum of two NumericalVariable objects.
static memberAddition(NumericalVariable, Double)
Returns a NumericalVariable obtained by adding a number to each value of a NumericalVariable.
static memberAddition(Double, NumericalVariable)
Returns a NumericalVariable obtained by adding a number to each value of a NumericalVariable.
Aggregate(Int32[]())
Aggregates the values in the variable using the variable's aggregator.
Aggregate(Int32[](), Aggregator)
Aggregates the values in the variable using the specified aggregator.
static memberApply(RealFunction, NumericalVariable)
Applies a real function of one variable to each data element of a Variable.
Clear()
Removes all observations from the variable.
Clone()
Returns a Variable containing a copy of the observations that match the current filter.
Compare(Int32, Int32)
Compares the observations at the specified position.
Contains(Double)
Determines whether the variable contains a specific observation.
CopyTo(Double[](), Int32)
Copies the numerical data in this variable to the specified Double array.
CopyTo(GeneralVector)
Copies the numerical data in this variable to the specified vector.
CopyTo(Double[]())
Copies the numerical data in this variable to the specified Double array.
CreateIndicatorVariable(Double)
Constructs an indicator variable for the specified level.
CreateIndicatorVariable(Double, Double)
Constructs an indicator variable for the specified levels.
static memberCreateLogarithmicRange(Int32, Double, Double)
Returns a NumericalVariable whose observations span the specified range.
static memberCreateRange(Int32)
Returns a NumericalVariable whose observations span the specified range.
static memberCreateRange(Int32, Int32)
Returns a NumericalVariable whose observations span the specified range.
static memberCreateRange(Int32, Double, Double)
Returns a NumericalVariable whose observations span the specified range.
CreateSubset(Int32, Int32)
Returns a Variable containing a copy of the observations within the specified range.
CreateSubset(Filter)
Returns a Variable containing a copy of the observations that match the specified filter.
CreateView(Filter)
Returns a Variable containing the observations that match the specified filter.
CreateView(Int32, Int32)
Returns a Variable containing the observations within the specified range.
static memberDivide(NumericalVariable, NumericalVariable)
Returns the quotient of two NumericalVariable objects.
static memberDivide(NumericalVariable, Double)
Returns a NumericalVariable obtained by dividing each value of a NumericalVariable by a factor.
static memberDivide(Double, NumericalVariable)
Returns a NumericalVariable obtained by dividing a factor by each value of a NumericalVariable.
static memberDivision(NumericalVariable, NumericalVariable)
Returns the quotient of two NumericalVariable objects.
static memberDivision(NumericalVariable, Double)
Returns a NumericalVariable obtained by dividing each value of a NumericalVariable by a factor.
static memberDivision(Double, NumericalVariable)
Returns a NumericalVariable obtained by dividing a factor by each value of a NumericalVariable.
static memberEquals(NumericalVariable, NumericalVariable)
Returns whether two NumericalVariable objects are equal.
Equals(Object)
Determines whether the specified Object is equal to the current Object.
Finalize()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
GetAutocorrelation(Int32)
Returns the autocorrelation for the specified lag.
GetAutocorrelation()
Returns the lag-1 autocorrelation of the numerical variable.
GetAverageAbsoluteDeviation()
Returns the absolute deviation from the mean.
GetAverageAbsoluteDeviation(Double)
Returns the absolute deviation from the specified mean value.
GetCorrelation(NumericalVariable)
Gets the Pearson correlation coefficent with another NumericalVariable.
static memberGetCorrelation(NumericalVariable, NumericalVariable)
Gets the Pearson correlation coefficent between two numerical variables.
GetCovariance(NumericalVariable)
Gets the covariance with another NumericalVariable.
static memberGetCovariance(NumericalVariable, NumericalVariable)
Gets the covariance of two numerical variables.
GetEnumerator()
Returns an enumerator that can iterate through the observations of the variable.
GetGeometricMean()
Returns the geometric mean of the variable.
GetHarmonicMean()
Returns the harmonic mean of the variable.
GetHashCode()
Serves as a hash function for a particular type.
GetInterQuartileRange()
Returns the inter-quartile range of the elements of an array.
GetMedianAbsoluteDeviation()
Returns the median absolute deviation of a variable.
GetMidMean()
Returns the mean of the data values between the 25th and 75th percentiles.
GetPercentile(Int32)
Gets the specified percentile.
GetPercentiles(Int32[]())
Gets the specified percentiles.
GetRankCorrelation(NumericalVariable)
Gets the Spearman rank correlation coefficent with another NumericalVariable.
static memberGetRankCorrelation(NumericalVariable, NumericalVariable)
Gets the Spearman rank correlation coefficent between two numerical variables.
GetTrimmedMean(Double)
Returns the trimmed mean.
GetType()
Gets the Type of the current instance.
GetValue(Int32)
Gets the observation at the specified index.
GetValueUnfiltered(Int32)
Gets the value of the variable at the specified index.
GetWinsorizedMean(Double)
Returns the Winsorized mean of the variable..
IndexOf(Double)
Determines the index of a specific observation of the variable.
Insert(Int32, Object)
Inserts an observation to the variable at the specified index.
Insert(Int32, Double)
Inserts an observation to the variable at the specified index.
IsMissing(Int32)
Returns a value that indicates whether the observation at the specified index is missing.
static memberMax(NumericalVariable, Double)
Returns a NumericalVariable whose observations are the maximum of the original observations and a real number.
static memberMax(Double, NumericalVariable)
Returns a NumericalVariable whose observations are the maximum of the original observations and a real number.
static memberMax(NumericalVariable, NumericalVariable)
Returns a NumericalVariable whose observations are the maximum of the observations of two numerical variables.
MemberwiseClone()
Creates a shallow copy of the current Object.
static memberMin(NumericalVariable, Double)
Returns a NumericalVariable whose observations are the minimum of the original observations and a real number.
static memberMin(Double, NumericalVariable)
Returns a NumericalVariable whose observations are the minimum of the original observations and a real number.
static memberMin(NumericalVariable, NumericalVariable)
Returns a NumericalVariable whose observations are the minimum of the observations of two numerical variables.
static memberMultiply(NumericalVariable, NumericalVariable)
Returns the product of two NumericalVariable objects.
static memberMultiply(NumericalVariable, Double)
Returns a NumericalVariable obtained by multiplying a factor by each value of a NumericalVariable.
static memberMultiply(Double, NumericalVariable)
Returns a NumericalVariable obtained by multiplying a factor by each value of a NumericalVariable.
static memberMultiply(NumericalVariable, NumericalVariable)
Returns the product of two NumericalVariable objects.
static memberMultiply(NumericalVariable, Double)
Returns a NumericalVariable obtained by multiplying a factor by each value of a NumericalVariable.
static memberMultiply(Double, NumericalVariable)
Returns a NumericalVariable obtained by multiplying a factor by each value of a NumericalVariable.
static memberNegate(NumericalVariable)
Negates the value of a NumericalVariable object.
Normalize()
Returns the variable normalized.
static memberPlus(NumericalVariable)
Returns the value of a NumericalVariable object.
static memberPower(NumericalVariable, Int32)
Returns a NumericalVariable obtained by raising each value of a NumericalVariable to the specified power.
static memberPower(NumericalVariable, Double)
Returns a NumericalVariable obtained by raising each value of a NumericalVariable to the specified power.
Remove(Double)
Removes the first occurrence of a specific observation from the variable.
RemoveAll(Double)
Removes all occurrences of a specific observation from the variable.
RemoveAt(Int32)
Removes the observation at the specified index.
ReplaceMissingValues(MissingValueAction)
Replaces the missing observations with a suitable value.
ReplaceMissingValues(MissingValueAction, Double)
Replaces the missing observations with a suitable value.
ReplaceValues(Double, Double)
Replaces all observations that equal the specified value with another value.
ResetCalculations()
Performs actions necessary when the variable's data has changed.
Reverse()
Reverses the observations in the variable.
SetValue(Object, Int32)
Sets the observation at the specified index to the specified value.
SetValueUnfiltered(Object, Int32)
Sets the value of the variable at the specified index.
Sort()
Sorts the observations in the order specified by the SortOrder property.
Sort(SortOrder)
Sorts the observations in the order specified by the SortOrder property.
static memberSubtract(NumericalVariable, NumericalVariable)
Returns the difference between two NumericalVariable objects.
static memberSubtract(Double, NumericalVariable)
Returns a NumericalVariable obtained by subtracting each value of a NumericalVariable from a number .
static memberSubtract(NumericalVariable, Double)
Returns a NumericalVariable obtained by subtracting a number from each value of a NumericalVariable.
static memberSubtraction(NumericalVariable, NumericalVariable)
Returns the difference between two NumericalVariable objects.
static memberSubtraction(Double, NumericalVariable)
Returns a NumericalVariable obtained by subtracting a number from each value of a NumericalVariable.
static memberSubtraction(NumericalVariable, Double)
Returns a NumericalVariable obtained by subtracting a number from each value of a NumericalVariable.
ToArray()
Returns all the observations of this variable in an array.
ToCategoricalVariable()
Converts the variable to a CategoricalVariable.
ToCategoricalVariable(NumericalScale)
Converts the variable to a CategoricalVariable using the specified NumericalScale.
ToString()
Returns a String that represents the current Object.
ToVector()
Converts a NumericalVariable to a GeneralVector.
static memberUnaryNegation(NumericalVariable)
Negates the value of a NumericalVariable object.
static memberUnaryPlus(NumericalVariable)
Returns the value of a NumericalVariable object.

Constructors

IconTypeDescription
NumericalVariableNew(String, DataColumn, IFormatProvider)
Constructs a new NumericalVariable object.
NumericalVariableNew(String, DataColumn)
Constructs a new NumericalVariable object.
NumericalVariableNew(DataColumn)
Constructs a new NumericalVariable object.
NumericalVariableNew(Double[]())
Constructs a new NumericalVariable object.
NumericalVariableNew(Vector)
Constructs a new NumericalVariable object.
NumericalVariableNew(String, Double[]())
Constructs a new NumericalVariable object.
NumericalVariableNew(String, Vector)
Constructs a new NumericalVariable object.

Properties

IconTypeDescription
Aggregator
Gets or sets the Aggregator for this NumericalVariable.
CoefficientOfVariation
Gets the coefficient of variation of a variable, if it exists.
Filter
Gets or sets the Filter associated with the current variable.
Filters
Gets the NumericalFilters object associated with this numerical variable.
IsSortable
Gets a value that indicates whether the observations can be sorted.
IsSorted
Gets a value that indicates whether the observations have been sorted in the order specified by the SortOrder property.
Item(Int32)
Gets the value of the variable corresponding to the specified index.
Kurtosis
Gets the kurtosis of a variable.
Length
Gets the number of observations of the Variable.
Maximum
Gets the maximum of a variable.
Mean
Gets the mean of a variable.
Median
Gets the median of a variable.
Minimum
Gets the minimum of a variable.
MissingValue
Gets or sets the value used to indicate a missing value.
Name
Gets or sets the name of this Variable.
PopulationKurtosis
Gets the population kurtosis of a variable.
PopulationSkewness
Gets the population skewness of a variable.
PopulationStandardDeviation
Gets the population standard deviation of the variable.
PopulationVariance
Gets the population variance of a variable.
Range
Gets the range of a variable.
RootMeanSquare
Gets the root-mean-square of the variable.
Skewness
Gets the skewness of a variable.
SortOrder
Gets or sets the order in which observations should be sorted.
StandardDeviation
Gets the standard deviation of the variable.
Sum
Gets the sum of the observations of the variable.
SumOfSquares
Gets the sum of the observations of the values of the variable.
Transforms
Gets the NumericalVariableTransforms object associated with this numerical variable.
UnfilteredLength
Returns the number of observations in the variable.
VariableCollection
Gets the VariableCollection that contains this variable.
Variance
Gets the variance of a variable.

Remarks

Use the NumericalVariable class to represent a statistical variable that can take on numerical values.

NumericalVariable objects can be created from arrays, Vector, and DataColumn objects.

Numerical variables have the widest range of descriptive statistics available. In addition to the 'standard' statistics, like the Mean, the Median, and the StandardDeviation, more advanced parameters like the GetTrimmedMean(Double) and the GetInterQuartileRange() are also available.

Most of the descriptive statistics properties are cached. Some are calculated on the fly, and the calculation is fairly expensive. For this reason, these properties are available as GetXXX methods, where XXX is the name of the property. Examples are: GetHarmonicMean(), and GetInterQuartileRange().

Arithmetic operators have been defined on numerical variables that allow you to create new numerical variables by combining numerical variables with other numerical variables or real numbers. For languages that do not support operator overloading, staticSharedstatic methods have been defined that perform the same operation.

In addition, the Apply(RealFunction, NumericalVariable) method lets you transform a variable by applying a function of one variable to each value.

Inheritance Hierarchy

System.Object
  Extreme.Statistics.Variable
    Extreme.Statistics.NumericalVariable

See Also