Continuous or discrete variable

In mathematics and statistics, a quantitative variable may be continuous or discrete if it is typically obtained by measuring or counting, respectively.

[3] In some contexts, a variable can be discrete in some ranges of the number line and continuous in others.

[9] Methods of calculus do not readily lend themselves to problems involving discrete variables.

Especially in multivariable calculus, many models rely on the assumption of continuity.

[10] Examples of problems involving discrete variables include integer programming.

In the case of regression analysis, a dummy variable can be used to represent subgroups of the sample in a study (e.g. the value 0 corresponding to a constituent of the control group).

For instance, a simple mixed multivariate model could have a discrete variable

[14] An example of a mixed model could be a research study on the risk of psychological disorders based on one binary measure of psychiatric symptoms and one continuous measure of cognitive performance.

A mixed random variable does not have a cumulative distribution function that is discrete or everywhere-continuous.

An example of a mixed type random variable is the probability of wait time in a queue.

[16] In physics (particularly quantum mechanics, where this sort of distribution often arises), dirac delta functions are often used to treat continuous and discrete components in a unified manner.

Variables can be divided into two main categories: qualitative (categorical) and quantitative (numerical). Continuous and discrete variables are subcategories of quantitative variables. Note that this schematic is not exhaustive in terms of the types of variables.
This is an image of vials with different amounts of liquid. A continuous variable could be the volume of liquid in the vials. A discrete variable could be the number of vials.