Discrete vs Continuous Variables
In statistics, a variable is an attribute that describes an entity such as a person, place or a thing and the value that variable take may vary from one entity to another. For example, if we let the variable Y be the grade of a student at an exam, Y can take the values A, B, C, S and F. If we let the variable X be the height of a student in a class, then it can take any real value within a range.
From these two examples, it can be seen that there are two types of variables as quantitative and qualitative depending on whether the domain of the variable is numeric with normal arithmetic operations possible or not. Those quantitative variables are of two types: discrete variables and continuous variables.
What is a discrete variable?
If the quantitative variable can take only an at most countable number of values, then such data is called discrete data. In other words, the domain of the variable should be at most countable. An at most countable number is either finite or countable. An example will illustrate this further.
A five question test is given to a class. Let X be the number of correct answers a student gets. The possible values of X are 0, 1, 2, 3, 4, and 5; only 6 possibilities, and it is a finite number. Therefore, X is a discrete variable.
In a game, one has to shoot a target. If we let Y be the number of times one shot until he hit the target, then the possible values of Y will be 1, 2, 3, 4 … and so on. Theoretically, these values need not have a finite limit. But these values are countable. Hence, the variable Y defined as “the number of times one shot until he hit the target” is a discrete variable.
From these two examples, it can be seen that discrete variables often defined as counts.
What is a continuous variable?
The quantitative variable that can take all the possible values within a range is called continuous data. Therefore, if the domain of a continuous variable is the interval (0, 5), then the variable can take any real number value in between 0 and 5.
For example, if we define the variable Z to be the height of a student in a class, then the variable Z can take any real number value within the range of height of humans. Thus, Z is a continuous variable, but if we add an additional restriction as “a student’s height to the nearest centimeter”, then the variable Z will be discrete since it can take only a finite number of values.
From this, it can be seen that normally a continuous variable is defined as a measurement.
What is the difference between discrete variable and continuous variable? • The domain of a discrete variable is at most countable, while the domain of a continuous variable consists of all the real values within a specific range. • Usually discrete variables are defined as counts, but continuous variables are defined as measurements.

Henry says
Thanx alot this information has really helped with my homework..