What are continuous and discrete variables?

Continuous variables

Continuous variables are variables that are not unique. They tend to represent accurate values to the nearest precisely measured decimal point.

Example

If we're trying to measure the temperatures in different cities, we would need the help of some metrological instrument.

Let's say that two cities, Lahore and Karachi, are taken into account and have temperatures respectively as; 34.4°C34.4 \degree C and 34.6°C34.6 \degree C. Hence, this is a continuous measurement. And can only be mapped by the probability density function (PDF) to find probabilities of some continuous variable.

Let's take a look at a continuous graph below:

The continuous graph

Discrete variables

Contrary to continuous variables, discrete variables are calculated and not so precise. They represent singular whole terms.

Example

In the example given in continuous variables, we can say that the number of cities whose temperatures were measured is a discrete variable.

Or it could be the number of students whose heights must be measured or the number of people standing in the queue.

We'll now illustrate the discrete graph for better understanding.

The discrete graph

Are continuous variables treated as discrete variables?

We may handle continuous variables as though they were discrete variables. Age is a prime example of this. If we know a person's birth time, we may calculate their age to the second or even millisecond. Age is a continuous variable in this sense. However, we aren't usually concerned with a person's actual age. Instead, we consider age a discrete variable and count it in years.

Copyright ©2024 Educative, Inc. All rights reserved