# Dependent Variable Examples: Definition and Study Design

Examples of dependent variables are the outcomes you measure in a study, and they change in response to something else you control or observe. In a plant growth experiment, the fertilizer amount is what you set, and the plant height is what you measure. This article defines the dependent variable, shows several examples of dependent variables across fields, and walks through a full worked example so you can identify the dependent variable in any study.

## Quick Answer

- The dependent variable is the outcome you measure. It is also called the response variable or the outcome variable [1].
- The independent variable is the one you change or set. It is also called the factor or predictor [2].
- You identify the dependent variable by asking "what am I measuring?" not "what am I changing?"
- In a regression, the dependent variable is the $y$ value and the independent variable is the $x$ value.
- A dependent variable should be measured the same way for every unit in the study, or comparisons break down [3].

## What a Dependent Variable Means

In plain terms, the dependent variable is the thing you observe and record as the result of your study. If you give some plants more fertilizer and others less, the height you measure at the end is the dependent variable. Its value "depends" on the fertilizer level, which is why it carries that name.

The precise statistical definition is narrower. A variable is any characteristic that can take different values across units [1]. The dependent variable is the variable whose distribution you model as a function of one or more independent variables. In a designed experiment, the independent variables are the factors you manipulate, and the dependent variable is the response you record [2]. The goal is usually to quantify a causal relationship, not just a correlation, because correlation alone does not imply causation [2].

A few examples across fields:

| Field | Independent variable | Dependent variable |
|---|---|---|
| Agronomy | Fertilizer amount (g) | Plant height (cm) |
| Medicine | Drug dose (mg) | Blood pressure (mmHg) |
| Education | Teaching method | Test score (points) |
| Marketing | Ad spend ($) | Units sold |
| Psychology | Sleep hours | Reaction time (ms) |

In each row, the left column is what the researcher sets or groups by, and the right column is what gets measured. If you can swap the columns and the study still makes sense, you probably have the roles backwards.

## How It Works

The dependent variable sits on the left side of a model. For a simple linear regression with one independent variable, the relationship is:

$$y_i = b_0 + b_1 x_i + e_i$$

Each symbol has a specific job:

- $y_i$ is the dependent variable for unit $i$, the value you measured.
- $x_i$ is the independent variable for unit $i$, the value you set or observed.
- $b_0$ is the intercept, the predicted $y$ when $x = 0$.
- $b_1$ is the slope, the predicted change in $y$ for a one-unit increase in $x$.
- $e_i$ is the residual, the part of $y_i$ the model does not explain.

The slope is estimated from the covariance between the two variables divided by the variance of the independent variable:

$$b_1 = \frac{\text{cov}(x, y)}{s_x^2}$$

The correlation $r$ standardizes that same relationship onto a scale from -1 to 1:

$$r = \frac{\text{cov}(x, y)}{s_x s_y}$$

Here $s_x$ and $s_y$ are the sample standard deviations of the independent and dependent variables. A correlation near 1 means the two move together almost perfectly, near -1 means they move in opposite directions, and near 0 means little linear relationship. You can see these patterns side by side in [correlation examples with positive, negative and zero relationships](/blog/data-analysis/correlation-examples-positive-negative).

## Worked Example

This is a small plant growth study. Fertilizer amount in grams is the independent variable, and plant height in centimeters is the dependent variable.

| plant_id | fertilizer_g | height_cm |
|---|---|---|
| 1 | 0 | 12.1 |
| 2 | 0 | 13.4 |
| 3 | 5 | 18.2 |
| 4 | 5 | 17.5 |
| 5 | 10 | 24.6 |
| 6 | 10 | 25.1 |
| 7 | 15 | 29.8 |
| 8 | 15 | 31.2 |
| 9 | 20 | 33.5 |
| 10 | 20 | 34.1 |

Step 1. Sample size. There are $n = 10$ plants.

Step 2. Mean height. Sum the ten heights and divide by 10:

$$\text{mean} = \frac{12.1 + 13.4 + 18.2 + 17.5 + 24.6 + 25.1 + 29.8 + 31.2 + 33.5 + 34.1}{10} = 23.9500 \text{ cm}$$

Step 3. Sample variance. Using the $n-1$ denominator, the same as Excel's VAR.S:

$$s^2 = \frac{\sum (y_i - 23.9500)^2}{9} = 67.6828$$

Step 4. Sample standard deviation. The square root of the variance, matching Excel's STDEV.S:

$$s = \sqrt{67.6828} = 8.2270 \text{ cm}$$

