what is a variable in statistics
A variable in statistics is any characteristic or quantity that can be measured or counted and whose value can change from one individual, object, or time point to another.
What is a Variable in Statistics?
In statistics, a variable is a feature like age, height, eye color, income, or test score that can take different values across people or items. It is called a variable because its value can vary between data units (different people, companies, countries, etc.) and can also change over time.
Example: In a class of students, “age” is a variable. One student may be 15, another 16, another 17, and so on.
Common Types of Variables (Simple Overview)
1. Categorical vs. Numerical
- Categorical (Qualitative) variables : Describe qualities or groups , not numbers you meaningfully calculate with.
* Examples: hair color, city, eye color, type of car.
- Numerical (Quantitative) variables : Describe numbers you can measure or count and do arithmetic with (add, average, etc.).
* Examples: age, height, income, number of children.
2. Discrete vs. Continuous (for Numbers)
For numerical variables, statisticians often split them further:
- Discrete variables :
- Come from counting (whole numbers only).
* You cannot have fractional steps between allowed values.
* Examples: number of children in a family, number of cars, number of locations of a business.
- Continuous variables :
- Come from measuring and can, in theory, take infinitely many values within a range (including decimals).
* Examples: height, weight, time, temperature, age (as a precise measurement).
Why Variables Matter in Statistics
- They are the columns of a dataset, representing each characteristic you study.
- The type of variable determines which statistical methods and graphs are appropriate (for example, you do not compute an average hair color).
- In studies and experiments, some variables are inputs (like treatment) and others are outcomes (like health score).
Think of a spreadsheet: each row is a person or case, and each column (age, gender, income) is a variable.
Tiny Story to Make it Stick
Imagine you’re analyzing a school survey.
Each student fills in their age , favorite subject , hours of study per
week , and whether they play sports.
- Age and hours of study are numerical variables (age can even be treated as continuous if measured precisely).
- Favorite subject is a categorical variable.
- “Play sports: yes/no” is a binary categorical variable (only two possible values).
All of these changing pieces of information across students are variables.
SEO Bits (for your post)
- Focus keyword : what is a variable in statistics
- Sample meta description :
Learn what a variable is in statistics, the main types (categorical, numerical, discrete, continuous), and see simple examples that make the idea easy to remember.
TL;DR: A variable in statistics is any measurable or countable characteristic (like age, height, or eye color) that can take different values across individuals or over time.