Independent and Dependent Variables: 20 Examples and How to Tell Them Apart

Website image

Dr. Rajni Garg

Executive Lead, Research & Content Strategy

8 min read

Independent and Dependent Variables: 20 Examples and How to Tell Them Apart
Independent and Dependent Variables: 20 Examples and How to Tell Them Apart

Independent and dependent variables are the two halves of the relationship a study tests: the independent variable is what you change or compare, and the dependent variable is what you measure to see whether it responds. For example, if you test whether sleep loss slows reaction time, hours of sleep is the independent variable and reaction time is the dependent variable. In a drug trial, the treatment is the independent variable and blood pressure might be the dependent variable.

Below are a quick test for telling them apart, 20 research examples from seven fields, the other variables to know, and how to turn your variables into a research question and hypothesis.

TL;DR

  • The independent variable is what you change or compare. The dependent variable is what you measure.

  • If “the effect of X on Y” makes sense, X is the independent variable. It goes on the horizontal axis of a graph.

  • Control and confounding variables are the other factors that could explain your result.

  • Only an experiment, where you assign the independent variable, can show cause and effect on its own.

What is the difference between independent and dependent variables?

Here is the difference in two sentences. The independent variable is what you change or compare, such as a teaching method, a drug dose or a group of people. The dependent variable is what you measure to see whether it changes, such as test scores, blood pressure or sales.

The open textbook Research Methods in Psychology defines the independent variable as the one the experimenter manipulates and the dependent variable as the one the experimenter measures, “the presumed effect.” The National Library of Medicine puts it in health terms: the independent variable is what you expect will influence the dependent variable, and the dependent variable is what happens as a result.

The name is the clue. The dependent variable depends on the independent one. The different values of the independent variable, such as 4 or 8 hours of sleep, are called its levels or conditions.

How do you tell which is which?

Three quick tests settle most cases:

  • The “effect of” test. Fill in “the effect of ___ on ___.” Whatever fits the first blank is the independent variable. “The effect of sleep on reaction time” makes sense. “The effect of reaction time on sleep” does not.

  • The “depends on” test. Say “[dependent] depends on [independent].” Reaction time can depend on sleep.

  • The time test. The independent variable comes first. It is set, or already in place, before the outcome you measure.

In an observational study, the same tests tell you the roles, but write “association” in your paper rather than “effect.”

On a graph, the independent variable conventionally goes on the x-axis (horizontal) and the dependent variable on the y-axis (vertical). If your graph looks backwards, check whether you swapped them.

Graph with the independent variable, hours of sleep, on the x-axis and the dependent variable, reaction time, on the y-axis.

20 independent and dependent variable examples by field

Each row is the kind of study you would see in a journal or thesis. The last column shows whether researchers assigned the independent variable (experiment) or only measured it (observational).

Field

Study

Independent variable (or predictor)

Dependent variable (or outcome)

Design

Psychology

Does one night of short sleep slow reaction time in healthy adults?

Sleep the night before (4 or 8 hours, assigned)

Reaction time on a 10-minute vigilance test (ms)

Experiment

Psychology

Does expressive writing before an exam lower test anxiety?

Writing task (exam worries or a neutral topic)

Test anxiety score just before the exam

Experiment

Psychology

Is daily social media use linked to depressive symptoms in university students?

Hours of social media use per day

PHQ-9 depression score

Observational

Education

Do weekly low-stakes quizzes raise final exam scores in an introductory biology course?

Course section (weekly quizzes or none)

Final exam score (%)

Quasi-experiment

Education

Does the type of feedback change how well students revise essays?

Feedback type (comments only, grade only, or both)

Rubric score on the revised essay

Experiment

Education

Is class size associated with Grade 3 reading scores?

Number of students in the class

Standardized reading test score

Observational

Medicine

Does a new drug lower blood pressure more than a placebo?

Treatment (drug or placebo, randomized)

Change in systolic blood pressure after 12 weeks (mmHg)

Experiment (RCT)

Medicine

Does the daily dose of vitamin D3 change blood vitamin D levels?

Daily dose (400, 1,000 or 2,000 IU)

Serum 25-hydroxyvitamin D after 6 months

Experiment (RCT)

Medicine

Is time to the first antibiotic dose linked to death from sepsis?

Hours from emergency department arrival to first antibiotic

In-hospital death (yes or no)

Observational (cohort)

Nursing

Does a nurse-led discharge session reduce readmissions in heart failure?

Discharge type (nurse-led session or standard discharge)

Readmission within 30 days (yes or no)

Experiment (RCT)

Nursing

Does hourly rounding reduce patient falls on medical wards?

Ward practice (hourly rounding or usual care)

Falls per 1,000 patient days

Quasi-experiment

Nursing

Is nurse staffing linked to patient deaths after surgery?

Patients per registered nurse

Death within 30 days of admission

Observational

Business

Does a free shipping offer raise online sales?

Shipping offer shown (free or $4.99)

Conversion rate (% of visitors who buy)

Experiment (A/B test)

Business

Does showing a salary range in job ads increase applications?

Salary range in the ad (shown or not shown)

Applications per posting

Experiment (field)

Business

Is remote work linked to employees’ intention to quit?

Days worked from home per week

Turnover intention score

Observational (survey)

Biology

Does knocking down a candidate gene shorten lifespan in C. elegans?

RNAi treatment (target gene or empty-vector control)

