Probability and Statistics > Basic Statistics > Discrete vs continuous variables

Watch the video, or read the article below:

In an introductory stats class, one of the first things you’ll learn is the difference between discrete vs continuous variables. In a nutshell, discrete variables are like points plotted on a chart and a continuous variable can be plotted as a line. Before you start, you might want to read these two articles, which define each type of variable and give you lots of examples of each variable type:

Definition of a discrete variable.

Definition of a continuous variable.

## Discrete vs Continuous variables: A Brief Overview.

**Discrete variables **are countable in a finite amount of time. For example, you can count the change in your pocket. You can count the money in your bank account. You could also count the amount of money in *everyone’s* bank account. It might take you a long time to count that last item, but the point is — it’s still countable.

**Continuous Variables** would (literally) take forever to count. In fact, you would get to “forever” and never finish counting them. For example, take age. You can’t count “age”.** Why not?** Because it would literally take forever. For example, you could be:

25 years, 10 months, 2 days, 5 hours, 4 seconds, 4 milliseconds, 8 nanoseconds, 99 picosends…and so on. You *could* turn age into a discrete variable and then you could count it. For example:

- A person’s age in years.
- A baby’s age in months.

Take a look at this article on orders of magnitude of time and you’ll see why time or age just isn’t countable. Try counting your age in Planctoseconds (good luck…see you at the end of time!).

## Discrete vs Continuous variables: Steps

Step 1: Figure out how long it would take you to sit down and **count out** the possible values of your variable. For example, if your variable is “Temperature in Arizona,” how long would it take you to write every possible temperature? It would take you literally forever:

50°, 50.1°, 50.11°, 50.111°, 50.1111°, …

If you start counting now and never, ever, ever finish (i.e. the numbers go on and on until infinity), you have what’s called a **continuous variable.**

If your variable is “Number of Planets around a star,” then you can count all of the numbers out (there can’t be an infinite number of planets). That is a **discrete variable**.

Step 2: Think about “hidden” numbers that you haven’t considered. For example: is time a discrete or continuous variable? You might think it’s continuous (after all, time goes on forever, right?) but if we’re thinking about numbers on a wristwatch (or a stop watch), those numbers are **limited** by the numbers or number of decimal places that a manufacturer has decided to put into the watch. It’s unlikely that you’ll be given an ambiguous question like this in your elementary stats class but it’s worth thinking about!

Like the explanation? Check out the Practically Cheating Statistics Handbook, which has hundreds more step-by-step solutions, just like this one!

Check out our Youtube channel for more stats tips and help!

If you prefer an online interactive environment to learn R and statistics, this *free R Tutorial by Datacamp* is a great way to get started. If you're are somewhat comfortable with R and are interested in going deeper into Statistics, try *this Statistics with R track*.

*Facebook page*and I'll do my best to help!

Thanks it helped me understand the difference between the two.

Waooo I like these examples.it made me understood the concept very well.thank you for the good job.

I have been really helped!!

Wow this was really helpful to because i was stuck When i pick my book read it was confussing but thanks this explaination

Dear Professor,

TX for putting this book on stats together.

You cut through all the stuff for me.

I will be taking stats in the summer and have been preparing since mid November to little avail.

We think alike, both wanting to get from point A to point B the quickest and easiest route possible. Too bad textbooks do not have the same idea as what you put in your book.

Please accept my gratitude.

YOU have dispelled my fear.

By the way, what is your take on the course offered at statistics.com?

Respectfully,

Gregory

Thanks, Gregory. I wish you success with your summer class.

I have no knowledge about the course at statistics.com. My only comment is that at $599 is does seem expensive.

Regards,

Stephanie

nice explanation

Thanks for the explanation ….

If it is in a decimal form, will it be clasified directly as a discrete variable?

No, because decimals can be continuous, e.g. from 0.0 to 1.0 you can have 1.2, 1.9. 2.8999999, 8.501234 and a zillion things in between.

I have a question, would you classify “all the stars”, or “all of the sand” as discrete or continuous? I believe they would be discrete, because you can not have a half of a star, it is either 1 or 0, but it would take forever to actually count them. I appreciate your feedback. Thank you so much for this site, it has been a great help.

Jen

You do have to have whole, countable objects (like you said), but in order for an item to be discrete, it also has to be countable. As the universe is infinite, then there are infinite numbers of stars, “number of stars” is infinite, so it’s continuous. As for all of the sand…I *think* there’s sand elsewhere in the universe, so it too would be infinite and continuous.

That makes a lot more sense, thank you.

Hi!

I recently had to complete an antimicrobial practical where I tested the effect of antibiotic (positive control), mouth wash (no inhibition) and a disinfectant (there was an inhibition) on e.coli bacteria. Now that I have the results I can measure the diameter of inhibition on the bacteria.

I can’t understand which data is continuous and which one is categorical.

I have to carry out a test in R studio by the way.

I’d love your input. Thank you.

Excellent work as always!