Skip to content

If you could change one thing about college, what would it be?

  • Save money

  • Graduate faster

  • Better quality online classes

  • Flexible schedule

  • Access to top-rated instructors

Woman facing away leading an exercise class. This represents discrete variable examples
Outlier Articles Home

Statistics

Discrete & Continuous Variables With Examples

06.30.2023 • 5 min read

Sarah Thomas

Subject Matter Expert

Two types of categorical variables are discrete and continuous variables. Learn what a variable is with examples and why it’s important in statistics.

In This Article

  1. What Is a Variable?

  2. Quantitative vs. Qualitative Variables

  3. What Is a Discrete Variable?

  4. What Is a Continuous Variable?

  5. Discrete vs. Continuous Variables

Don't Overpay For College Statistics

Take Intro to Statistics Online with Outlier.org

From the co-founder 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 started
Outlier Stats 1628x960 (1)

Are you confused about the difference between discrete and continuous variables? You're not alone! Many people need help understanding the distinction between these two types of variables.

In this article, we’ll start with the basics and cover each of the main types of variables used in statistical analysis. We’ll then dive deeper and give you lots of examples to illustrate the difference between discrete and continuous data.

What Is a Variable?

In statistics, variables represent values that can change.

Here’s an example.

Suppose you’re a fitness trainer who wants to collect data on the number of pushups your clients can do before any training. You build a data set with 2 variables: your clients’ names and the number of pushups they can do. Both are variables because the data you collect will vary with each client.

You could add many more variables to this data set. For example, you could add variables for the age of your clients, how much prior training they’ve received, how many seconds they can hold a plank or anything else you’re interested in tracking.

In a data table, we store variables in the table's columns, with each column representing a different variable. Each row in the table shows one recorded “observation” for your data, and each cell stores a value.

In the data table below, we see the description of our variables listed in column headers. Five observations represent data for 5 clients, and 5 values are recorded for each variable.

Table showing description of variables for 5 clients

Quantitative vs. Qualitative Variables

We can divide variables into 2 types: qualitative variables and quantitative variables.

Qualitative Variables

Qualitative variables—also called categorical variables—are identifiers such as names and labels that divide your data into subgroups or categories. Variables representing names, religion, race, and political affiliation are all examples of qualitative variables.

We can further divide qualitative variables into nominal and ordinal variables.

Nominal Variables

Nominal variables are qualitative variables with no inherent ranking based on magnitude or size. Names, nationality, and religion are all nominal variables since there is no way to rank the groups within these categories.

Ordinal Variables

Ordinal variables are qualitative variables where each subgroup can be ranked in order of magnitude. Education levels are a good example. If I collect data on educational attainment, I’ll have categories like high school graduate, some college, college graduate, Master’s degree, or Ph.D. You can rank these categories according to how much education a person has received.

Quantitative Variables

Quantitative variables—also called numeric variables—are variables representing quantities or measurements. The number of pushups a person can do is a quantitative variable, as is how long they can hold a plank.

We can further subdivide quantitative variables into 2 types: discrete and continuous.

Discrete Variables

Discrete variables are quantitative variables that take on discrete countable values. Discrete variables are almost always in the form of whole numbers or integers. The number of pushups a person can do is a discrete variable. We can easily count pushups. A person may be able to do no pushups, 3 pushups, or 10, but the number won’t be a decimal or a fraction like 10.305 or 11.532.

Continuous Variables

Continuous variables are quantitative variables that can take on infinite values within a defined range. We often need a measuring device, like a stopwatch or a ruler, to measure continuous variables. How long a person can hold a plank or run a 50-meter dash are examples of discrete variables.

We would need a stopwatch to measure such variables, and the values we record could be any of an infinite set of real numbers like 00:09.02, 00:53.13, or 02:34.35.

Here’s some insight into sampling data and methods:

Graph showing the types of variables in statistics

What Is a Discrete Variable?

Now that you know the main differences between different variable types, let’s look at more examples of discrete variables.

Remember, a discrete variable is a quantitative variable that can only take on countable values. The values are most often whole numbers or integers.

Discrete Variable Examples

1. The Population of the US

The population of the US, or any other country, is a discrete variable. The population will always be a whole number; in theory, that number is countable.

2. Age

Though age could be considered a continuous variable, we often treat it as discrete. This is because we don’t care if a person is 32 years, 3 months, and 5.238 days old; we only care that they are 32. So long as we are counting age in years, age is a discrete variable.

3. The Number of Students in a Classroom

The number of students in a classroom is also a discrete variable. You would never have 7.5 students in a classroom or 35.23 students. The value you measure will always be a countable whole number.

4. Customers at a Coffee Shop

Like the number of students in a classroom, the number of customers at a coffee shop is also a discrete variable. The shop might have 30 or 85 customers an hour, but it won’t have a fractional value of customers.

5. Number of Rainy Days in Various Cities

A city's number of rainy days over the course of a year is another example of discrete data. This variable will always have values that are whole, countable numbers.

What Is a Continuous Variable?