Median lifespan (days)

Experiment

Biology

Is dietary fiber linked to gut microbiome diversity in adults?

Daily fiber intake (grams)

Shannon diversity index of stool samples

Observational

Environmental science

Does biochar increase how much water sandy soil holds?

Biochar added (0%, 2% or 5% by weight)

Water-holding capacity (%)

Experiment

Environmental science

Does lower seawater pH slow coral growth?

Tank seawater pH (8.1 or 7.8)

Calcification rate (skeletal growth per week)

Experiment

Environmental science

Is living near a major road linked to childhood asthma?

Distance from home to the nearest major road (meters)

Asthma diagnosis (yes or no)

Observational

In the observational rows, read the independent variable as the predictor and the dependent variable as the outcome. The quasi-experiments compare existing groups, such as course sections or wards, rather than randomly assigned ones.

What other variables should you know?

Your methods section will likely mention some of these:

  • Control variable: something you hold constant so it cannot explain your result, such as testing every participant in the same room.

  • Extraneous variable: any variable other than your independent and dependent variables, such as room temperature or a participant’s mood.

  • Confounding variable: an extraneous variable linked to both the independent and dependent variables, so it offers another explanation. In the National Library of Medicine’s example, nearby factory pollution could confound a link between vehicle exhaust and childhood asthma.

  • Moderator: changes the strength or direction of the relationship. If exercise lowers anxiety more in older adults than in younger ones, age is a moderator.

  • Mediator: explains how or why the relationship happens. If exercise improves sleep and better sleep lowers anxiety, sleep is a mediator.

Both definitions follow Baron and Kenny (1986), the classic paper on the distinction.

Diagrams comparing a confounding variable, a moderator and a mediator in relation to an independent variable X and a dependent variable Y.

How do variables work in experiments and observational studies?

In an experiment, you assign the independent variable, ideally at random, and hold other factors constant. Research Methods in Psychology calls these two features manipulation and control. Together they let you say the independent variable caused the change.

In an observational study, you measure both variables as they already are. You might record how many hours students spend on social media and their depression scores. Since nobody assigned anything, many researchers call the variables the predictor and the outcome.

An observational study alone does not show cause, for two reasons that book’s chapter on correlational research explains. The direction may run the other way: students with more depressive symptoms may use social media more. Or a third variable, such as loneliness, may drive both. Measuring likely third variables and controlling for them statistically helps, but it cannot rule out the ones you did not measure.

Observational designs still matter, and are sometimes the only ethical option. You cannot assign people to smoke. For how designs fit with sampling and analysis choices, see our research methodology examples.

How do you put the variables into a research question and a hypothesis?

Once you have named your variables, the research question nearly writes itself. Two templates cover most quantitative studies:

  • Experiment: What is the effect of [independent variable] on [dependent variable] among [population]?

  • Observational: Is [predictor] associated with [outcome] among [population]?

Then turn the question into a pair of hypotheses. Here is the heart failure study from the table:

  • Null hypothesis: There is no difference in 30-day readmission rates between adults with heart failure who receive a nurse-led discharge session and those who receive standard discharge.

  • Alternative hypothesis: Adults with heart failure who receive a nurse-led discharge session will have a lower 30-day readmission rate than those who receive standard discharge.

Both name the independent variable (type of discharge), the dependent variable (30-day readmission) and the population. Our guide on how to write a hypothesis walks through the full process, from research question to checking your design.

For a first draft, the AnswerThis hypothesis generator drafts three null and alternative hypothesis pairs, each with variables, a population and suggested measurements. You describe the relationship, population or materials, comparison and measurement period you want to study, and it includes three successful free runs per browser. Treat the three pairs as candidates, then check each one against the literature and your design.

AnswerThis hypothesis generator with an example research topic entered, ready to draft three null and alternative hypothesis pairs.

What are the most common mistakes?

  • Naming a topic instead of a variable. “Stress” is a topic. “Score on the Perceived Stress Scale” is a dependent variable you can measure.

  • Confusing the variable with its levels. In a caffeine study, the independent variable is caffeine dose. “200 mg” and “placebo” are its levels.

  • Writing “effect” for an observational study. If you did not assign the independent variable, describe an association.

  • Ignoring confounders. List what else could explain your result before you collect data, then control it or measure it.

  • Measuring many outcomes without choosing a main one. Name a primary dependent variable in advance, so you are not tempted to report whichever one worked.

FAQs

Can a study have more than one independent or dependent variable?

Yes. A factorial experiment tests two or more independent variables at once, such as dose and timing, and many studies measure several outcomes.

Can age or gender be an independent variable?

Yes, as a predictor or grouping variable. Because you cannot assign it, a study comparing groups by age or gender can show differences, but not on its own that age or gender caused them.

What is the difference between a control variable and a control group?

A control variable is something you keep the same for everyone, such as the testing room. A control group is the group of participants who get no treatment, a placebo or usual care, which makes it one level of the independent variable.

What are other names for independent and dependent variables?

The independent variable is also called the predictor, explanatory or exposure variable. The dependent variable is also called the outcome, response or criterion variable.

Do qualitative studies have independent and dependent variables?

Usually not. Qualitative research explores experiences and meanings rather than measuring variables, so it is built around a phenomenon and a research question instead.

Once your variables are clear, try the hypothesis generator to draft three null and alternative pairs, then check each one against your design.