Step 5. Quartiles. Using Excel's QUARTILE.INC with linear interpolation, $Q1 = 17.6750$, the median is $24.8500$, and $Q3 = 30.8500$.

Step 6. Range. The maximum minus the minimum: $34.1 - 12.1 = 22.0$ cm.

Step 7. Covariance. The $n-1$ covariance between fertilizer and height is $60.8333$.

Step 8. Correlation. Divide the covariance by the product of the two standard deviations:

$$r = \frac{60.8333}{7.4536 \times 8.2270} = 0.9921$$

Step 9. Slope. The covariance divided by the variance of the fertilizer values:

$$b_1 = \frac{60.8333}{55.5556} = 1.0950 \text{ cm per g}$$

Step 10. Intercept. The mean height minus the slope times the mean fertilizer:

$$b_0 = 23.9500 - 1.0950 \times 10.0000 = 13.0000 \text{ cm}$$

Step 11. Rounding. Excel's ROUND function rounds half away from zero, so ROUND(8.226954, 2) = 8.23.

Here is the same analysis in Python:

```python
import pandas as pd
df = pd.DataFrame({'fertilizer_g': [0,0,5,5,10,10,15,15,20,20],
                   'height_cm': [12.1,13.4,18.2,17.5,24.6,25.1,29.8,31.2,33.5,34.1]})
print(f"mean = {df['height_cm'].mean():.4f}")        # dependent variable mean
print(f"sd   = {df['height_cm'].std(ddof=1):.4f}")   # sample SD (Excel STDEV.S)
print(f"r    = {df['height_cm'].corr(df['fertilizer_g']):.4f}")
```

Output:

```text
mean = 23.9500
sd   = 8.2270
r    = 0.9921
```

The dependent variable here has a mean of 23.95 cm and a standard deviation of 8.23 cm. The correlation of 0.99 with fertilizer amount is very strong, and the slope says each extra gram of fertilizer is associated with about 1.10 cm more height in this sample.

## How to Interpret It

Start with the center and spread of the dependent variable. A mean of 23.95 cm with a standard deviation of 8.23 cm tells you plants varied a lot, from 12.1 cm to 34.1 cm. That spread is the variation your independent variable is trying to explain.

Then look at the relationship. A correlation of 0.9921 means the points fall almost on a straight line. The slope of 1.0950 cm per gram is the practical takeaway, and the intercept of 13.0000 cm is the model's prediction at zero fertilizer. The intercept is only meaningful if zero fertilizer is inside the range you actually studied.

Finally, check whether the pattern is causal. A designed experiment with random assignment supports a causal claim. An observational study with the same numbers supports only an association, because a third factor could drive both variables, a problem covered in [the third variable problem](/blog/data-analysis/third-variable-problem).

## When to Use It (and when not to)

Use a clearly defined dependent variable whenever you want to compare groups or model a relationship. It fits controlled experiments, quasi-experiments, and observational regression alike. If you have several outcomes, treat each as its own dependent variable and plan for the extra comparisons, as described in [factorial designs for studying multiple variables](/blog/guides/factorial-designs-how-to-study-multiple-variables-efficiently).

Do not force a dependent variable onto a study that has no measurable outcome. Purely descriptive work may report distributions without any response variable at all. Also avoid treating a variable as dependent when you cannot measure it consistently across units, because inconsistent measurement adds noise that can hide a real effect [3]. When you design the study, decide the dependent variable before you collect data, since choosing it after seeing results invites bias [4].

## Dependent Variable vs Independent Variable

These two roles are easy to confuse, so compare them directly.

| Feature | Dependent variable | Independent variable |
|---|---|---|
| Role | Outcome you measure | Input you set or observe |
| Other names | Response, outcome | Factor, predictor, explanatory |
| Position in regression | $y$ | $x$ |
| Who controls it | The measurement process | The researcher or nature |
| Typical question | "What happened?" | "What did we change?" |

The independent variable is sometimes called the explanatory variable, and its role in modeling is covered in [explanatory variable definition and examples](/blog/data-analysis/explanatory-variable). If your study has two measured variables and neither is manipulated, the choice of which is dependent comes from your research question, not from the data itself. That situation is common in [bivariate data analysis](/blog/data-analysis/bivariate-data-definition-examples).

## Common Mistakes

