A variable is a collection of observations of a characteristic of an object that can take on two or more values.
This chapter provides an overview of how variables are implemented in the Extreme Optimizaton Numerical Libraries
Variables occur in two situations, either on their own or as part of a collection. On their own, you can use them
to calculate descriptive statistics, like the mean and the standard deviation. Or you can use it to perform
statistical tests, such as the one-sample z test or Kolmogorov-Smirnov goodness-of-fit test. Most often,
however, variables will come in groups and represent different properties or measurements in a data set.
In the Extreme Optimization Numerical Libraries for .NET, variables are implemented by the Variable class. This is an abstract base class that provides the base
functionality for all variable types.
Variables can be either continuous, or categorical.
Any variable that can take on a value from a continuous range is called a continuous variable. The Extreme
Optimization Numerical Libraries for .NET supports two kinds of continuous variables. Numerical variables,
implemented by the NumericalVariable class, can represent any numerical
value. Time variables, implemented by the DateTimeVariable class, can represent instances in time.
Variables whose observations can take on only one of a finite set of values are called categorical variables or
discrete variables, and are implemented by the CategoricalVariable class.
Fundamental to the implementation of categorical variables is the concept of a scale. A scale represents the
possible values that a variable can have. Every categorical variable has an associated scale. The scale is used
to map an object to its category, or to the index of its category in a list of categories.
Most statistical data sets are made up of several variables. This functionality is encapsulated in
a VariableCollection object. Variable
collections can be created by adding individual variables, and by importing them from ADO.NET objects like data
tables and data readers.
The next three chapters cover the above three topics in greater detail.