Explanatory and Response Variables
Introduction
Welcome to the first lesson of Fitting a Line to Data, the third course in this learning path! In the earlier courses, you explored how paired data reveal relationships, built scatter plots, and measured linear association with the correlation coefficient. Now you are ready for the next big idea: drawing a straight line through a scatter plot to summarize a trend and make predictions.
Before we can fit that line, though, we need to answer a simple but important question: which variable are we trying to predict, and which variable are we using to make that prediction? Getting these roles right is the essential first step, and it is exactly what this lesson covers.
Prediction Has a Direction
You may recall that correlation treats both variables symmetrically. The correlation between height and weight is the same whether you list height first or weight first. Fitting a line is different. When you fit a line, you always have a specific prediction question in mind, and that question points in one direction.
Consider this example: a teacher wants to use the number of hours a student studies to predict their test score. The question moves from study hours toward test score. If you flipped the question and tried to use test scores to predict how long someone studied, that would be a different question entirely — and it would produce a different line.
This means the roles you assign to your two variables truly matter. Choosing those roles is not a minor detail; it shapes every step that follows.
Explanatory and Response Variables
Every prediction question involves two roles:
- The explanatory variable (also called the predictor) is the variable you use as input. It is the piece of information you already know or can control.
- The response variable (also called the outcome) is the variable you want to predict. It is the quantity whose value you are trying to estimate.
A reliable way to identify these roles is to listen for the structure of the prediction question. The pattern usually sounds like "use A to predict B." In that sentence, A is the explanatory variable and B is the response variable.
For instance, "use home square footage to predict monthly electricity cost" tells you that square footage is explanatory and electricity cost is the response. Similarly, "use daily temperature to predict ice cream sales" makes temperature explanatory and ice cream sales the response. In every case, the direction of the question does the work for you.

