Difference Between Discrete and Continuous Variable
Last Updated :
03 Jun, 2024
In statistics, variables play a crucial role in understanding and analyzing data. Two fundamental types of variables are discrete and continuous variables. Discrete variables have distinct, separate values with gaps between them, while continuous variables have an unbroken sequence of values.

In this article, we will learn about continuous variables, discrete variables, and the difference between continuous and discrete variables in detail.
What are Variables?
In mathematics, a variable is a symbol or letter that represents an unknown quantity. Variables are used to formulate mathematical expressions, equations, and functions. They are placeholders for numbers or other mathematical objects whose specific values are unknown or may vary in different contexts.
In statistics and research, a variable is any characteristic, number, or quantity that can be measured or observed and can vary among individuals, objects, or situations.
Variables can be classified into several types based on their characteristics and measurement scales:
- Independent Variable
- Dependent Variable
- Continuous Variable
- Discrete Variable, etc
What are Discrete Variables?
Discrete variable is a type of variable that can only take on specific or distinct values. These values are typically whole numbers or integers. Discrete variables often represent counts or categories.
Example of discrete variables are:
- Number of students in a classroom: It is a discrete variable because it can only take on whole number values (e.g., 25 students, 30 students).
- Outcomes of rolling a six-sided die: The output will be (1, 2, 3, 4, 5, or 6) which are discrete because they consist of distinct, separate categories.
- Number of books on a shelf: The number of books is discrete because it cannot take on fractional or continuous values (e.g., 5 books, 10 books, 15 books).
What are Continuous Variables?
Continuous variable is a type of variable that can take on any value within a given range. Unlike discrete variables, which consist of distinct, separate values, continuous variables can represent an infinite number of possible values, including fractional and decimal values. Continuous variables often represent measurements or quantities.
Example of continuous variables are:
- Height: Height is a continuous variable because it can take on any value within a range (e.g., 150.5 cm, 162.3 cm, 175.9 cm).
- Weight: Weight is continuous because it can be measured with precision and can take on any value within a range (e.g., 55.3 kg, 68.7 kg, 72.1 kg).
- Time: Time can be measured with precision, and it can take on any value (e.g., 10:30:15.5 AM, 10:45:30.75 AM).
Differnce Between Discrete and Continuous Variables
The difference between continuous and discrete variables is described below:
Aspect
| Discrete Variables
| Continuous Variable
|
---|
Nature of Values
| They can take only specific or discrete values.
| They can take any value within a specific range.
|
---|
Measurement Scale
| Discrete variables are typically measured on a nominal or ordinal scale.
| Continuous variables are typically measured on an interval or ratio scale.
|
---|
Representation
| Discrete variables are often represented by bar graphs or histograms.
| Continuous variables are often represented by line graphs or smooth curves.
|
---|
Examples
| Examples include the number of students in a class or the outcomes of rolling a die.
| Examples include measurements such as length, time, or temperature.
|
---|
Probability Distributions
| Discrete variables have probability mass functions (PMF)
| Continuous variables have probability density functions (PDF).
|
---|
Applications
| They are employed in various mathematical contexts and applications where quantities are counted.
| They are often employed in various branches of mathematics, including calculus, differential equations, and real analysis, as well as in applied fields such as physics, engineering and statistics.
|
---|
Also Check,
Similar Reads
Difference between Continuous and Discrete Uniform Distribution Continuous and discrete uniform distributions are two types of probability distributions. A continuous uniform distribution has an interval of equally likely values. Instead, a discrete uniform distribution applies to a finite set of outcomes with equal probabilities. Understanding the difference be
5 min read
Difference between Variables and Constant An algebraic expression is a mathematical statement that involves variables, constants and operations like addition, subtraction, multiplication, division and exponentiation.Algebraic Expression is described using terms and operations on those terms. For instance, x + 3 can be expressed as "3 more t
4 min read
What are the differences between PHP constants and variables ? PHP Constants: PHP Constants are the identifiers that remain the same. Usually, it does not change during the execution of the script. They are case-sensitive. By default, constant identifiers are always uppercase. Usually, a Constant name starts with an underscore or a letter which is followed by a
2 min read
Difference Between Variance and Standard Deviation Variance and Standard deviation both formulas are widely used in mathematics to solve statistics problems. They provide various ways to extract information from the group of data.They are also used in probability theory and other branches of mathematics. So it is important to distinguish between the
6 min read
Difference Between Differential and Derivative Differential and Derivative both are related but they are not the same. The main difference between differential and derivative is that a differential is an infinitesimal change in a variable, while a derivative is a measure of how much the function changes for its input.In this article, we will exp
5 min read