Continuous or discrete variable
In mathematics, variables are either discrete or continuous.
A continuous variable is one whose value must be a member of a set such that, if the values a and b are members of the set, then every number between a and b is also in the set. A common example is a variable that is defined over some interval of the real number line. Methods of calculus are often used in problems in which the variables are continuous, for example in continuous optimization problems. In statistical theory, the probability distributions of continuous variables can be expressed in terms of probability density functions.
In contrast, a discrete variable is one for which, for any two values that the variable is permitted to take on, not all values between them are permitted. Common examples are variables that must be integers, non-negative integers, positive integers, or only the integers 0 and 1. Methods of calculus do not readily lend themselves to problems involving discrete variables. Examples of problems involving discrete variables include integer programming. In statistics, the probability distributions of discrete variables can be expressed in terms of probability mass functions.