Statistics
What Do Subsets Mean in Statistics?
This article explains what subsets are in statistics and why they are important. You’ll learn about different types of subsets with formulas and examples for each.
Sarah Thomas
Subject Matter Expert
Statistics
02.17.2022 • 4 min read
Subject Matter Expert
This article explains the concept of discrete, continuous, and random variables. You’ll also learn the differences between discrete and continuous variables.
In This Article
Take Intro to Statistics Online with Outlier.org
From the cofounder of MasterClass, earn transferable college credits from the University of Pittsburgh (a top 50 global school). The world's best online college courses for 50% less than a traditional college.
Get startedTo understand what discrete, continuous, and random variables are, you first need to know what a variable is.
In math, a variable is a quantity that can take on different values. It is a quantity that “varies.”
We typically denote variables using a lowercase or uppercase letter of the Latin alphabet, such as $a$, $b$, $X$, or $Y$. You can attach a subscript to the letter to provide more information about the variable. For example, if $h$ is a variable representing height, you might use h1 and h2 to differentiate between the height of two different people. Similarly, you could write $h_{male}$ and $h_{female}$ to differentiate between a variable that represents the heights of males and the heights of females.
Variables can be categorical or numerical.
Categorical—also called qualitative—variables consist of names and labels that divide data into specific categories. When you select your nationality or your race on a survey, those responses are categorical.
Numerical—also called quantitative—variables have values that can either be counted or measured. Discrete and continuous variables are specific types of numerical data.
Now that you know what a discrete random variable is, you may be wondering: Is there a difference between the terms “discrete variable” and “discrete data”?
In statistics and data analysis, a variable is any characteristic or attribute that can be measured. Data refers to the values or observations that are collected for a particular variable. For example, if you have a discrete random variable representing years of schooling, the data you collect would be discrete data.
Discrete data has the following main characteristics:
The data is collected for one or more discrete random variables
The observations in your data are limited in number
The observations in your data are countable and indivisible
A data set that consists only of data collected for discrete variables is called a discrete data set.
A continuous variable is a variable that can take on any value within a range. A continuous variable takes on an infinite number of possible values within a given range.
Because the possible values for a continuous variable are infinite, we measure continuous variables (rather than count), often using a measuring device like a ruler or stopwatch. Continuous variables include all the fractional or decimal values within a range.
Examples of continuous variables include:
The time it takes sprinters to run 100 meters
The size of real estate lots in a city
The weight of baby elephants
The body temperature of patients with the flu
The deployment altitude of skydivers
None of these variables are countable. This is the key difference between discrete and continuous variables. A continuous variable can take on an infinite number of values within a range.
What is continuous data? Continuous data are observations or data points collected for a continuous random variable. Let’s say you’re interested in the time it takes 5th graders to run a 50yard dash.
This is a continuous random variable. Now, if you go out and collect a sample of 100 5th graders and record the time it takes each of them to run the dash, you’ll have a continuous data set consisting of 100 data points.
Continuous data has the following main characteristics:
The data is collected for one or more continuous random variables
The observations in your data could take on an infinite number of possible values within a range
The data are measured rather than counted
Sometimes we treat continuous variables as if they were discrete.
Age is an excellent example of this. If you know a person’s time of birth, you could measure their age precisely up to the second or even millisecond if you wanted to. In this sense, age is a continuous variable. However, we don’t usually care about a person’s exact age. Instead, we treat age as a discrete variable and count age in years.
A random variable is a variable where the values are the outcome of a random process.
An easy example of a random variable is:
When you roll a die, the roll itself is a random event. The possible values of X are 1, 2, 3, 4, 5, or 6, but the specific value you get depends on the randomness of the event. It’s uncertain which number will appear on any given roll. You can learn more about events and the odds of of results when you read our article about math probability.
Random variables can be numerical or categorical, continuous or discrete.
The table below summarizes the key differences between discrete and continuous variables with examples.
DISCRETE VARIABLES  CONTINUOUS VARIABLES 
Definition A discrete variable is a variable that takes on distinct, countable values.  Definition A continuous variable is a variable that takes on any value within a range, and the number of possible values within that range is infinite. 
Discrete variables have values that are counted.  The values of a continuous variable are measured. 
Discrete Variable Examples
 Continuous Variable Examples

The main difference between discrete data and continuous data is that discrete data is data collected for a discrete random variable, while continuous data is data collected for a continuous random variable.
Outlier (from the cofounder of MasterClass) has brought together some of the world's best instructors, game designers, and filmmakers to create the future of online college.
Check out these related courses:
Statistics
This article explains what subsets are in statistics and why they are important. You’ll learn about different types of subsets with formulas and examples for each.
Subject Matter Expert
Statistics
Here is an overview of set operations, what they are, properties, examples, and exercises.
Subject Matter Expert
Calculus
Knowing how to find definite integrals is an essential skill in calculus. In this article, we’ll learn the definition of definite integrals, how to evaluate definite integrals, and practice with some examples.
Subject Matter Expert
Earn 6 credits for ¼ the cost of traditional college and take this semester by storm! Backed by our riskfree guarantee. Offer expires soon.
By signing up for our email list, you indicate that you have read and agree to our Terms of Use and Privacy Policy.
Apply by August 17th to start Degrees+ this Fall and guarantee the lowest tuition ever. See if you qualify for $0 college today.
Plus, skip the line with guaranteed admission to Degrees+ when you pass both courses. Backed by our riskfree guarantee. Offer expires soon.
By signing up for our email list, you indicate that you have read and agree to our Terms of Use and Privacy Policy.
Plus, you’re guaranteed admission to Degrees+ when you pass both courses. Backed by our RiskFree Guarantee, Offer expires soon.
By signing up for our email list, you indicate that you have read and agree to our Terms of Use and Privacy Policy.
No joke—get any college course on us. Free. Simply complete an application to Degrees+ by Jan. 24th. Limited to the first 500 students. No commitment required.
Get started