Tutorials › Introduction to Statistics › Worked Correlation Analysis of Health Measurements

Scatterplots and Correlation · Tutorial 247 of 996

Worked Correlation Analysis of Health Measurements

Use a small hypothetical health dataset to calculate Pearson’s \(r\), check whether it summarizes the pattern well, and describe the result in context.

Beginner 10 min read

What You'll Learn

  • Calculate Pearson’s \(r\) from paired health measurements using deviations from their means.
  • Check a scatterplot for a roughly linear pattern, curvature, and unusual observations.
  • Interpret the direction and strength of a correlation without attaching measurement units.
  • Explain why a large correlation does not establish a causal relationship.
  • Evaluate how a potentially influential observation can affect the reported correlation.

From Health Measurements to a Correlation

Suppose a health team records two measurements for each person: waist circumference and systolic blood pressure. A useful first step is to plot the paired measurements, with each person represented by one point. The plot can show whether larger values of one measurement tend to occur with larger or smaller values of the other, and whether a straight-line summary is reasonable.

Pearson’s correlation coefficient, written \(r\), summarizes the direction and strength of a linear association between two quantitative variables. It has no measurement units. However, a numerical result alone is not a complete analysis: the scatterplot must also be checked for curvature and unusual observations that could make \(r\) misleading.

Definition: For \(n\) paired observations \((x_i,y_i)\), Pearson’s sample correlation is $$ r=\frac{\sum_{i=1}^{n}(x_i-\bar{x})(y_i-\bar{y})} {\sqrt{\sum_{i=1}^{n}(x_i-\bar{x})^2\sum_{i=1}^{n}(y_i-\bar{y})^2}}. $$ It is defined when both variables have nonzero sample variation. Its value is between \(-1\) and \(1\). A positive value describes an upward linear association, a negative value a downward linear association, and a value near zero little linear association.

The numerator measures whether deviations from the two means tend to have the same sign or opposite signs. The denominator scales that sum by the variation in each variable. This scaling makes \(r\) unit-free, so its magnitude does not depend on whether, for example, a measurement is recorded in centimeters or inches.

A Short Justification of the Formula

The formula can be understood by first measuring each observation’s distance from its variable’s mean in standard-deviation units. Define \(z_{x,i}=(x_i-\bar{x})/s_x\) and \(z_{y,i}=(y_i-\bar{y})/s_y\), where \(s_x\) and \(s_y\) are the sample standard deviations. The correlation is the average product of these paired standardized deviations, using divisor \(n-1\):

$$ \begin{aligned} r &=\frac{\sum_{i=1}^{n} z_{x,i}z_{y,i}}{n-1}\\ &=\frac{\sum_{i=1}^{n}(x_i-\bar{x})(y_i-\bar{y})} {(n-1)s_xs_y}\\ &=\frac{\sum_{i=1}^{n}(x_i-\bar{x})(y_i-\bar{y})} {\sqrt{\sum_{i=1}^{n}(x_i-\bar{x})^2\sum_{i=1}^{n}(y_i-\bar{y})^2}}. \end{aligned} $$

For the last equality, the sample standard deviations satisfy \(s_x=\sqrt{\sum (x_i-\bar{x})^2/(n-1)}\) and \(s_y=\sqrt{\sum (y_i-\bar{y})^2/(n-1)}\). Their product contains a factor \(n-1\), which cancels the divisor in the preceding line. Thus the formula expresses the average paired product of standardized deviations.

Worked Analysis: Waist Circumference and Blood Pressure

Worked Example: Correlation in Six Hypothetical Adults

The following values are invented for practice. Each row represents one hypothetical adult, and both measurements are recorded for that same person.

AdultWaist circumference (cm)Systolic blood pressure (mmHg)
A70110
B75116
C80118
D85126
E90129
F95133

Check the data and the plot. These are paired quantitative measurements, so calculating correlation is appropriate. A scatterplot of the six pairs rises from left to right, with points following an approximately straight pattern. There is no obvious bend or single point separated from the rest. With only six observations, the plot is limited evidence, but it does not reveal an apparent obstacle to using \(r\) as a linear summary.

Find the means. The sum of the waist measurements is \(495\) cm, so \(\bar{x}=495/6=82.5\) cm. The blood-pressure measurements sum to \(732\) mmHg, so \(\bar{y}=732/6=122\) mmHg.

Calculate deviations and products. For example, adult A has deviations \(70-82.5=-12.5\) cm and \(110-122=-12\) mmHg. The complete calculations are:

$$ \begin{aligned} \sum (x_i-\bar{x})(y_i-\bar{y}) &=150+45+10+10+52.5+137.5=405,\\ \sum (x_i-\bar{x})^2 &=156.25+56.25+6.25+6.25+56.25+156.25=437.5,\\ \sum (y_i-\bar{y})^2 &=144+36+16+16+49+121=382. \end{aligned} $$

Substitute into the formula.

$$ r=\frac{405}{\sqrt{437.5(382)}}= \frac{405}{\sqrt{167125}}\approx\frac{405}{408.81}\approx 0.991. $$

Interpret in context. For these six hypothetical adults, waist circumference and systolic blood pressure have a strong positive linear association: adults with larger waist measurements tend to have higher blood-pressure measurements. The value \(0.991\) has no units; it does not mean blood pressure rises by \(0.991\) mmHg for each centimeter of waist circumference. Nor does this observational pattern show that waist circumference causes blood pressure to increase.

Why the Scatterplot Still Matters

Pearson’s \(r\) describes linear association. A value near zero does not rule out a strong curved relationship, and even a large value can conceal curvature. An unusual observation can also substantially affect the result. These are reasons to examine the scatterplot, not merely calculate \(r\).

