Scatter Plots and Correlation
Jayden's coach says that more practice means better free throws. Emma says that more time on her phone means lower quiz scores. Is either claim true? Before you calculate anything, you can plot the data and look at it. A good scatter plot tells you whether two variables rise together, move in opposite directions, or have nothing to do with each other. It also warns you when a calculation would be meaningless.
What a scatter plot is
The number of points always equals the number of individuals. If you survey 25 classmates, you get 25 points, not 50.
A group of 11th grade students has carried out a small study on the time they spend on video games per week ($X$, in hours) and the grade obtained in the last Math exam…
A group of 11th grade students has carried out a small study on the time they spend on video games per week ($X$, in hours) and the grade obtained in the last Math exam ($Y$, from 0 to 10). The data collected are as follows:
| Hours ($X$) | 2 | 5 | 8 | 10 | 12 | 15 |
|---|---|---|---|---|---|---|
| Grade ($Y$) | 9 | 8 | 6 | 5 | 4 | 3 |
Represent the scatter plot corresponding to this two-dimensional distribution on a Cartesian coordinate system and state, simply by observing the graph, whether the relationship between both variables seems to be direct or inverse.
A group of researchers wants to study whether there is a relationship between the weekly time teenagers spend using video streaming* applications and their academic…
A group of researchers wants to study whether there is a relationship between the weekly time teenagers spend using video streaming applications and their academic performance. To do this, they have selected a sample of 8 students and collected the following data:
| Streaming hours ($X$) | 12 | 18 | 5 | 22 | 10 | 15 | 8 | 25 |
|---|---|---|---|---|---|---|---|---|
| Mean grade ($Y$) | $7,5$ | $6,2$ | $8,8$ | $5,5$ | $8,0$ | $6,8$ | $8,2$ | $4,8$ |
- a) Represent the scatter plot associated with this two-dimensional distribution.
- b) Looking at the graph, what type of correlation seems to exist between both variables (direct or inverse)? Justify whether you think the relationship is strong or weak.
Which variables can be graphed?
A scatter plot needs two quantitative variables, meaning numbers that measure something, so that "more" and "less" make sense on both axes. Eye color, favorite sport, and a student's name are categorical. They have no natural numerical order, so there is nowhere sensible to put them on an axis. For categories you use bar graphs or two-way tables instead.
When one variable might help explain the other, call it the explanatory (independent) variable and put it on the $x$-axis. The variable that responds goes on the $y$-axis. Hours studied is explanatory and exam grade is the response. It would be strange to say that your grade changes the hours you studied before the exam.
Explain with reasoning why the following data could not be correctly represented using a scatter plot in the context of two-dimensional statistics: | Student | Eye color…
Explain with reasoning why the following data could not be correctly represented using a scatter plot in the context of two-dimensional statistics:
| Student | Eye color | Favorite sport |
|---|---|---|
| Emma | Blue | Basketball |
| Michael | Brown | Soccer |
| Olivia | Green | Tennis |
Given the following pairs of variables, state for which of them it would make sense to construct a scatter plot to analyze their relationship. Justify your decision in…
Given the following pairs of variables, state for which of them it would make sense to construct a scatter plot to analyze their relationship. Justify your decision in each case:
-
The names of the students in the class and their height.
-
The number of hours of study and the grade in an exam.
-
The eye color and the gender of a person.
-
The price of a second-hand car and its miles driven.
Direction: positive, negative, or none
Read a scatter plot from left to right, the same way you read a graph in Algebra 1.
When a problem asks you to explain the sign "in context," finish the sentence with the real variables. For example, if heating cost is plotted against the average monthly temperature, the association is negative: warmer months go with a smaller heating bill. A few problems give temperatures in °C, the unit used in science. The reasoning about the sign is exactly the same, and $12\,^\circ\text{C}$ is about $54\,^\circ\text{F}$.
Observe the following scatter plots represented below. Identify in each case whether the correlation is positive, negative or zero.
Observe the following scatter plots represented below. Identify in each case whether the correlation is positive, negative or zero.
Match each of the following pairs of variables with the type of scatter plot you would expect to obtain (increasing, decreasing or with no defined shape): a) The number…
Match each of the following pairs of variables with the type of scatter plot you would expect to obtain (increasing, decreasing or with no defined shape):
- a) The number of miles driven by a car and the fuel left in its tank.
- b) The height of a group of teenagers and their grade in the English exam.
- c) The training hours of an athlete and their personal best in a 100-meter sprint.
- d) The outside temperature in summer and the energy consumption of air conditioning units.
It is suspected that there is a relationship between the number of absences from class ($X$) and the final grade for the term ($Y$). The data for a class have been…
It is suspected that there is a relationship between the number of absences from class ($X$) and the final grade for the term ($Y$). The data for a class have been represented in the following diagram:
In the graph, there is a soft white point with an orange border that clearly separates from the general trend of the group. What is this type of point called in statistics and what could it mean in this real context?
Strength: how tightly the points cluster
Two plots can both be positive, yet one may look almost like a line while the other looks like a loose cloud. The difference is strength.
A music application has analyzed the data of 8 users to see the relationship between their age ($X$, in years) and the number of different songs they listen to per month…
A music application has analyzed the data of 8 users to see the relationship between their age ($X$, in years) and the number of different songs they listen to per month ($Y$). The resulting scatter plot is shown below:
Looking at the graph, can we say that the correlation is strong or weak? Justify whether the number of songs listened to tends to increase or decrease as age increases according to this sample.
The weight ($X$) and height ($Y$) of the players in a basketball team have been measured. The scatter plot shows a very elongated and narrow shape that follows an upward…
The weight ($X$) and height ($Y$) of the players in a basketball team have been measured. The scatter plot shows a very elongated and narrow shape that follows an upward direction.
What does the fact that the scatter plot is "narrow" indicate regarding the strength of the correlation? What would we call the relationship between weight and height in this case (direct or inverse)?
The relationship between the investment in social media advertising ($X$, in thousands of dollars) and the number of new subscribers ($Y$, in hundreds) for two different…
The relationship between the investment in social media advertising ($X$, in thousands of dollars) and the number of new subscribers ($Y$, in hundreds) for two different mobile applications, "App A" and "App B", is studied. The resulting scatter plots show that both have a mean investment of $\bar{x} = 5$ and a mean number of subscribers of $\bar{y} = 12$. However, App A presents a very scattered circular cloud, while App B presents a very narrow and elongated cloud with a negative slope.
-
Sketch both scatter plots on the same set of axes, differentiating them by colors or symbols.
-
Compare the correlation coefficients $r_A$ and $r_B$. In which case is it more reliable to make a prediction of the number of subscribers based on the investment?
-
What would it mean, in the context of marketing, for App B to have a negative slope?
The correlation coefficient $r$
Words like "strong" and "weak" are vague. The correlation coefficient $r$ (sometimes called Pearson's $r$) puts direction and strength into one number. A graphing calculator or spreadsheet computes it. Your first job is to predict roughly what it should be by looking at the plot.
As a rough guide, $|r| \ge 0.8$ is usually called strong, $0.5 \le |r| < 0.8$ moderate, and $|r| < 0.5$ weak.
State whether the following statements about scatter plots are true or false: a) If all the points in the scatter plot lie exactly on an increasing straight line, the…
State whether the following statements about scatter plots are true or false:
- a) If all the points in the scatter plot lie exactly on an increasing straight line, the correlation is perfect and positive ($r = 1$).
- b) A scatter plot with a circular shape indicates a very strong correlation.
- c) In a scatter plot, the independent variable is always represented on the y-axis ($Y$).
- d) The scatter plot allows us to quickly visualize whether there is any relationship between two numerical variables.
Match each of the following Pearson linear correlation coefficients with its corresponding scatter plot: $r_1 = 0,98$ ; $r_2 = -0,75$ ; $r_3 = 0,05$ ; $r_4 = -0,99$
Match each of the following Pearson linear correlation coefficients with its corresponding scatter plot:
$r_1 = 0,98$ ; $r_2 = -0,75$ ; $r_3 = 0,05$ ; $r_4 = -0,99$
Given the following four scatter plots associated with different social phenomena, reasonably assign to each one of these correlation coefficients: $r_1 = 0,95$,…
Given the following four scatter plots associated with different social phenomena, reasonably assign to each one of these correlation coefficients: $r_1 = 0,95$, $r_2 = -0,80$, $r_3 = 0,05$ and $r_4 = -0,10$.
Argue your choice based on the dispersion with respect to a possible line and the direction of the inclination of the points.
Exact relationships, statistical relationships, and causation
Some variables are linked by an exact rule. If the shipping rate is a fixed $\$3$ per pound, the cost is always $3w$, and every point lands exactly on a line. This is a functional (exact) relationship, and $r = 1$. Most real-world variables are only linked statistically: for the same $x$, different individuals have different $y$-values, because other factors also matter. The points form a cloud around the trend instead of landing on a curve.
A courier company analyzes the weight of the parcels ($X$, in pounds) and the shipping cost ($Y$, in dollars). They observe that the scatter plot is practically a…
A courier company analyzes the weight of the parcels ($X$, in pounds) and the shipping cost ($Y$, in dollars). They observe that the scatter plot is practically a perfect straight line with a positive slope.
- a) What would be the approximate value of the correlation coefficient $r$ in this case?
- b) If the shipping cost is calculated using a fixed rate per pound, would we be looking at a statistical or functional relationship?
- c) Draw what the scatter plot would look like if, in addition to the weight, the cost depended on random factors such as the availability of delivery drivers at that time.
A study has been carried out on the relationship between the number of books read per year ($X$) and the score in a reading comprehension test ($Y$) in a group of…
A study has been carried out on the relationship between the number of books read per year ($X$) and the score in a reading comprehension test ($Y$) in a group of students. The resulting scatter plot is shown below:
- a) State whether there is a functional dependence or a statistical dependence. Explain the difference between both concepts using this example.
- b) Classify the correlation according to its sign and its strength (strong, moderate or weak).
- c) Could we state that "reading more books necessarily causes getting a better grade"? Reason the difference between correlation and causality.
Outliers and the mean point
The mean point (the "center of gravity") is the point $(\bar{x}, \bar{y})$, whose coordinates are the means of the $x$-values and of the $y$-values. It sits in the middle of the cloud. A good line of best fit passes through it, and an outlier drags it away from the main cluster.
In context, the mean point tells you the "typical" values of both variables at once. Suppose a residents' association records temperature and monthly heating cost over a year and finds the mean point $G(12, 110)$. That means the average monthly temperature over the year was $12$ (in the units of the problem, here $^\circ\text{C}$, about $54\,^\circ\text{F}$) and the average monthly heating cost was $\$110$.
An outlier typically weakens a strong linear pattern, so $|r|$ gets smaller, and it also pulls the line toward itself. Removing an outlier that goes against the trend usually makes $|r|$ larger.
An influencer* analyzes the relationship between the number of hours they spend editing a video ($X$) and the number of "likes" they receive in the first 24 hours ($Y$,…
An influencer analyzes the relationship between the number of hours they spend editing a video ($X$) and the number of "likes" they receive in the first 24 hours ($Y$, in thousands). After publishing 10 videos, they obtain a very narrow and ascending scatter plot, except for one video which, after only 1 hour of editing, got a massive number of "likes" due to a viral challenge.
- a) What is the technical name for that point which deviates from the general trend of the scatter plot?
- b) If the influencer decides to remove that special data point from their study, what would happen to the absolute value of the correlation coefficient $r$? Would it increase or decrease? Justify your answer.
- c) Would the relationship between the variables become more or less linear after removing this point?
Observe the following scatter plot representing the relationship between the average monthly temperature ($X$, in $^\circ C$) and the heating expenditure ($Y$, in…
Observe the following scatter plot representing the relationship between the average monthly temperature ($X$, in $^\circ C$) and the heating expenditure ($Y$, in dollars) of a residents' association over a year.
- a) Explain with reasoning the sign of the correlation and what it means in this real context.
- b) If the center of gravity of the distribution is the point $G(12, 110)$, what do these values represent in relation to the data collected during the year?
- c) Would it be reliable to use a regression line to predict the expenditure if the temperature is $2^\circ C$? And if it is $45^\circ C$? Reason your answer based on the shape of the scatter plot.
A group of researchers analyzes the relationship between the weekly time spent on strategy video games (variable $X$, in hours) and the score obtained in a logical…
A group of researchers analyzes the relationship between the weekly time spent on strategy video games (variable $X$, in hours) and the score obtained in a logical reasoning test (variable $Y$, from 0 to 100). The data from 10 teenagers show a very strong positive linear correlation, with the exception of one individual who spends 25 hours a week and scores only 10 points on the test.
Based on the graphical representation:
-
Explain reasonably how the point $P$ affects the value of Pearson's correlation coefficient $r$ and the slope of the future regression line.
-
If we removed the point $P$, could we state that there is a causal relationship between playing video games and logical reasoning? Justify your answer by analyzing the nature of the variables.
Drawing a line of best fit by eye
When the pattern looks linear, you can draw a straight line through the middle of the cloud and use it to make predictions. A calculator finds the exact least-squares line later in this chapter. Here you do it by eye.
The following table shows the distance traveled ($X$, in miles) and the time taken ($Y$, in min) by a cyclist on their training rides: | Distance ($X$) | 10 | 15 | 20 |…
The following table shows the distance traveled ($X$, in miles) and the time taken ($Y$, in min) by a cyclist on their training rides:
| Distance ($X$) | 10 | 15 | 20 | 25 | 30 | 35 |
|---|---|---|---|---|---|---|
| Time ($Y$) | 22 | 35 | 42 | 58 | 70 | 82 |
- a) Draw the scatter plot.
- b) Draw freehand the line of best fit for the points (regression line).
- c) Using the line you have drawn, estimate how long it would take the cyclist to travel 45 miles. Do you think this estimation is reliable?
When the pattern is curved
The correlation coefficient $r$ (and covariance, which you will meet soon) measures only linear association. If the points follow a curve, $r$ can be near zero even though the relationship is strong.
Curved patterns come in several types. A relationship may level off: plant height rises quickly with fertilizer, then stops growing or declines from toxicity. It may form an arch: performance is best at a moderate level of arousal and worse when too low or too high (the Yerkes-Dodson idea from sports psychology). It may form a U-shape: a home's energy use is high in cold months (heating) and in hot months (air conditioning), and lower in between. Later in this course you will fit these shapes with quadratic and exponential models.
A biologist measures the height of an exotic plant species ($Y$, in inches) as a function of the amount of nitrogen fertilizer applied ($X$, in mg). They observe that,…
A biologist measures the height of an exotic plant species ($Y$, in inches) as a function of the amount of nitrogen fertilizer applied ($X$, in mg). They observe that, initially, the height increases rapidly with the fertilizer, but after a certain amount, the plant becomes saturated and the height stabilizes or even decreases slightly due to toxicity.
-
Analyze the scatter plot and determine whether a linear regression model would be suitable to describe this relationship over the entire domain of $X$.
-
If the biologist calculates Pearson's correlation coefficient for all the data and obtains a value close to $0$, does this mean that the variables are independent? Justify the answer based on the shape of the scatter plot.
The following scatter plot has been obtained, relating the monthly electrical energy consumption of a household ($X$, in kWh) to the average outside temperature that…
The following scatter plot has been obtained, relating the monthly electrical energy consumption of a household ($X$, in kWh) to the average outside temperature that month ($Y$, in $^\circ C$).
-
Describe the relationship between the variables. Is it a linear relationship throughout its range?
-
Justify why the coefficient of determination $R^2$ for a linear fit would be very low even though there is an obvious relationship between the variables.
-
Propose a way to divide the study of this scatter plot in order to apply linear regression techniques effectively.
A sports psychologist is studying the relationship between the pre-game activation level (anxiety, variable $X$) and the free-throw performance of basketball players…
A sports psychologist is studying the relationship between the pre-game activation level (anxiety, variable $X$) and the free-throw performance of basketball players (success percentage, variable $Y$). The literature suggests that there is an "optimal level" of activation: if it is too low, the player is apathetic; if it is too high, they are blocked.
-
Draw a hypothetical scatter plot reflecting this situation (known as the Yerkes-Dodson law).
-
If a data analyst calculated the covariance $s_{xy}$ of this scatter plot and obtained a value close to zero, would it be correct to conclude that the anxiety level does not influence performance? Justify your answer by analyzing the geometry of the scatter plot you have drawn.
Mixed groups and changing units
Pooling different groups
If your data come from two distinct groups, combining them in one plot can hide or even invent a trend.
Within each group the association is strong and positive, but the groups sit at different positions, so the combined cloud looks shapeless and one $r$ for everything is misleading. A single line fitted to all the points would run between the two clusters and describe neither of them well.
Changing units
Since the relationship is unchanged, predictions are just as reliable after rescaling. Only the numbers on the axes and the slope of the line change, not how well the line fits.
In a study on urban demographics, the population density (inhabitants/$km^2$) is represented on the $X$-axis and the average rent price ($\$/m^2$) on the $Y…
In a study on urban demographics, the population density (inhabitants/$km^2$) is represented on the $X$-axis and the average rent price ($\$/m^2$) on the $Y$-axis. The scatter plot obtained shows a very peculiar structure: two clearly differentiated groups of points ("clusters"). Group 1 corresponds to suburban neighborhoods and group 2 to historic center neighborhoods.
-
If within each separate group the correlation is positive and strong, but when considering all the points together the scatter plot seems to have no clear trend, what problems would we encounter when trying to calculate a single Pearson correlation coefficient for the whole city?
-
Explain how the existence of hidden qualitative variables (such as the type of neighborhood) can "deceive" the interpretation of a two-dimensional scatter plot.
Consider a scatter plot with a very strong positive linear correlation ($r = 0,98$). Suppose we transform all the values of variable $X$ using the operation…
Consider a scatter plot with a very strong positive linear correlation ($r = 0,98$). Suppose we transform all the values of variable $X$ using the operation $X' = X + 50$ and all the values of variable $Y$ using $Y' = 3 \cdot Y$.
-
Describe what changes the scatter plot would undergo in the plane (translation, deformation, change of scale).
-
Reason, without performing calculations, whether the new correlation coefficient $r'$ will be greater than, less than, or equal to the original $r$.
-
Would the reliability of the predictions change if we used the new transformed scatter plot? Explain why.
Back to the start: Jayden's and Emma's claims are about direction and strength. Plot practice hours against free-throw percentage, and phone time against quiz score, and look. A tight upward or downward band supports a claim. Even then, the plot alone cannot prove cause and effect.