- Swapping the roles. People label the variable they changed as the dependent variable. Fix: ask what you measured, and assign that as the dependent variable.
- Measuring the outcome differently across groups. If one group is measured with a different instrument, the comparison is confounded. Fix: standardize the measurement protocol before data collection [3].
- Ignoring the scale of the dependent variable. A count, a proportion, and a continuous measurement need different models. Fix: check whether the outcome is continuous or discrete, as covered in [discrete vs continuous variables](/blog/research-skills/discrete-vs-continuous-variables-key-differences).
- Reading correlation as causation. A high $r$ does not prove the independent variable caused the change [2]. Fix: use random assignment if you need a causal claim.
- Choosing the dependent variable after seeing results. This inflates false positives. Fix: pre-specify the primary outcome in your design [4].
- Forgetting confounders. An unmeasured variable can drive both columns. Fix: identify and control likely confounders, as described in [confounding variables in biological experiments](/knowledge/diagnostics/research-methods/confounding-variables-in-biological-experiments-identification-and-mitigation-strategies).

## Limitations

A dependent variable only captures what you chose to measure. If plant height is your outcome, you learn nothing about root mass, yield, or disease resistance from that single column. Important effects can sit in outcomes you never recorded.

The statistical relationship also depends on the range you studied. The slope of 1.0950 cm per gram is estimated from fertilizer levels between 0 and 20 g. Extrapolating to 100 g assumes the linear pattern continues, which plants rarely do. Beyond some point, more fertilizer can reduce growth, and a straight line would miss that entirely.

## Frequently Asked Questions

### What is a simple example of a dependent variable?

In a study on study habits, the number of hours studied is the independent variable and the exam score is the dependent variable. The score is what you measure, and it may change depending on how much students studied. Any outcome you record as a result counts as a dependent variable.

### How do I identify the dependent variable in an experiment?

Ask two questions. First, what did the researcher change or group by? That is the independent variable. Second, what did the researcher measure as the result? That is the dependent variable. If you can finish the sentence "we measured ___," you have found it.

### Can a study have more than one dependent variable?

Yes. A clinical trial might measure blood pressure, heart rate, and cholesterol at once. Each is a separate dependent variable and needs its own analysis. More outcomes raise the chance of a false positive, so pre-specify which one is primary [4].

### Is the dependent variable always on the y-axis?

In a standard scatter plot and in regression notation, yes. The dependent variable is plotted on the vertical axis and the independent variable on the horizontal axis. This convention makes the slope easy to read as the change in the outcome per unit of the predictor.

### What is the difference between a dependent variable and a controlled variable?

A controlled variable is held constant so it cannot affect the outcome, such as keeping room temperature the same for all plants. A dependent variable is allowed to vary and is measured. Controlled variables protect the comparison, while the dependent variable is the comparison's result.

## References

1. [Altman DG, Bland JM (1999). Statistics notes Variables and parameters. BMJ](https://doi.org/10.1136/bmj.318.7199.1667)
2. [3.1.3.6. Experiments and Experimental Design](https://www.itl.nist.gov/div898/handbook/ppc/section1/ppc136.htm)
3. [Krzywinski M, Altman N (2014). Designing comparative experiments. Nature Methods](https://doi.org/10.1038/nmeth.2974)
4. [Smucker B, Krzywinski M, Altman N (2018). Optimal experimental design. Nature Methods](https://doi.org/10.1038/s41592-018-0083-2)

## Further Reading

- [Krzywinski M, Altman N (2013). Importance of being uncertain. Nature Methods](https://doi.org/10.1038/nmeth.2613)
- [NIST/SEMATECH e-Handbook of Statistical Methods](https://www.itl.nist.gov/div898/handbook/index.htm)

## Related Articles

- [Explanatory Variable: Definition, Examples and Role in Regression](/blog/data-analysis/explanatory-variable)
- [Bivariate Data: Definition, Examples and Analysis](/blog/data-analysis/bivariate-data-definition-examples)
- [Nominal vs Ordinal Variables: Differences and Examples](/blog/data-analysis/nominal-vs-ordinal-variables)
- [Correlation Examples: Positive, Negative and Zero Relationships](/blog/data-analysis/correlation-examples-positive-negative)
- [Covariance Formula: Definition and Calculation Examples](/blog/data-analysis/covariance-formula-definition)
- [Independent, Dependent, and Controlled Variables: A Guide for Experiment Design](/blog/guides/independent-dependent-and-controlled-variables-a-guide-for-experiment-design)
- [Factorial Designs: How to Study Multiple Variables Efficiently](/blog/guides/factorial-designs-how-to-study-multiple-variables-efficiently)
- [Discrete vs Continuous Variables: Key Differences](/blog/research-skills/discrete-vs-continuous-variables-key-differences)