Discrete and continuous variables

<< Click to Display Table of Contents >>

Navigation:  Decision-theoretic modeling >

Discrete and continuous variables

One of the most fundamental properties of variables is their domain, i.e., the set of values that they can assume. While there is an infinite number of possible domains, they can be divided into two basic classes: discrete and continuous.

Discrete variables describe a finite set of conditions and take values from a finite, usually small, set of states. An example of a discrete variable is Success of the venture, defined in the tutorial on Bayesian networks. This variable can take two values: Success and Failure. Another example might be a variable Hepatitis-B, assuming values True and False. Discrete variables can be numerical. For example, variable Total bilirubin in model HeparII has four interval states: 0..2, 2..7, 7..20, and 20..88. Variable Financial gain may assume three numerical point values: $10K, $20K, and $50K.

Continuous variables can assume an infinite number of values. An example of a continuous variable is Body temperature, assuming any value between 30 and 45 degrees Celsius. Another might be Financial gain, assuming any monetary value between zero and $50K.

Most exact algorithms for Bayesian networks and influence diagrams are designed for discrete variables. To take advantage of these algorithms, most Bayesian network and influence diagram models include discrete variables or conceptually continuous variables that have been discretized for the purpose of reasoning. GeNIe offers continuous and hybrid models, in which some or all variables are continuous and the interactions among variables are described by means of equations. In such cases, GeNIe uses stochastic sampling or on-demand discretization.

While the distinction between discrete and continuous variables is crisp, the distinction between discrete and continuous quantities is rather vague. Many quantities can be represented as both discrete and continuous. Discrete variables are usually convenient approximations of real world quantities, sufficient for the purpose of reasoning. And so, success of a venture might be represented by a continuous variable expressing the financial gain or stock price, but it can also be discretized to [Good, Moderate, Bad] or to [$5, $20, $50] price per share. Body temperature might be continuous but can be also discretized into intervals or categorized as Low, Normal, Fever, and High fever. Experience in decision analytic modeling has taught that representing continuous variables by their three to five point discrete approximations performs well in most cases.