From Campus Data to a Correlation
Suppose a campus learning center wants to describe how students’ weekly study time relates to their exam scores. A list of study hours by itself cannot answer that question, nor can a list of scores: the information lies in how the two measurements pair up for each student. A scatterplot makes those pairs visible, and Pearson’s correlation \(r\) summarizes the direction and strength of a linear pattern.
The analysis below uses five hypothetical students. The data are deliberately small enough to calculate by hand. With only five observations, the result describes this set of students; it is not a dependable basis for broad claims about all campus students.
| Student | Study hours per week, \(x\) | Exam score, \(y\) (points) |
|---|---|---|
| A | 2 | 62 |
| B | 3 | 68 |
| C | 4 | 72 |
| D | 5 | 81 |
| E | 6 | 82 |
Each row is one student, and the two entries in that row form a pair. The study-hours value and exam score must stay together throughout the analysis. If the scores were sorted separately from the hours, the pairings would be lost and the calculated correlation would answer a different question.
Worked Example: Plotting the Student Pairs
Plot the five pairs, with weekly study hours on the horizontal axis and exam score in points on the vertical axis. The table below is a plotting grid: each dot marks one observation at the column’s study-hour value and the row’s exam-score value.
| Exam score (points) \ Study hours | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|
| 82 | ● | ||||
| 81 | ● | ||||
| 72 | ● | ||||
| 68 | ● | ||||
| 62 | ● |
Reading the grid from left to right, the points rise: the student with 2 study hours has a score of 62, while the student with 6 hours has a score of 82. The five points follow a roughly straight, upward pattern, with no point far separated from the others. This visual check supports using a linear summary for these observations. It does not show that study time caused the score differences.
What Pearson’s Correlation Summarizes
Correlation has no units: changing study hours to minutes or exam scores to a different positive unit does not change \(r\). It is also symmetric: swapping the two variables does not change the correlation. Those properties make it a useful summary, but they do not make it a measure of cause, effect, or change in exam points per additional study hour.
Before reporting Pearson’s \(r\), check that the observations are correctly paired, both variables are quantitative, and the scatterplot is reasonably linear without a dominant outlier. These are conditions for the correlation to be an informative summary of the pattern. Here both variables are quantitative, every student contributes one complete pair, and the plotted points rise in a roughly straight pattern without an isolated point. The small sample still limits how confidently the pattern can represent students beyond these five.
Calculating \(r\) for the Campus Data
The sample means are the centers used to measure how far each observation lies from the average. For the five study-hour values, \(\bar{x}=(2+3+4+5+6)/5=4\) hours. For the exam scores, \(\bar{y}=(62+68+72+81+82)/5=73\) points.
Worked Example: Calculating the Correlation
For paired data, Pearson’s correlation can be calculated from the products of deviations from the two sample means:
The entries below show each deviation, their product, and the squared deviations. Study hours are in hours and scores are in points.
| Student | \(x_i-\bar{x}\) (hours) | \(y_i-\bar{y}\) (points) | Product | Squared \(x\) deviation | Squared \(y\) deviation |
|---|---|---|---|---|---|
| A | \(-2\) | \(-11\) | 22 | 4 | 121 |
| B | \(-1\) | \(-5\) | 5 | 1 | 25 |
| C | 0 | \(-1\) | 0 | 0 | 1 |
| D | 1 | 8 | 8 | 1 | 64 |
| E | 2 | 9 | 18 | 4 | 81 |
| Sum | 53 | 10 | 292 |
Substituting the three sums gives
The positive sign agrees with the upward pattern in the plot. The value, close to 1, indicates a strong positive linear association in these five paired observations. It is not a percentage, and it does not mean that each extra study hour raises a student’s exam score by 0.9808 points.
Why the Calculation Has This Form
The formula can be justified by expressing correlation as covariance divided by the product of the sample standard deviations. Let \(S_{xy}=\sum_{i=1}^{n}(x_i-\bar{x})(y_i-\bar{y})\), \(S_{xx}=\sum_{i=1}^{n}(x_i-\bar{x})^2\), and \(S_{yy}=\sum_{i=1}^{n}(y_i-\bar{y})^2\). The sample covariance is \(S_{xy}/(n-1)\), while the sample standard deviations are \(s_x=\sqrt{S_{xx}/(n-1)}\) and \(s_y=\sqrt{S_{yy}/(n-1)}\). Therefore:
The factors of \(n-1\) cancel, yielding the formula used above. The numerator records whether deviations from the two means tend to have the same sign or opposite signs; the denominator scales that sum so the result is a unit-free correlation.
Reporting the Result Without Overclaiming
Worked Example: Writing a Contextual Conclusion
Suppose the learning center asks for a one-sentence summary of this hypothetical analysis. The computed value is \(r\approx0.9808\), and the scatterplot shows a roughly straight upward pattern. A suitable conclusion is:
Among these five hypothetical students, weekly study hours and exam score have a strong positive linear association (\(r\approx0.981\)): students with more recorded study hours tended to have higher recorded exam scores.
This sentence names both variables, gives the direction and strength, and identifies the group actually observed. It does not say that studying more produced the higher scores. Students may differ in prior preparation, course attendance, sleep, or other factors related to both study time and exam performance. Because the data are observational, the correlation by itself cannot separate these explanations from a causal effect.
The sentence also avoids making a general claim about all students at the campus. Five hypothetical observations cannot establish how typical this pattern is in a broader student population. A larger, appropriately selected sample would be needed to support broader descriptions; even a broader sample would not by itself establish causation.
Common Mistakes and Why the Analysis Matters
A correlation analysis is useful because it turns a cloud of paired measurements into a concise, interpretable description. The plot and calculation answer complementary questions: the plot helps reveal shape and unusual points, while \(r\) summarizes the direction and strength of a linear pattern. Reporting both keeps a single number from hiding features that matter.
- Reading \(r\) as a slope. The value \(0.9808\) is unit-free. It does not say that a score increases by 0.9808 points per additional hour.
- Calling association a cause. The data show that study hours and exam scores varied together in this set. They do not show that additional study time caused the observed score differences.
- Ignoring the scatterplot. A correlation summarizes linear association. The plot is needed to check whether that summary reasonably describes the point pattern and whether a point may dominate it.
- Separating the paired values. Correlation depends on which score belongs with which study-hours value. Reordering one variable independently changes the pairs and may change \(r\).
- Overgeneralizing from a small set. A high sample correlation does not establish that the same association is present for all campus students. Describe the observed group unless the sampling design supports a wider conclusion.
Check Your Understanding
Use the campus data and the reasoning in this analysis to answer the following questions.
- Why must each student’s study hours remain paired with that student’s exam score when calculating \(r\)?
- What does the positive sign of \(r\approx0.9808\) tell you about the observed pattern? What does it not establish?
- Give one reason, visible from the analysis, to check a scatterplot before relying on correlation.
- Why is it incorrect to interpret \(r=0.9808\) as an increase of 0.9808 exam points per study hour?
- Write a conclusion that describes the association while avoiding a causal claim and an unsupported claim about all campus students.