For a descriptive report of a small health dataset, useful checks include whether each point is a valid paired measurement, whether the overall pattern is approximately straight, and whether any point stands apart from the rest. The correlation formula can still be evaluated when a pattern is curved or a point is unusual, but in those cases \(r\) may not summarize the relationship adequately.

Worked Example: A Curved Pattern Despite a Large Correlation

Imagine a second hypothetical dataset relating weekly exercise time \(x\), in minutes, to resting heart rate \(y\), in beats per minute. The six pairs are \((0,88),(10,78),(20,71),(30,68),(40,67),(50,66)\). Both variables are quantitative and paired, so \(r\) can be calculated.

The means are \(\bar{x}=25\) minutes and \(\bar{y}=73\) beats per minute. The deviations from the means are \(x: -25,-15,-5,5,15,25\) and \(y: 15,5,-2,-5,-6,-7\). Therefore,

$$ \begin{aligned} \sum (x_i-\bar{x})(y_i-\bar{y}) &=-375-75+10-25-90-175=-730,\\ \sum (x_i-\bar{x})^2&=1750,\\ \sum (y_i-\bar{y})^2&=225+25+4+25+36+49=364,\\ r&=\frac{-730}{\sqrt{1750(364)}}\approx -0.915. \end{aligned} $$

The computed value indicates a strong negative linear association in these six invented pairs. But plotting them reveals that the heart rate drops quickly at first and then levels off. That bend means a straight-line summary is not an adequate description of the whole pattern, even though the correlation has a large magnitude. A careful account would report the observed downward, curved pattern rather than treating \(r\) as a complete summary.

Worked Example: Checking a Potentially Influential Observation

Consider five hypothetical pairs of exercise hours per week and resting pulse in beats per minute: \((1,82),(2,80),(3,78),(4,76),(5,50)\). The last value is unusual relative to the steady decrease across the first four pairs. It should be checked on a scatterplot and, if possible, against the original record.

Using all five pairs, \(\bar{x}=3\) hours and \(\bar{y}=73.2\) beats per minute. The sums needed for \(r\) are

$$ \begin{aligned} \sum (x_i-\bar{x})(y_i-\bar{y})&=-68,\\ \sum (x_i-\bar{x})^2&=10,\\ \sum (y_i-\bar{y})^2&=692.8,\\ r&=\frac{-68}{\sqrt{10(692.8)}}\approx -0.817. \end{aligned} $$

For comparison, the first four points alone lie exactly on a decreasing straight pattern and have \(r=-1\): their means are \(2.5\) hours and \(79\) beats per minute, the cross-product sum is \(-10\), and the two sums of squared deviations are \(5\) and \(20\), giving \(r=-10/\sqrt{5(20)}=-1\). This comparison shows that the fifth point changes the correlation. It does not justify removing that observation: first verify whether it is a recording error or otherwise has a defensible reason for exclusion. If it is valid, report the analysis with it and describe its influence.

A Practical Reporting Sequence

A transparent analysis connects the calculation to the displayed data and to the question being asked. Use a consistent sequence so that the reader can see what the number summarizes and what it leaves out.

1
Identify the paired measurements.
Name both quantitative variables and their units. Confirm that each \(x\) value belongs with the corresponding \(y\) value for the same individual or observational unit.
2
Inspect the scatterplot.
Describe direction and form. Look for substantial curvature, separated clusters, or unusual points before relying on a single linear summary.
3
Calculate \(r\).
Find each mean, sum the cross-products of deviations, find the two sums of squared deviations, and substitute into the correlation formula.
4
Report the result in context.
State the direction and strength of the linear association between the named measurements. Remember that \(r\) is unit-free and does not give a change in one variable per unit of the other.

Common Mistakes and Why This Analysis Matters

A correlation calculation is useful because it condenses the direction and strength of a linear pattern into one number, making it easier to describe paired health measurements. That convenience comes with limits: the number does not describe every feature of the scatterplot, establish cause and effect, or protect against errors in the data.

  • Wrong reasoning: “The correlation is close to \(1\), so the measurements are nearly interchangeable.” Correction: A high positive \(r\) indicates a strong positive linear association, not that the variables measure the same thing or have equal values.
  • Wrong reasoning: “The correlation is \(-0.915\), so each additional minute of exercise lowers heart rate by \(0.915\) beats per minute.” Correction: Correlation has no units and does not specify a per-minute change. The exercise example’s curved scatterplot also makes a single linear interpretation incomplete.
  • Wrong reasoning: “The last point weakens the correlation, so it should be deleted.” Correction: Verify the observation and apply a defensible, stated rule for exclusions. A valid unusual value belongs in the analysis, with its influence described.
  • Wrong reasoning: “A strong health correlation proves that one measurement causes the other.” Correction: Correlation describes association, not causation. Other explanations may be involved, and these examples alone do not establish cause and effect.
Key takeaway: Calculate Pearson’s \(r\) only as one part of a correlation analysis. Pair the numerical result with a scatterplot check for linear form and unusual points, then describe the association in context without assigning units to \(r\) or claiming causation.

Check Your Understanding

Use the examples and definitions above to answer these questions.

  1. In the waist and blood-pressure example, what do the positive sign and the magnitude of \(r\) indicate?
  2. Why is \(r=-0.915\) not a complete description of the exercise-time and heart-rate pattern?
  3. In the five-pair pulse example, what should be checked before deciding whether to exclude the last observation?
  4. Does Pearson’s \(r\) have units? Explain what a correlation of \(0.7\) does and does not say about two health measurements.
  5. Why does a strong correlation between two health measurements not by itself establish that one causes changes in the other?