 # Continuous Variable

## What is a Continuous Variable?

Firstly, know what a variable is to have a better understanding of the continuous variable. Thus, a variable is a numerical expression whose value varies. There exist only 2 kinds of variables i.e. Continuous variable and Discrete variable. Of which, the continuous variable refers to the numerical variable whose value is attained by measuring. This, in particular, is a kind of quantitative variable often used in machine learning and statistical modeling to describe data that is measurable in some way. That being said, if you have data that deals with measuring time, speed, distance or height and weight, then you have a continuous variable.

### Grab Discrete Variable to Grasp Continuous Variable

As we said above that continuous variable meaning is all quantifying the data in some way. To learn about the mechanism, you would need to know more than a little about discrete variables.  So, what does discrete variable mean? A data that deals with counting is considered to be discrete.  And for all you know, when we count things, we take into account whole numbers like 0, 1, 2, and 3. To better understand the discrete variables, let’s take an example.

### Continuous Variable Example

Tell us how many eggs a hen lays? A chicken may or may not lay egg/eggs each day, but there are two things that certainly can never happen. There can never be eggs in a negative number, and there can never be a section or a fraction of an egg.

Now that you know the two variables are distinctive of each other. Then surely, there must be some key differences between the two that set them apart for better description of data.

Continuous Variables vs. Discrete Variables:

A variable holding any value between its maximum value and its minimum value is what we call a continuous variable; otherwise, it is called a discrete variable.

Step 1: First thing to do is to discover how long it would take you to count out the possible values of your variable. For instance, if your variable is “Temperature in North India”. See to it as how long would it take you to find every possible temperature reading? It would literally take you a lifetime.

45°, 47.11° 48.4°, 49.11°, 49.111°,…

For variables like these where you begin counting now and end up never (i.e. the numbers go on and until eternity), you have what’s known as a continuous variable.

If your variable is “Number of palm trees in a nursery,” then you can literally count all of the numbers (there can’t be innumerable number of palm trees).And with that, you have what’s called a discrete variable.

## Difference Between Discrete and Continuous Variables

 Basis Continuous Variable Discrete Variable Definition A variable with endless number of ranging values Is characterized by a variable with a limited number of ranging values that are secluded Representation Linked Points Graphical Lone Points Assumption value between a range unrelated or distinct value Values Measurable/Quantifiable Countable Categorization Overlap Non-overlapping Range of stated number Incomplete and not exact Complete and exact Example 1. Counting the amount of money in everyone’s bank accounts.2. Amount of sand particles in a desert. 1. Counting the money in an individual’s bank account or counting pocket money.2.  Number of blue marbles in an aquarium.

### Solved Examples

For the below given cases, identify whether a continuous random or discrete variable is involved?

Case 1

The length of a polar bear

Answer: The length is essentially treated as a continuous variable, since a polar bear will precisely not measure 3m. Even, the length of an adult male may measure between 2.4-3m, while reaching above 3m (more than 10 feet). That said, the length will vary by some foot or a fraction and thus is a continuous variable.

Case 2

The age of a polar bear

Answer: Age can every so often be considered as continuous or discrete variable. For example, we usually depict age as only a number of years, but occasionally we discuss a polar bear being to live beyond 18-20years old. Technically, since age can be regarded as a continuous random variable, then that is what it is reviewed, unless we have logic to deal with it as a discrete variable.

Now let’s take a fun quiz to know how far you have discrete and continuous variables.

### Fun Quiz

For 1-10, find out whether each condition is a continuous or a discrete random variable, or if it is none

 Cases (type of variable)Answers The number of leopards in an animal shelter at any given time. Discrete The weight of polar bears. Continuous The weight of newborn babies. Continuous Number of apparel shops in a mall. Discrete Number of stars in a galaxy. Continuous Number of planets around a star. Discrete The state-wise gross collection of a movie. Discrete The grade attained by a student, as a letter. Continuous The grade attained by a student, as a percentage. Discrete Time span of how long someone lives None

### Did You Know

A variable in algebra is not quite alike to a variable in statistics.