Covariance Created 2026-09-24 Updated 2026-10-14
The covariance measures the average product of two centered deviations. For real square-integrable random variables and ,Deviations with the same sign contribute positively; deviations with opposite signs contribute negatively. Their magnitudes and probabilities determine the net result. Taking recovers the variance. The definitions and algebraic properties are presented in Orloff and Bloom, MIT 18.05, Covariance and Correlation, sections 2–2.1.
For a worked example, let be independent random variables, each equally likely to be , or , and put . All nine pairs have probability . The expected values are zero, while linearity of covariance and the vanishing covariance of independent random variables giveThe shared term makes large accompany large on average. Replacing by reverses the covariance to without changing either variance.
Positive, negative, independent, and nonlinear relationships have different covariance behavior
. In the first three panels, and independently take , and with equal probabilities; each point has probability . In the last panel, , and the three marked outcomes each have probability . The thin curve shows that quadratic function. Its zero covariance leaves strong nonlinear statistical dependence visible. Details.The covariance is useful whenever deviations are added or subtracted. Expanding the square givesFor the worked model, these are and . Positive covariance increases variation in the sum while reducing variation in the difference: the same shared fluctuation reinforces one combination and partly cancels in the other. The identity applies beyond independent random variables.
The size of a covariance depends on the measurement scale. For constants , linearity of covariance gives . Adding offsets has no effect; rescaling either measurement rescales the covariance. The Pearson correlation coefficient divides by both standard deviations to describe the standardized linear relationship.
Galton's stature regression 2026-10-14
Francis Galton's paper Regression towards mediocrity in hereditary stature by Francis Galton analyzes adult offspring heights against the average of their parents' adjusted heights. He multiplied female heights by before making that parental average. Table I contains 928 adult offspring from 205 parental pairs; the opening prose instead states 930. Its grouped readout is a median, and the explanation of Plate IX describes a smoothed offspring deviation about two-thirds of the parental deviation.[ref]
Regression towards mediocrity in hereditary stature by Francis Galton. Printed pp. 247-248, Table I; pp. 261-262, explanation of Plate IX(a): adjusted heights, counts, grouped medians and 2:3 deviation ratio
These were parent-offspring records, not repeat readings of an unchanged signal. The paper's group tendency does not say that every child must be closer to the population mean. Galton also reports uncertainty over whether some recorded heights included shoes, a concrete measurement error limitation.[ref]
Regression towards mediocrity in hereditary stature by Francis Galton. Printed p. 252: shoes-on versus shoes-off uncertainty and the average two-thirds height-deviation claim
The Pearson correlation coefficient and all generated values above are our chosen model, not a reconstruction of his data. Gaussian regression toward the mean 2026-10-14
Take the original synthetic model and , mutually independent random variables, with the second argument denoting variance. The pair has a multivariate normal distribution with mean zero, unit marginal variances, and Pearson correlation coefficient . Its conditional multivariate normal distribution isFor a first reading , the second reading has conditional expectation and conditional variance , hence standard deviation . There is still conditional probability of , a movement farther from zero, where is the standard normal distribution function. The line describes a conditional mean, not an individual trajectory.
A short derivation isolates . Its covariance with is zero and its variance is . Because has a multivariate normal distribution, zero covariance implies independence: independently of . This also explains why reversing the two measurements gives . The statistical association does not identify a direction of causal effect.
The fitted age slope is very small and negative, about efficacy points per year, with no conventional evidence against a zero linear slope: , . The model explains only about 0.0367% of the observed efficacy variation. These results concern a linear association, not proof of no possible age relationship or a causal effect of ageing.
The descriptive statistics report 2466 observed ages and efficacy scores, with no missing values for either variable. Age ranges from 14 to 97 years, with sample mean 52.689 years and sample standard deviation 19.064 years. Efficacy ranges from 0 to 16, with sample mean 9.348 and sample standard deviation 3.176 scale points. The standard deviations use different units and should not be compared as though their numerical ratio measured relative substantive variability. The efficacy mean retains the conflict with Question 1's group summaries; that conflict is not resolved by this separate regression output.
A simple linear regression models , where is efficacy and is age in years. Ordinary least squares chooses the coefficients to minimize the residual sum of squares. From the printed coefficients the fitted line isHolding to this model, ten additional years correspond to fitted scale points. For example, the fitted mean is about 9.453 at age 20 and 9.261 at age 80, a difference of about points. These are fitted means, not exact predictions of individual scores. The line does not imply that every person's efficacy falls at that rate, nor that cross-sectional age differences identify within-person changes over time.
The intercept is the predicted mean at age zero, about 9.517. Since zero is outside the observed 14–97 age range, its direct interpretation requires extrapolation. The printed standard error of 0.188043 and yield the extremely small displayed p-value for a zero intercept. That test does not test whether age is a useful predictor. Recentring age at its observed sample mean would put the intercept near , the fitted mean at a substantively relevant reference age. This agrees with the rounded overall efficacy mean.
The age standard error is 0.003356 points per year. The coefficient divided by this standard error gives , agreeing with the printed t value. Estimating an intercept and one regression slope from 2466 observations leaves residual statistical degrees of freedom. Under a correctly specified normal linear model, the Student t-distribution provides the stated two-sided p-value. At 5%, or 1%, it does not reject . The p-value is not a 34.2% probability that age has no effect, and nonrejection does not establish a practically negligible effect size.[ref]
Summarizing Linear Model Fits in the R documentation. Value: coefficient estimate, standard error, two-sided t and p columns; residual degrees of freedom
A 95% confidence interval calculated from the printed estimate and standard error is approximatelyor about points per decade. It includes zero and gives the scale of slopes compatible with these summaries and assumptions. Assessing a practically negligible effect would require an explicit substantive tolerance and an appropriate equivalence test, not simply the fact that . A nonlinear association could also coexist with a near-zero overall linear slope.
The coefficient of determination is , meaning that the fitted line explains about of the sample's centred efficacy sum of squares compared with an intercept-only fit. This is not 36.7%, a fraction of people whose efficacy is predicted correctly, or the proportion of efficacy caused by age. The adjusted coefficient of determination, approximately , is slightly negative because its penalty for estimating the extra coefficient exceeds the tiny improvement in fit. It need not be constrained to be nonnegative and does not mean a negative amount of explained variation.
The overall on 1 and 2464 statistical degrees of freedom, with , tests the same zero-slope hypothesis as the age t test because there is only one predictor. The simple-regression output identities give and ; the printed numbers agree allowing their displayed precision. The signed Pearson correlation coefficient is consequently about . These are related summaries of the same weak linear association, not independent corroborating tests.
The residual standard error of 3.177 points estimates the typical unexplained error scale under the fitted model. It is close to the efficacy sample standard deviation, as expected when the line explains almost none of the variation. It is not a standard error of the slope or a guarantee that each individual's prediction error lies within 3.177 points. The residual summary spans roughly to , with sample median about 0.573 and central quartiles about and . An ordinary least-squares fit with an intercept has zero mean residual, not necessarily zero median residual. These few quantiles cannot establish normality, constant conditional spread, absence of outliers or linearity. The apparent last-decimal discrepancies among rounded error scales and other summary fields do not force an additional contradiction: their rounding intervals admit compatible regression summaries.
The conventional uncertainty calculations assume independent, mean-zero errors conditional on age, an appropriate linear mean, and homoscedasticity; normal errors give the usual exact finite-sample t and F calibration. Large samples can relax some distributional requirements but do not remove confounding, selection bias or dependence. A residual-versus-fitted plot could reveal curvature or changing spread, and a normal probability plot could assess error shape; neither plot can be reconstructed from the printed residual quantiles. A prediction interval for an individual includes residual variation and is wider than a confidence interval for the mean response. The supplied output supports a very weak, imprecisely signed linear association with little predictive gain from age alone, while leaving nonlinear, causal and design-based questions unresolved.
The fitted simple linear regression for the numerical vaccination intention scale isHere age is measured in years. The fitted mean increases by about 0.01649 score points per year, or 0.16489 points per decade. The regression coefficient is an association across respondents, not an estimate of how an individual would change on ageing or of a causal effect of age.
The standard error of the age regression coefficient is . Dividing gives , with 2,133 residual statistical degrees of freedom, corresponding to fitted residual degrees. The reported two-sided p-value is , so the zero-slope null hypothesis is rejected at a prespecified 5% level, but not at 1%. An approximate 95% confidence interval isIts positive endpoints are consistent with the test decision; they do not make the slope large.
The coefficient of determination is , so the fitted age trend accounts for only 0.2744% of the observed score variation, compared with an intercept-only prediction. Its adjusted value is . In an intercept-containing simple linear regression, the positive slope implies a positive Pearson correlation coefficient . The reported overall statistic, on one and 2,133 degrees of freedom, agrees with the squared slope test statistic up to printed rounding.
The residual standard deviation estimate is score points, much larger than the fitted decade contrast. At age 50 the fitted value is about , and at 60 it is about . Across the observed ages 19 to 91, the fitted mean changes by only points. Statistical detection with 2,135 observations therefore coexists with weak individual prediction.
The intercept predicts at age zero, outside the observed age range; it should not be given a substantive infant interpretation. Centring age at its observed sample mean, , giveswhich agrees with the reported score sample mean of after rounding. The bounded scale and upper quartile at its maximum motivate attention to a possible ceiling effect; they do not establish homoskedasticity, a normal error distribution or a satisfactory linear conditional mean. Five residual quantiles cannot replace a residual plot or checks of the sampling assumptions.
There is also a source consistency problem. The output reports that all 2,135 records have age and score present, that the attained minimum score is one, and that ages lie between 19 and 91. The positive fitted slope therefore places every fitted value between and . By residual extrema when response extrema are attained, the minimum regression residual must satisfyAt the observation with score one, its residual is already at most . The printed minimum residual, , lies outside this necessary interval. Those summaries cannot all describe the same complete sample and fitted model. The discrepancy is too large to be explained by the displayed rounding. It is present in the original PDF; the individual records would be needed to establish which printed item is wrong.
The ordinary least squares fit estimates the conditional mean of the continuous safety response as a linear function of the income coding:The regression coefficient for income is positive. Since larger response values mean greater safety, one additional coded income unit corresponds to an estimated increase of safety-scale units in the fitted mean. Following the question's stated units, a unit is a £10,000 income step. The observed coding also uses income bands with open end categories, so this is a linear trend per coded band step; it is not evidence of a known constant effect for every extra pound, especially within the open top band. The output's abbreviated variable label does not override the stated units.
The intercept is the fitted mean at income code zero. It is estimated as , but zero is outside the observed income codes, so that value is an extrapolated model baseline, not an observed estimate for a particular income category. Its small p-value tests a zero intercept; it is not the main test of the income association.
For the income coefficient, the standard error is . The reported test statistic and two-sided test giveproviding strong evidence against the null hypothesis of zero linear slope under the stated model assumptions. A Student t confidence interval, using residual statistical degrees of freedom, isThis is an interval for the population linear coefficient under the model, not an interval containing of individual safety scores. The large-sample estimate is precise enough to detect a positive association, but that does not establish substantial individual predictive power.
The coefficient of determination is : the fitted line accounts for about of the in-sample variation about the response sample mean. The adjusted coefficient of determination is about . Thus income alone explains very little of the observed variation, despite the small slope p-value. The residual standard error of response units describes substantial scatter about the fitted line. This is an estimated residual standard deviation, rather than the standard error of the slope or a complete individual prediction interval.
The overall F-test has on statistical degrees of freedom and . With one predictor and an intercept, it tests the same zero-slope hypothesis as the coefficient Student's t-test; , up to rounding. It is not an additional independent confirmation. In this simple linear regression, the Pearson correlation coefficient has the slope's sign and magnitude , another description of the weak linear association.
The regression uses complete observations and estimates two coefficients, giving residual statistical degrees of freedom. The deletion of observations is complete-case analysis; extending its conclusions to the full target population requires suitable assumptions about the missing-data mechanism. Classical reported standard errors also rely on an adequate linear conditional mean, independent errors and homoscedasticity; a normal linear model gives the finite-sample Student t-distribution and F-test calibration, while large-sample approximations can justify similar tests under weaker distributional assumptions. The printed summary alone does not establish these assumptions. Regression diagnostics and, where appropriate, heteroskedasticity-consistent standard errors address different parts of that assessment.
Finally, this unadjusted observational study estimates an association. Other covariates, such as age or experience status, may be related to both income and reported safety. Without additional design or causal identification assumptions, the positive fitted slope does not establish that increasing income would cause an increase in safety.
Use a bivariate correlation to describe the direction and strength of association between two measured variables, such as study time and test score. The Pearson correlation coefficient describes linear association between two quantitative variables: its sign gives direction, and its magnitude reflects linear association on a standardized scale. A confidence interval describes estimation uncertainty; a corresponding hypothesis test can assess a specified null association under its sampling assumptions.
Inspect a scatter plot for curvature, clusters, influential observations and restriction of range. A coefficient near zero does not exclude a strong nonlinear relationship. For ordered or markedly nonnormal measurements, a Spearman rank correlation can describe monotone association, using ranks; it does not require a linear relation in the original units. Ordinary inferential procedures require independent observational units and appropriate assumptions for their chosen method. Correlation alone does not identify a causal direction or exclude confounding.
Past exam of the quantum information course of the University of Cambridge 2015 Paper 1 2 a Solution 2026-10-20
The spin singlet state has zero local means and outcomes , so both variances are one. Its Pearson correlation coefficient is therefore . Summing over the four joint outcomes givesThe equal-sign products contribute and the opposite-sign products contribute . In a finite sample the corresponding relative frequencies estimate these probabilities; the formula is not an assertion that a finite random sample has exactly zero empirical means.
Pearson correlation coefficient 2026-10-14
The Pearson correlation coefficient is the covariance divided by the product of the standard deviations. For real random variables with finite, strictly positive variances,It is the expected value of the product of the two centered variables after dividing each by its standard deviation. The Cauchy-Schwarz inequality gives . This removes measurement units, while retaining the direction and strength of the linear relationship. Constant random variables have zero standard deviation, so their Pearson correlation coefficient is undefined.
For the covariance model , with independently uniform on , the calculation givesThe positive correlation is less than one because the independent term introduces extra variation. For the correlation is . Both examples appear in the covariance diagram.
For nonzero real , the correlation of and is . Positive rescaling and added offsets therefore leave the correlation unchanged; reversing one scale reverses its sign. Equality means that one random variable is an affine function of the other almost surely, with a nonzero slope of the corresponding sign. This is the equality condition in the Cauchy-Schwarz inequality, and includes perfect positive correlation.
Zero correlation says that the centered variables are orthogonal in their square-integrable inner product. It permits nonlinear statistical dependence, as the example in uncorrelated random variables demonstrates. More generally, a correlation is a statement about a joint probability distribution; identifying effects of interventions is the separate task of causal inference. This distinction keeps an observed association from being mistaken for a demonstrated mechanism.
An early source for standardized association is Francis Galton's 1888 paper “Co-relations and their Measurement, chiefly from Anthropometric Data”. He compared stature and forearm measurements and changed each measurement to units of its own variability so the two regression directions could be compared. His scale used probable error, so it should not be identified word for word with the modern standard deviation formula above. [ref]
https://galton.org/essays/1880-1889/galton-1888-co-relations-royal-soc/galton_corr.html. Galton's original paper, Proceedings of the Royal Society 45, 135–145
. Repeated-measurement latent signal model 2026-10-14
Imagine an instrument measuring the same fixed quantity twice on each unit. Across units the persistent signal is a latent variable; the two measurement errors are fresh, mutually independent random variables, also independent of . Assume they have mean zero and common finite variance , while has mean and variance . ThenThus the Pearson correlation coefficient is when . Both measurements retain the same marginal mean and variance. Repetition does not make the entire population collapse toward ; it changes what we expect after selecting on .
For , further assuming normal distributions for and both measurement errors gives the conditional expectationSince , this predicted reading is closer to than is. Independence and zero mean errors alone do not justify this linear conditional expectation: without the normal distribution assumption the same expression is the linear least-squares projection, and the actual conditional expectation can be nonlinear. Correlated errors, a changing signal, or different error variances require their own model; a noisy reading by itself supplies no universal shrinkage factor.
Sample correlation coefficient Created 2026-10-06 Updated 2026-10-14
For paired observations , the sample correlation coefficient isIt is the normalized inner product of the centered data vectors, or the sample covariance divided by the product of the corresponding sample standard deviations. The choice of divisor or cancels when used consistently in all three quantities. It is undefined if either centered data vector is zero, which occurs when that variable is constant in the observed statistical sample.
For and , both sample means are . The sum of centered products is , and each sum of centered squares is , hence the sample correlation coefficient is . This is a summary of these four observed pairs; it is not automatically the population Pearson correlation coefficient. Philip Stark, Computing the correlation coefficient explains the centered and standardized calculation.


