Relationships Between Variables

In statistics, we often want to understand whether two variables are connected — for example, does studying more hours lead to higher test scores, or does a city's average temperature affect its ice cream sales? When we collect and analyze data on two variables simultaneously, we are working with bivariate data. The central goal is to frame precise questions about associations: how one variable changes in relation to another, and whether that relationship is strong enough to be meaningful. Before doing any calculations, a good statistician starts by asking the right questions. Is there a relationship between variable X and variable Y? If so, in what direction does it go — as X increases, does Y also increase (positive association) or decrease (negative association)? How strong is that relationship — is it tight and predictable, or loose and scattered? And crucially, does a relationship in the data imply that one variable actually causes the other to change? These four questions — existence, direction, strength, and causation — form the backbone of any investigation into bivariate data. Understanding relationships between variables is one of the most powerful tools in all of science, economics, medicine, and social research. By learning to frame questions carefully and interpret scatter plots and correlation coefficients correctly, you build a foundation for regression analysis, experimental design, and critical evaluation of claims you encounter in everyday life.

Key takeaways
  • Identify the Explanatory and Response Variables
  • Ask: Does an Association Exist?
  • Ask: What is the Direction?
  • Ask: How Strong is the Association?
  • Ask: Is the Relationship Causal?

Identify the Explanatory and Response Variables

Every bivariate investigation begins by labelling your two variables. The explanatory variable (also called the independent variable) is the one you suspect might influence the other. The response variable (dependent variable) is the outcome you measure. For example, if you study whether sleep hours (X) affect reaction time (Y), sleep hours is the explanatory variable and reaction time is the response variable. Plotting X on the horizontal axis and Y on the vertical axis of a scatter plot is standard practice.

Ask: Does an Association Exist?

An association exists when knowing the value of one variable tells you something useful about the value of the other. On a scatter plot, look for a pattern in the cloud of points. If the points are randomly scattered with no direction, there is likely no association. If they drift upward or downward together, an association is present. Numerically, the Pearson correlation coefficient r quantifies this. Values of r near 0 suggest no linear association; values near +1 or −1 suggest a strong linear association.

Ask: What is the Direction?

A positive association means that as the explanatory variable increases, the response variable tends to increase as well (r > 0). A negative association means that as the explanatory variable increases, the response variable tends to decrease (r < 0). For instance, the number of absences and final grade tend to show a negative association — more absences, lower grade. Direction is visible in the slope of the scatter plot's trend and is captured by the sign of r.

Ask: How Strong is the Association?

Strength refers to how closely the data points follow the pattern. A strong association means points cluster tightly around the trend line; a weak association means they are widely spread. Conventionally: |r| ≥ 0.7 is often considered strong, 0.4 ≤ |r| < 0.7 moderate, and |r| < 0.4 weak, though context matters enormously. In social science, r = 0.4 might be impressive; in physics, r = 0.99 might be expected.

Ask: Is the Relationship Causal?

This is the most important and most commonly misunderstood question. Correlation does NOT imply causation. Two variables can be strongly correlated because a third lurking variable drives both, or purely by coincidence. For example, ice cream sales and drowning rates are positively correlated — but eating ice cream doesn't cause drowning. Hot weather (a lurking variable) drives both. To establish causation, researchers use controlled experiments where one variable is deliberately manipulated while others are held constant.

The Key Equation

r=∑i=1n(xi−xˉ)(yi−yˉ)∑i=1n(xi−xˉ)2⋅∑i=1n(yi−yˉ)2r = \frac{\sum_{i=1}^{n}(x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum_{i=1}^{n}(x_i - \bar{x})^2 \cdot \sum_{i=1}^{n}(y_i - \bar{y})^2}}
  • r — Pearson correlation coefficient (dimensionless): Measures the strength and direction of the linear relationship between two variables; always between −1 and +1.
  • x_i — individual x-value (units of x): The i-th observation of the explanatory variable.
  • \bar{x} — mean of x (units of x): The arithmetic average of all x observations.
  • y_i — individual y-value (units of y): The i-th observation of the response variable.
  • \bar{y} — mean of y (units of y): The arithmetic average of all y observations.
  • n — sample size (count): The total number of paired data points (x, y) in the dataset.

Worked Example

Problem. A student records study hours and quiz scores for 5 classmates: (1, 55), (2, 60), (3, 65), (4, 75), (5, 80). Calculate the Pearson correlation coefficient r and interpret the association.

r≈0.991r \approx 0.991

Answer. r ≈ 0.991; very strong positive linear association between study hours and quiz scores.

Figure
Diagram
Scatter Plot: Study Hours vs Quiz ScoreStudy Hours (X)Quiz Score (Y)0123455060708090r ≈ +0.991Strong positiveassociationEach blue dot = one student's (hours, score) pair
Origins · 1 minKarl Pearson and how this was discovered
KP
Karl Pearson
1857–1936 · British

Karl Pearson founded the discipline of mathematical statistics. He developed the Pearson correlation coefficient (r) in 1895, giving scientists a precise numerical tool to measure the strength and direction of linear relationships between variables. He also developed chi-squared tests and the concept of the p-value, forming cornerstones of modern statistical inference. Pearson was so dedicated to statistics that he founded the world's first university statistics department at University College London in 1911, and he personally edited the journal Biometrika for 35 years.

  • Scatter Plots — Scatter plots are the primary graphical tool for visualizing bivariate data and identifying whether an association exists, its direction, and its approximate strength before calculating r.
  • Correlation Coefficient — The Pearson r is the numerical measure that quantifies the linear association identified when framing questions about relationships between variables.
  • Linear Regression — Once an association is confirmed, linear regression produces the equation of the best-fit line, allowing predictions of the response variable from the explanatory variable.
  • Causation vs Correlation — Correctly interpreting associations requires understanding why correlation does not prove causation, including lurking variables and confounding effects.