Bivariate Data
Bivariate data consists of paired observations of two variables measured on the same individuals, used to investigate whether and how the two variables are related. Key result in words: the strength and direction of a linear relationship between two numerical variables is captured by the correlation coefficient , and the relationship can be modelled by a least-squares regression line. Applies wherever you want to study association — height vs. weight, study time vs. exam score, temperature vs. ice-cream sales. Developed mainly by Francis Galton and Karl Pearson in the late 19th century.
A single pair of numbers tells you nothing about a relationship; a cloud of pairs does. By plotting all pairs as points (a scatterplot) you can see a relationship, and by computing how the two variables co-vary about their means you can measure it. The central quantity is covariance — the average of the products of paired deviations from the means — which, once you divide out the two standard deviations, becomes the dimensionless, scale-free correlation coefficient between and .
Formal Statement
A bivariate data set of size is a list of ordered pairs
Derivation hint: this is a definition — each individual contributes one -value and one -value measured simultaneously. We summarise each variable by its mean and standard deviation:
Derivation hint: ordinary arithmetic averages applied separately to the -list and the -list. The sample covariance measures how the two vary together:
Derivation hint: average the product of each point's -deviation and -deviation; positive products (both above or both below their means) push covariance up. The (Pearson) correlation coefficient is the standardised covariance:
Derivation hint: divide covariance by the product of the two standard deviations; the factors cancel between numerator and denominator, giving a unitless number. Here are the standard deviations of and , and the symbols are: = number of pairs, = the values of the two variables for individual , = means, = covariance, = correlation coefficient.
For any bivariate data set:
Derivation hint: follows from the Cauchy–Schwarz inequality applied to the deviation vectors and . Furthermore (resp. ) exactly when the points lie on a straight line of positive (resp. negative) slope, and is unchanged by any linear rescaling with .
The line minimising the sum of squared vertical residuals has
Derivation hint: set the partial derivatives of with respect to and to zero and solve the resulting two "normal equations." The proportion of variation in explained by the line is the coefficient of determination .
Why It Holds / Derivation
We minimise the total squared error as a function of intercept and slope : 1. Define . 2. Differentiate with respect to and set to zero:
Derivation hint: chain rule on each squared term; the constant factors out. 3. Dividing by and rearranging gives , i.e. , so . The line passes through . 4. Differentiate with respect to and set to zero:
Derivation hint: same chain rule, but the inner derivative with respect to brings down a factor . 5. Substitute into step 4. After expanding and cancelling, the cross terms collapse to the covariance and variance:
Derivation hint: use , valid because . 6. Since , we get , completing equation [6].
∎Pearson, a polymath at University College London, transformed the loose Victorian study of "biometry" into rigorous mathematical statistics. Building on Francis Galton's idea of regression toward mediocrity, in 1896 he gave the product-moment correlation coefficient its modern algebraic form — equation [4] still bears the name Pearson's . He founded the world's first university statistics department and the journal Biometrika. His work, though scientifically foundational, was entangled with the eugenics movement of his era, a connection modern readers should view critically.
Building Intuition
Picture each data point's contribution to the covariance sum [3]. Split the scatterplot into four quadrants by drawing vertical and horizontal lines through the point of means . A point in the upper-right quadrant has both deviations positive, so its product is positive; a point in the lower-left has two negatives, also a positive product. Points in those two "agreeing" quadrants vote for a positive relationship. Points in the upper-left and lower-right quadrants have one positive and one negative deviation, contributing negative products and voting for a negative relationship. The covariance is the net tally of these votes. Dividing by just converts the tally to a fixed scale from to , so a tall thin person and a short fat person produce the same as the same shapes measured in inches versus centimetres.
Worked Examples
Given five students' weekly study hours and test score :
| 2 | 3 | 5 | 7 | 8 | |
|---|---|---|---|---|---|
| 50 | 60 | 70 | 80 | 90 |
Step 1 — means. , .
Step 2 — deviations and products.
| product | ||||
|---|---|---|---|---|
Sums: , , .
Step 3 — correlation (equation [4]).
Step 4 — regression slope and intercept (equation [6]).
Given the line from the previous example, predict the score of a student who studies 6 hours, and report how much of the variation in scores the model explains.
Step 1 — substitute .
Step 2 — coefficient of determination. .
Interpretation. About 98.4 % of the variation in test scores is accounted for by study hours under this linear model; the predicted score for 6 hours is roughly 76 points. Note lies inside the data range , so this is legitimate interpolation, not risky extrapolation.
Common Misconceptions
A strong tells you two variables move together; it does not tell you that one causes the other. The relationship may be reversed, coincidental, or driven by a hidden confounding variable. Classic example: across towns, the number of churches correlates strongly with the number of bars — but neither causes the other; both are driven by population size. Only a controlled experiment or careful causal reasoning can establish causation.
The regression line is only validated within the range of observed -values. Plugging in an far outside that range (extrapolation) can give absurd answers — e.g. extending a child's height-vs-age line to age 40 predicts a 5-metre adult. Always check that your prediction's lies inside the data spread.
Take the symmetric data , which lies exactly on the parabola . Here and the products are , which sum to . Therefore . The variables are perfectly (deterministically) related, yet Pearson's reports "no linear relationship" — proving measures only the linear component of association. Always look at the scatterplot, never trust alone.
Connections
Bivariate analysis is the bridge between Univariate Data (single-variable summaries like mean and standard deviation, which feed directly into equations [2]–[4]) and Multivariate Statistics (three or more variables, partial correlation, multiple regression). The correlation coefficient is the sample estimate of the theoretical correlation studied in Probability Theory via the bivariate normal distribution. The least-squares method is one instance of Optimization / Calculus (setting derivatives to zero), and the algebra of deviation vectors links to Inner Product Spaces, where is literally the cosine of the angle between the centred data vectors.
Real-World Applications
Historical Development
Subtleties & Limits
Pearson's captures only linear association and is sensitive to outliers and to the assumption of an underlying bivariate-normal distribution. Several deeper questions remain practically important: (i) How best to quantify general dependence — modern measures such as distance correlation (Székely, 2007) and maximal information coefficient (MIC, 2011) aim to detect any relationship, but no single measure is universally agreed upon. (ii) The problem of distinguishing genuine causation from correlation in observational data is a live research frontier (Pearl's causal calculus, instrumental variables, randomised trials). (iii) When data are heavy-tailed or contaminated, robust regression methods (least absolute deviations, Theil–Sen estimator) are preferred, and choosing among them remains context-dependent. At the introductory level the cautionary lesson is simpler: always plot the data, beware outliers, and never confuse a tidy with a true model of reality.
See Also
Univariate Data · Linear Regression · Correlation Coefficient · Least Squares Method · Scatterplot · Coefficient of Determination · Spearman Rank Correlation · Confounding Variables · Bivariate Normal Distribution