How to explain independent and dependent variables
Last updated: 2026-11-26
The independent variable is the one you change or choose as the input, and the dependent variable is the one you measure to see how it responds. If you have to explain the pair to someone, fill in this sentence with your own study: "I changed ___ to see what happens to ___." The first blank is the independent variable and the second is the dependent variable.
Start learning No account needed
Wikipedia on experiments says that in a true experiment the independent variable is manipulated by the experimenter and the dependent variable is measured. In a math course, a symbol that stands for a function's input is called the independent variable and one that stands for its output is called the dependent variable.
A worked example: two ways to study
These scores are invented to show the method. Ten students are assigned at random to reread a chapter or to test themselves on it, five in each group, and both groups then take the same quiz. The values below are computed by scripts/how-to-explain-independent-and-dependent-variables-worked-example.py in the Professor Turing repository.
- Find what was changed. The researcher decided who reread and who self-tested. Study method is the independent variable, and it has two levels.
- Find what was measured. The quiz score is the dependent variable.
- Say it in one sentence. "I changed the study method to see what happens to the quiz score."
- Name what was held the same. Both groups read the same chapter and took the same quiz. If one group had also had an easier quiz, you could not tell which difference moved the score.
- Compare the dependent variable. Rereading has a mean of 64 and self-testing a mean of 72, a gap of 8 points. With five invented students per group, this shows where each variable goes and is not evidence about either study method.
The same naming works for a formula. If a taxi fare is 4 + 3 × km, you pick the distance, so km is the independent variable and the fare is the dependent variable.
Output from the script:
students: 10, groups: 2, per group: 5
rereading scores: 62, 70, 58, 66, 64 -> sum 320, mean 64
self-testing scores: 71, 75, 67, 78, 69 -> sum 360, mean 72
difference in means: 72 - 64 = 8 points
taxi fare = 4 + 3 * km: km 0 -> fare 4, km 2 -> fare 10, km 5 -> fare 19
question 2: fare for 7 km = 4 + 3 * 7 = 25
Two mix-ups to check for
1. Reading cause into variables nobody changed
Suppose you ask students how long they slept and then record their quiz scores. You may plot sleep as the input and score as the output, but you did not assign anyone's sleep. Stress or workload could move both. Experiments are used to learn about cause and effect by changing a factor and watching what happens, and in a true experiment the experimenter manipulates the independent variable. For a survey, words such as predictor and outcome are a safer way to say it. Wikipedia lists "explanatory variable" and "response variable" as other names some authors prefer. See correlation and causation.
2. Deciding by the words instead of the study
"Sleep" is not independent by nature. A study that assigns bedtimes and measures memory uses sleep as the independent variable. A study that assigns an exercise plan and measures hours of sleep uses sleep as the dependent variable. Ask what this study changed and what it recorded.
On a graph, the convention in single-variable calculus is to put the independent variable on the horizontal axis and the dependent variable on the vertical axis, as the Wikipedia article describes. Check the axis labels against your sentence.
Test yourself
Work each question on paper first. Open the answer after you have written yours.
Question 1. A gardener gives some plants more water than others and records their height. Name both variables.
Answer to question 1
The amount of water is the independent variable, because the gardener sets it. Plant height is the dependent variable, because it is measured.
Question 2. A taxi fare is 4 + 3 × km. What is the fare for 7 km, and which quantity is dependent?
Answer to question 2
4 + 3 × 7 = 25. The fare is the dependent variable, because it is computed from the distance you chose.
Question 3. A survey finds that people who drink more coffee report less sleep. A friend says coffee is the independent variable, so it causes the lost sleep. What would you say?
Answer to question 3
Nobody assigned the coffee, so the survey alone does not show cause. Short sleep could lead people to drink more coffee, or something else could drive both. Calling coffee the predictor says how it was used without claiming that it caused anything.
What the sources found, and their limits
Wikipedia, "Experiment" and "Random assignment." The first describes the manipulated and measured variables of a true experiment and the link to cause and effect. The second explains how random assignment guards against confounding. Limits: reference articles under CC BY-SA 4.0. Sources: experiment and random assignment, read on 2026-11-25.
Wikipedia, "Dependent and independent variables." Gives the function sense of input and output, the graph convention and other names such as explanatory and response variable. Limits: an encyclopedia entry under CC BY-SA 4.0 that anyone can edit, so follow your course's wording; the function sense involves no experiment or cause. Source: the Wikipedia article, read on 2026-11-25.
How Professor Turing helps
Professor Turing is a tutor for adults learning any subject, in college or on their own. It asks you questions instead of giving the final answer, does not grade a bare guess, and remembers what you got wrong. No account is needed to start. It's an AI tutor, free to try.
Bring the study or word problem you are working on. Its first reply asks about your attempt, such as which quantity you think was changed and why, before it teaches anything. You must be 18 or older. Guest conversations are deleted 7 days after your last activity; with an account they are kept while the account is active.
FAQ
How do I remember which variable is which? Say "I changed ___ to see what happens to ___." The first blank is the independent variable and the second is the dependent variable.
Can a study have more than one independent variable? Yes. A study can change two things, such as study method and quiz delay, and measure one score. Name each thing that was changed and each thing that was measured.
Does the label independent mean that the variable is a cause? Not on its own. In an experiment with random assignment you can test for cause. In a survey or a formula, the label tells you which quantity is treated as the input.
Start with what you're working on
Tell the tutor which study or problem you are trying to explain and let it ask you the questions.
Start learning No account needed
See also: correlation and causation · all study guides