Now, let’s look at some more examples of continuous variables. Continuous variables can take an infinite set of values within some range.

Continuous Variable Examples

1. Distance

Distance traveled is an excellent example of a continuous variable. The distance a person walks or drives daily could be any decimal within some range. There are an infinite number of possibilities.

2. Time

Similar to distance, the time it takes for something to happen requires measurement and can take on an infinite set of values within a range. For this reason, time is also a continuous variable.

3. A Student’s GPA on a 4.0 Scale

If we measure grade point averages on a scale of 0.0 to 4.0, the resulting variable is continuous.

4. Volume of Coffee Sold in a Coffee Shop

This is also a continuous variable. Volume is measured and can take on decimal values.

5. Inches of Rain Various Cities Get in a Year

Unlike the number of rainy days in a city, which is a discrete variable, the amount of rain in a city is a continuous variable. A city might get 12.4 inches of rain or 55.73 inches of rain. The possible values for this variable will fall within some range, but the possible values are countless.

Discrete vs. Continuous Variables

In summary, here are the main similarities and differences between discrete and continuous variables.

Table showing main similarities and differences between discrete and continuous variables
Intro to Statistics

Intro to Statistics

How data describes our world.

Explore course
Intro to Microeconomics

Intro to Microeconomics

Why small choices have big impact.

Explore course
Intro to Macroeconomics

Intro to Macroeconomics

How money moves our world.

Explore course
Intro to Psychology

Intro to Psychology

The science of the mind.

Explore course

Explore Outlier's Award-Winning For-Credit Courses

Outlier (from the co-founder 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:

Share

玻璃钢生产厂家美陈图片商场 效果图浙江中高端玻璃钢雕塑厂家商场音乐活动美陈镇江户外玻璃钢雕塑石狮玻璃钢花盆厂家新乡玻璃钢人物雕塑厂家价格玻璃钢雕塑翻新用什么油漆德宏玻璃钢雕塑报价岑溪玻璃钢人物雕塑玻璃钢雕塑如何清洗山东景区玻璃钢雕塑订做价格玻璃钢传统人物雕塑哪家质量好雕塑玻璃钢工艺流程唐河广场玻璃钢雕塑梅州动物雕塑玻璃钢图片四川景观玻璃钢雕塑贵州玻璃钢仿铜人物雕塑河西商场亮化美陈开封玻璃钢花盆厂金山区知名玻璃钢雕塑优质商家韶关玻璃钢卡通雕塑销售河北工业玻璃钢雕塑规格尺寸内蒙古玻璃钢雕塑哪家好做玻璃钢雕塑公司地址吉安玻璃钢门头雕塑山东常见商场美陈有哪些呈贡玻璃钢雕塑哪里有卖精美玻璃钢花盆订购长宁区进口玻璃钢雕塑性价比高上海超市商场美陈研发香港通过《维护国家安全条例》两大学生合买彩票中奖一人不认账让美丽中国“从细节出发”19岁小伙救下5人后溺亡 多方发声单亲妈妈陷入热恋 14岁儿子报警汪小菲曝离婚始末遭遇山火的松茸之乡雅江山火三名扑火人员牺牲系谣言何赛飞追着代拍打萧美琴窜访捷克 外交部回应卫健委通报少年有偿捐血浆16次猝死手机成瘾是影响睡眠质量重要因素高校汽车撞人致3死16伤 司机系学生315晚会后胖东来又人满为患了小米汽车超级工厂正式揭幕中国拥有亿元资产的家庭达13.3万户周杰伦一审败诉网易男孩8年未见母亲被告知被遗忘许家印被限制高消费饲养员用铁锨驱打大熊猫被辞退男子被猫抓伤后确诊“猫抓病”特朗普无法缴纳4.54亿美元罚金倪萍分享减重40斤方法联合利华开始重组张家界的山上“长”满了韩国人?张立群任西安交通大学校长杨倩无缘巴黎奥运“重生之我在北大当嫡校长”黑马情侣提车了专访95后高颜值猪保姆考生莫言也上北大硕士复试名单了网友洛杉矶偶遇贾玲专家建议不必谈骨泥色变沉迷短剧的人就像掉进了杀猪盘奥巴马现身唐宁街 黑色着装引猜测七年后宇文玥被薅头发捞上岸事业单位女子向同事水杯投不明物质凯特王妃现身!外出购物视频曝光河南驻马店通报西平中学跳楼事件王树国卸任西安交大校长 师生送别恒大被罚41.75亿到底怎么缴男子被流浪猫绊倒 投喂者赔24万房客欠租失踪 房东直发愁西双版纳热带植物园回应蜉蝣大爆发钱人豪晒法院裁定实锤抄袭外国人感慨凌晨的中国很安全胖东来员工每周单休无小长假白宫:哈马斯三号人物被杀测试车高速逃费 小米:已补缴老人退休金被冒领16年 金额超20万

玻璃钢生产厂家 XML地图 TXT地图 虚拟主机 SEO 网站制作 网站优化