Mathematics · Article
Correlation and the limits of association
Define Pearson and rank association for a specified pair and population. Derive their geometry and domains, examine aggregation, selection, measurement and dependence, and separate descriptive association, calibrated inference, prediction and causal identification.
Back to MathematicsAfter reading, you can
- Compute and interpret Pearson correlation with its finite-moment and nonzero-spread conditions.
- Derive sample correlation bounds, affine invariance and the distinction between zero correlation and independence.
- Use sample and population Spearman definitions with explicit tie and continuity conventions.
- Analyze sensitivity to influential observations, restricted range, aggregation, selection and measurement error.
- Apply correlation inference only under its actual joint sampling assumptions and preserve missingness/matrix coherence.
- Explain why observational association does not identify an intervention effect, and connect correlation to a regression slope with units.
Identify what the two coordinates describe
A correlation begins with paired observations. Define the observational unit, what X and Y measure, their units, the population of interest and how pairs enter the record. Two measurements from one organism, two economic quantities for a region and a predictor-outcome pair in a computing system can each describe a different scientific unit. Pairing unrelated rows merely because they share a convenient index does not define the intended joint experiment.
Use a scatterplot to inspect shape, spread, clusters and influential observations before interpreting one coefficient. A correlation summarizes one feature of a joint law or finite record. It cannot display every curve, subgroup pattern or measurement limitation. Computing a number and choosing a useful scientific summary are related tasks with different requirements.
Distinguish a population parameter from a descriptive sample calculation and from a test of a null. Pearson and Spearman coefficients have specific definitions; their sampling uncertainty needs a design and reference distribution. Repeated or selected pairs do not gain iid calibration merely because a coefficient can be computed.
All data and structural models below are hypothetical. The essential path uses centered products, scatterplots and ranks. Optional depth adds population moment conditions, CDF transforms, covariance decomposition, partial correlation, matrix coherence and causal nonidentification. These topics preserve the limits of the scientific claim as the calculations become more sophisticated.
Population Pearson correlation needs finite positive spreads
For random variables X,Y on a common probability space with finite second moments, write μX=E[X],μY=E[Y],σX²=Var(X),σY²=Var(Y). When both variances are strictly positive, Pearson correlation is ρ=Cov(X,Y)/(σXσY), where Cov(X,Y)=E[(X−μX)(Y−μY)]. It is dimensionless: covariance has product measurement units, which are cancelled by the two standard deviations.
Finite second moments ensure that the covariance integral exists. Cauchy–Schwarz gives E[|(X−μX)(Y−μY)|]≤σXσY<∞. A constant variable has zero variance and leaves the coefficient undefined. Infinite or nonexistent moments likewise fall outside this population definition; they do not define a correlation of zero.
These existence conditions do not require a joint density, normality or a straight-line scatter. A finite-variance deterministic nonlinear relation can have a defined Pearson coefficient. Its usefulness as a summary is another issue. Conversely, a finite observed record can give a numerical sample coefficient even when a proposed population distribution lacks the moments needed for ρ.
Keep the domain attached to each claim. Independence implies zero covariance under these moment conditions, but independence does not supply finite variance for a Cauchy variable. A description of correlation as normalized covariance should not hide the integrability and nonzero denominators that make its normalization meaningful.
Compute a sample coefficient from the same complete pairs
For finite complete pairs (xᵢ,yᵢ),i=1,…,n, let x̄,ȳ be their means and define Sxx=Σ(xᵢ−x̄)²,Syy=Σ(yᵢ−ȳ)²,Sxy=Σ(xᵢ−x̄)(yᵢ−ȳ). If n≥2 and Sxx,Syy are positive, r=Sxy/√(SxxSyy). A constant coordinate, an empty record or a one-pair record does not meet these conditions.
The same r results from consistently dividing covariance and both variances by n or by n−1. Those common factors cancel. Under iid paired sampling with finite second moments, the n−1 covariance and variance formulas are unbiased for their population counterparts; this makes no general finite-sample unbiasedness claim for the ratio r. The finite correlation arithmetic itself does not require that sampling model. Mixing divisors, pair subsets or variable means does not give the same standard coefficient.
For x=(1,2,3,4) and y=(1,3,2,5), x̄=5/2 and ȳ=11/4. The centered sums are Sxx=5,Syy=35/4,Sxy=11/2. Thus r=11/√175≈0.83152184. The positive sign reflects a positive sum of centered products in this record, rather than a statement that every pair follows an increasing line.
The coefficient is a descriptor of these paired values. A population estimate, standard error, confidence interval or p-value needs additional assumptions about the source of the pairs. Preserve the data count and the independent unit separately so that a later inferential formula does not accidentally treat copied or correlated rows as new information.
Centered-vector geometry proves the bounds
Let a=(x₁−x̄,…,xₙ−x̄) and b=(y₁−ȳ,…,yₙ−ȳ). Their dot product is Sxy and squared lengths are Sxx,Syy. Therefore r=(a·b)/(‖a‖‖b‖), the cosine of their angle. Cauchy–Schwarz gives −1≤r≤1 whenever both vectors are nonzero.
Equality |r|=1 holds precisely when the nonzero centered vectors are proportional: b=ca for a nonzero constant c. The raw pairs then satisfy yᵢ=ȳ+c(xᵢ−x̄). Positive c gives r=1 and negative c gives r=−1. This is an exact finite affine relation, rather than evidence about its causal direction or its persistence in another population.
The corresponding population equality, under finite positive variances, means an affine relation holds almost surely. A value near an endpoint describes strong linear co-movement in the specified distribution, but its scientific importance depends on scales, measurement, design and the intended use. Universal weak/moderate/strong bins do not establish those contextual facts.
For n=2, any two nonconstant coordinate lists have one-dimensional centered vectors, so r is necessarily ±1. That algebraic fact does not provide a usable zero-degree-of-freedom t test or a well-established population relationship. A striking descriptive value from a very small record needs its sampling limitations kept visible.
Separate changes of units from changes of target
For X′=a+bX and Y′=c+dY with nonzero b,d, covariance multiplies by bd and the product of standard deviations by |bd|. Hence ρ′=sign(bd)ρ, with the analogous identity for a finite sample r. Offsets and positive nonzero scale conversions preserve correlation; exactly one negative multiplier reverses its sign.
Changing seconds to milliseconds is a positive scale conversion. Reversing one score’s orientation is a negative conversion and changes the meaning of the sign. A zero multiplier instead produces a constant coordinate and an undefined coefficient. State the variable coding when interpreting positive or negative association.
Nonlinear monotone transformations generally alter Pearson correlation because they change centered distances and products. For x=(1,2,3,4),y=x², the Pearson value is 25/√645≈0.98437404, below one despite a perfectly increasing curve. The variables are not affine functions of one another on these four values.
The dimensionless coefficient should not be confused with a regression slope. A slope describes change in Y units per X unit and scales when those units change. The next lesson derives the simple-regression relationship b=r·sY/sX under its finite-sample conditions. Correlation alone contains neither that unit ratio nor a causal interpretation of the slope.
W1: the same four complete paired rows. Recorded coordinate units: X[X units],Y[Y units]. X′=0+(1)X; Y′=0+(1)Y. Displayed transformed units: coded X units,coded Y units.
Assumptions: The displayed points are the actual finite hypothetical paired record. No iid or population model is needed for descriptive centered products. Population Pearson requires finite positive second moments. A finite sample does not establish them; no population coefficient is inferred from the record.
Target: Finite Pearson coefficient, its affine identity and normalized centered-vector geometry.
Reference experiment: Use the same paired rows and coordinate means for all three centered sums. Apply the stated affine recoding without dropping or jittering observations.
Calibration: Descriptive only. Correlation is dimensionless; a regression slope or causal effect is a different target.
| Original row | X [X units] | Y [Y units] |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 2 | 3 |
| 3 | 3 | 2 |
| 4 | 4 | 5 |
| Quantity | Exact value / status | Approximate decimal | Units / meaning |
|---|---|---|---|
| Original pair count | 4 | ≈4 | pairs. Recorded pairs; not automatically independent units. |
| Original mean X | 5/2 | ≈2.5 | X units. Same complete pairs. |
| Original mean Y | 11/4 | ≈2.75 | Y units. Same complete pairs. |
| Original Sxx | 5 | ≈5 | X units squared. Sum of centered squared X deviations. |
| Original Syy | 35/4 | ≈8.75 | Y units squared. Sum of centered squared Y deviations. |
| Original Sxy | 11/2 | ≈5.5 | X units × Y units. Paired centered product sum. |
| Original Pearson r | sqrt(121/175) | ≈0.83152184062 | dimensionless. Finite descriptive coefficient; no population, inference or causal model is supplied by the calculation. |
| Original Pearson r squared | 121/175 | ≈0.691428571429 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| Transformed pair count | 4 | ≈4 | pairs. Recorded pairs; not automatically independent units. |
| Transformed mean X | 5/2 | ≈2.5 | coded X units. Same complete pairs. |
| Transformed mean Y | 11/4 | ≈2.75 | coded Y units. Same complete pairs. |
| Transformed Sxx | 5 | ≈5 | coded X units squared. Sum of centered squared X deviations. |
| Transformed Syy | 35/4 | ≈8.75 | coded Y units squared. Sum of centered squared Y deviations. |
| Transformed Sxy | 11/2 | ≈5.5 | coded X units × coded Y units. Paired centered product sum. |
| Transformed Pearson r | sqrt(121/175) | ≈0.83152184062 | dimensionless. Finite descriptive coefficient; no population, inference or causal model is supplied by the calculation. |
| Transformed Pearson r squared | 121/175 | ≈0.691428571429 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| Affine Sxx identity | 5 | ≈5 | coded X units squared. b² Sxx. |
| Affine Syy identity | 35/4 | ≈8.75 | coded Y units squared. d² Syy. |
| Affine Sxy identity | 11/2 | ≈5.5 | coded X units × coded Y units. bd Sxy. |
| Affine sign identity | sign((1)(1))*(sqrt(121/175)) | ≈0.83152184062 | dimensionless. Nonzero positive scale conversions preserve r; exactly one negative multiplier reverses it. |
| Centered-vector angle | 180/pi*atan2(sqrt(1−121/175),sqrt(121/175)) | ≈33.7446133314 | degrees. Angle in the normalized vectors’ span; physical measurement units are removed. |
Fractions and symbolic expressions retain exact declared calculations. Marked decimals and numeric axis ticks are finite approximations. The tables distinguish paired observations, specified population laws and inference under stated assumptions. A descriptive correlation or nominal confidence label does not establish a sampling design or coverage.
Exact pair, model, weights and calibration tables
| X [coded X units] | Y [coded Y units] | Recorded multiplicity |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 3 | 1 |
| 3 | 2 | 1 |
| 4 | 5 | 1 |
| Field | Declared value |
|---|---|
| xUnit | X units |
| yUnit | Y units |
| X | ["1","2","3","4"] |
| Y | ["1","3","2","5"] |
| xOffset | 0 |
| xScale | 1 |
| yOffset | 0 |
| yScale | 1 |
| transformedXUnit | coded X units |
| transformedYUnit | coded Y units |
Finite values behind the scientific figures
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈0 | ≈0 |
| ≈1 | ≈2 |
| ≈2 | ≈1 |
| ≈3 | ≈4 |
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈1.2 | ≈1.2 |
| ≈2.2 | ≈1.2 |
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈1.2 | ≈1.2 |
| ≈2.0315218406203 | ≈1.75549205986353 |
Zero centered product need not mean no relationship
If X and Y are independent with finite second moments, E[XY]=E[X]E[Y] and covariance is zero. The converse fails because covariance is only one average product. Positive and negative contributions can cancel even when one variable is determined by the other. A plot and the joint scientific model can reveal structure that this one moment does not record.
Let X be uniform on [−1,1] and Y=X². Symmetry gives E[X]=E[X³]=0,E[Y]=1/3, so covariance is zero. But Var(X)=1/3 and Var(Y)=1/5−1/9=4/45 are positive, and Y is a nonconstant deterministic function of X. The population correlation is zero while independence fails.
Jointly Gaussian variables form an important special case in which zero correlation implies independence, with the usual defined variances. Normality of the two separate marginals alone does not give joint Gaussianity. For example, let X be standard normal and let an independent fair sign S take ±1; Y=SX is also standard normal and has covariance zero with X, while Y²=X² makes dependence explicit.
A coefficient can therefore answer a linear-association question without answering an omnibus dependence question. The same distinction affects tests: a permutation calibrated under independence need not be a universally valid test of every distribution having Pearson ρ=0. Match the null, statistic and joint sampling argument instead of translating every zero-association statement into independence.
Rank the paired coordinates to describe monotone association
Sample Spearman correlation rₛ is Pearson correlation of the separately ranked X and Y coordinates, retaining each original pair. For untied observations, replace each coordinate by its position in the sorted list. This removes the original distances between values while retaining their ordering. The resulting coefficient is dimensionless and answers an ordering question rather than a raw-unit slope question.
For x=(1,2,3,4) and y=(1,4,9,16), both rank lists are (1,2,3,4), so rₛ=1. The original Pearson value is below one because the raw pairs form a curve rather than an affine line. Perfect increasing ordering and perfect linear co-movement are different properties.
Strictly increasing transformations preserve ranks and ties, so they preserve this sample rank coefficient when the same tie convention is used. Reversing exactly one ordering reverses its sign. Spearman correlation is useful for monotone structure, but a near-zero value does not rule out a nonmonotone relationship. A U-shaped relationship can have cancellation in rank products as well as raw products.
Ranks do not erase the study design. Repeated participants, shared clusters and outcome-based exclusions still affect inference. Replacing measurements by ranks can reduce sensitivity to the numerical size of an extreme value, but changes of ordering, contamination and selective removal can still change the coefficient and its meaning.
Use the rank definition when observations tie
Declare a tie convention. With average ranks, observations occupying several sorted positions each receive their average position. For X=(1,1,2,3), these ranks are (3/2,3/2,3,4). For Y=(1,2,2,3), they are (1,5/2,5/2,4). Compute Pearson correlation of these paired rank lists.
Both rank means are 5/2, both centered squared sums are 9/2 and their centered product sum is 15/4. Therefore rₛ=(15/4)/(9/2)=5/6. If every value in one coordinate is tied, its rank list is constant and the coefficient is undefined. Assigning an arbitrary order within that block would manufacture information absent from the values.
The familiar formula rₛ=1−6Σdᵢ²/[n(n²−1)] uses untied complete ranks 1,…,n in each coordinate. It follows by expanding squared rank differences while both rank sums and squared sums have those fixed untied values. With ties those squared sums change, so the shortcut is not generally valid without the corresponding correction.
For the tied example, Σdᵢ²=3/2. The untied shortcut returns 1−9/60=17/20, different from the correct average-rank value 5/6. Preserve the actual ranks and exact calculation in a table, rather than hiding a tie-dependent discrepancy behind a software default or rounding.
Continuous marginal distributions define a population rank parameter
If X and Y have continuous marginal cumulative distributions F_X,F_Y, their probability integral transforms U=F_X(X),V=F_Y(Y) are each uniform on [0,1]. Population Spearman correlation is ρₛ=Corr(U,V)=12E[UV]−3. The bounded transforms have variance 1/12, so this definition does not require finite raw second moments of X and Y.
A joint density is not required. Singular joint laws such as Y=X² with a continuous X can still have continuous marginals and a defined ρₛ. Conversely, atoms require an explicit tie-adjusted population convention: F_X(X) need not be uniform when X has atoms, so the formula 12E[UV]−3 cannot be carried over unchanged merely by inserting that discontinuous cumulative distribution.
For X uniform on [−1,1] and Y=X², U=(X+1)/2 and V=|X|. Symmetry gives E[X|X|]=0 and E[|X|]=1/2, so E[UV]=1/4 and ρₛ=0. Both Pearson and this population rank coefficient vanish despite the exact nonlinear dependence. Rank association is not an omnibus detector of every possible dependence.
Heavy-tailed continuous marginals illustrate another distinction. Their population Pearson coefficient can be undefined for lack of second moments while the continuous-marginal population Spearman parameter exists. A finite sample coefficient, a population parameter and a particular test’s reference distribution remain three distinct objects. Define which one a reported number represents.
W4: perfectly increasing order is not an affine line. Recorded coordinate units: X[X units],Y[Y units]. n=4; average ranks; tied coordinate values=absent.
Assumptions: Average ranks preserve original pairing and all tied multiplicities. A constant rank list leaves rank correlation undefined. Only an iid independence/exchangeability null justifies the requested conditional pairing permutation; a general population Spearman-zero null is weaker.
Target: Descriptive raw Pearson and Pearson-of-average-ranks Spearman, with a separately declared conditional permutation test.
Reference experiment: Rank each coordinate separately, keep original pairs and evaluate the general rank-Pearson definition. Do not use the untied shortcut with ties.
Calibration: Ordering, raw linear co-movement and an independence null are distinct claims. No generic zero-coefficient⇒independence rule is used.
Decision at the declared threshold: Declared independence permutation at alpha: do not reject
| Original row | X [X units] | Y [Y units] |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 2 | 4 |
| 3 | 3 | 9 |
| 4 | 4 | 16 |
| Quantity | Exact value / status | Approximate decimal | Units / meaning |
|---|---|---|---|
| Raw pair count | 4 | ≈4 | pairs. Recorded pairs; not automatically independent units. |
| Raw mean X | 5/2 | ≈2.5 | X units. Same complete pairs. |
| Raw mean Y | 15/2 | ≈7.5 | Y units. Same complete pairs. |
| Raw Sxx | 5 | ≈5 | X units squared. Sum of centered squared X deviations. |
| Raw Syy | 129 | ≈129 | Y units squared. Sum of centered squared Y deviations. |
| Raw Sxy | 25 | ≈25 | X units × Y units. Paired centered product sum. |
| Raw Pearson r | sqrt(125/129) | ≈0.984374038698 | dimensionless. Finite descriptive coefficient; no population, inference or causal model is supplied by the calculation. |
| Raw Pearson r squared | 125/129 | ≈0.968992248062 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| Average-rank Spearman | 1 | ≈1 | dimensionless. Pearson correlation of the paired average-rank lists. |
| Average-rank Spearman squared | 1 | ≈1 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| Squared rank-difference sum | 0 | ≈0 | rank squared. Exact paired rank differences. |
| Valid untied shortcut | 1 | ≈1 | dimensionless. Complete untied ranks1…n in each coordinate. |
| Labelled rank permutations | 24 | ≈24 | permutations. Every original Y-index permutation is retained, including tied outputs. |
| Exact independence-permutation p | 1/12 | ≈0.0833333333333 | dimensionless. Inclusive absolute rank-correlation tail under the iid independence null, conditionally on the marginal rank lists. |
Fractions and symbolic expressions retain exact declared calculations. Marked decimals and numeric axis ticks are finite approximations. The tables distinguish paired observations, specified population laws and inference under stated assumptions. A descriptive correlation or nominal confidence label does not establish a sampling design or coverage.
Exact pair, model, weights and calibration tables
| Row | X [X units] | Y [Y units] | X average rank | Y average rank |
|---|---|---|---|---|
| 1 | 1 | 1 | 1 | 1 |
| 2 | 2 | 4 | 2 | 2 |
| 3 | 3 | 9 | 3 | 3 |
| 4 | 4 | 16 | 4 | 4 |
| X [X units] | Y [Y units] | Recorded multiplicity |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 4 | 1 |
| 3 | 9 | 1 |
| 4 | 16 | 1 |
| X [rank] | Y [rank] | Recorded multiplicity |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 2 | 1 |
| 3 | 3 | 1 |
| 4 | 4 | 1 |
| Centered rank product sum | Labelled multiplicity | Exact probability |
|---|---|---|
| -5 | 1 | 1/24 |
| -4 | 3 | 1/8 |
| -3 | 1 | 1/24 |
| -2 | 4 | 1/6 |
| -1 | 2 | 1/12 |
| 0 | 2 | 1/12 |
| 1 | 2 | 1/12 |
| 2 | 4 | 1/6 |
| 3 | 1 | 1/24 |
| 4 | 3 | 1/8 |
| 5 | 1 | 1/24 |
| Field | Declared value |
|---|---|
| xUnit | X units |
| yUnit | Y units |
| kind | sample |
| X | ["1","2","3","4"] |
| Y | ["1","4","9","16"] |
| permutationNull | iidIndependence |
| alpha | 1/20 |
Finite values behind the scientific figures
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈0 | ≈0 |
| ≈1 | ≈3 |
| ≈2 | ≈8 |
| ≈3 | ≈15 |
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈0 | ≈0 |
| ≈1 | ≈1 |
| ≈2 | ≈2 |
| ≈3 | ≈3 |
Inspect influential observations without choosing a preferred answer
Pearson correlation can change greatly when one observation changes the centered products or marginal spreads. Begin with pairs (0,0),(1,1),(2,2),(3,3), which lie on an increasing line. Adding (20,−20) changes the full-record Pearson coefficient to approximately −0.96889246. This is a real sensitivity of the summary to the fifth pair.
The sample rank coefficient also changes, from one to zero, because the new pair changes the ordering. Rank methods discard raw magnitude distances, but they are not immune to an influential ordering or contamination. A rank analysis and a raw-value analysis answer different questions and can both be worth inspecting under their stated targets.
Investigate data provenance, units, measurement errors, selection and whether an unusual observation belongs to the target population. Removing it merely to improve a coefficient changes the selected record and can distort uncertainty. If a justified data-quality rule or sensitivity analysis changes the record, report the rule, both relevant summaries and the consequences.
Use matched axes when comparing before and after plots so that a scale change does not conceal the influential point. Exact duplicate observations should be shown as multiplicities or overlapping records, not jittered into a visually larger independent sample. A plot supports scientific inspection when it preserves the actual units and structure.
Restriction can change correlation while leaving a conditional slope
Consider Y=X+ε with finite positive Var(X)=v, independent mean-zero noise ε and Var(ε)=w≥0. Cov(X,Y)=v and Var(Y)=v+w, so ρ=√[v/(v+w)]. In this model the conditional mean slope is one. The coefficient nevertheless changes with the spread of X in the target population.
With w=1, v=4 gives ρ=2/√5, while v=1/4 gives ρ=1/√5. A narrower X distribution reduces this correlation even though the stated conditional response equation is unchanged. A restriction based only on X retains the independent-noise structure under appropriate conditioning; another selection mechanism need not.
Selection using Y, a common effect, eligibility or missingness can change both dependence and the conditional model. Its effects need a separate derivation and can include increase, decrease or reversal. No universal rule says every range restriction simply attenuates a coefficient in the same way.
Report the included population and observed ranges when comparing studies. A difference between correlations can reflect different predictor variation, measurement reliability, selection or conditional behavior. It does not identify which cause changed merely by showing one coefficient per study.
W6: keep common axes when the added point reverses Pearson. Recorded coordinate units: X[X units],Y[Y units]. Added pair=(20,-20). Both plots use the same axes computed from the complete augmented record.
Assumptions: Both point sets are actual specified hypothetical records; no fitted cloud is generated. The comparison is a sensitivity calculation. An observation is not removed merely because a preferred correlation would result.
Target: Influence of one declared observation on raw and rank association.
Reference experiment: Keep the original paired rows and exact point locations; compare original and augmented records on common axes, without jitter.
Calibration: These are descriptive records or declared population models, not independent-sample confidence statements or rules for deleting observations.
| Original row | X [X units] | Y [Y units] |
|---|---|---|
| 1 | 0 | 0 |
| 2 | 1 | 1 |
| 3 | 2 | 2 |
| 4 | 3 | 3 |
| Quantity | Exact value / status | Approximate decimal | Units / meaning |
|---|---|---|---|
| Before pair count | 4 | ≈4 | pairs. Recorded pairs; not automatically independent units. |
| Before mean X | 3/2 | ≈1.5 | X units. Same complete pairs. |
| Before mean Y | 3/2 | ≈1.5 | Y units. Same complete pairs. |
| Before Sxx | 5 | ≈5 | X units squared. Sum of centered squared X deviations. |
| Before Syy | 5 | ≈5 | Y units squared. Sum of centered squared Y deviations. |
| Before Sxy | 5 | ≈5 | X units × Y units. Paired centered product sum. |
| Before Pearson r | 1 | ≈1 | dimensionless. Finite descriptive coefficient; no population, inference or causal model is supplied by the calculation. |
| Before Pearson r squared | 1 | ≈1 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| After pair count | 5 | ≈5 | pairs. Recorded pairs; not automatically independent units. |
| After mean X | 26/5 | ≈5.2 | X units. Same complete pairs. |
| After mean Y | -14/5 | ≈-2.8 | Y units. Same complete pairs. |
| After Sxx | 1394/5 | ≈278.8 | X units squared. Sum of centered squared X deviations. |
| After Syy | 1874/5 | ≈374.8 | Y units squared. Sum of centered squared Y deviations. |
| After Sxy | -1566/5 | ≈-313.2 | X units × Y units. Paired centered product sum. |
| After Pearson r | -sqrt(613089/653089) | ≈-0.968892463036 | dimensionless. Finite descriptive coefficient; no population, inference or causal model is supplied by the calculation. |
| After Pearson r squared | 613089/653089 | ≈0.938752604928 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| Before Spearman | 1 | ≈1 | dimensionless. Paired average ranks. |
| Before Spearman squared | 1 | ≈1 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| After Spearman | 0 | ≈0 | dimensionless. The new pair can also change ordering; ranks are not immune to influence. |
| After Spearman squared | 0 | ≈0 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
Fractions and symbolic expressions retain exact declared calculations. Marked decimals and numeric axis ticks are finite approximations. The tables distinguish paired observations, specified population laws and inference under stated assumptions. A descriptive correlation or nominal confidence label does not establish a sampling design or coverage.
Exact pair, model, weights and calibration tables
| X [X units] | Y [Y units] | Recorded multiplicity |
|---|---|---|
| 0 | 0 | 1 |
| 1 | 1 | 1 |
| 2 | 2 | 1 |
| 3 | 3 | 1 |
| X [X units] | Y [Y units] | Recorded multiplicity |
|---|---|---|
| 0 | 0 | 1 |
| 1 | 1 | 1 |
| 2 | 2 | 1 |
| 3 | 3 | 1 |
| 20 | -20 | 1 |
| Field | Declared value |
|---|---|
| xUnit | X units |
| yUnit | Y units |
| kind | influence |
| X | ["0","1","2","3"] |
| Y | ["0","1","2","3"] |
| addedX | 20 |
| addedY | -20 |
Finite values behind the scientific figures
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈0 | ≈20 |
| ≈1 | ≈21 |
| ≈2 | ≈22 |
| ≈3 | ≈23 |
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈0 | ≈20 |
| ≈1 | ≈21 |
| ≈2 | ≈22 |
| ≈3 | ≈23 |
| ≈20 | ≈0 |
Decompose covariance before averaging subgroup summaries
With finite second moments and a grouping variable G, total covariance is Cov(X,Y)=E[Cov(X,Y|G)]+Cov(E[X|G],E[Y|G]). The first term averages within-group covariance. The second describes co-movement of group means. Both are needed to reconstruct the overall covariance.
Write X−μX=(X−E[X|G])+(E[X|G]−μX), and similarly for Y. On expanding their product, the cross terms have expectation zero because the within-group residuals have conditional mean zero. The remaining two terms give the identity. The finite second-moment condition also makes the conditional means square-integrable and the covariance terms well-defined.
Variances have the corresponding within-plus-between decompositions. Correlation divides the total covariance by total standard deviations, so it is not generally an average of subgroup correlations. A subgroup coefficient also divides by its own spreads; averaging those normalized ratios does not reconstruct the global normalization.
For an empirical record, the identity can be applied to the finite distribution assigning each row weight 1/n, with group weights n_g/n and empirical within-group moments. If using n−1 corrected sample formulas, account for their different count factors. Preserve group sizes and the actual target weighting rather than silently treating every group mean as another individual measurement.
Group means define another observational unit
A correlation among group means describes groups, not the individual pairs within them. Averaging can change variation and remove or emphasize components of the joint law. It can increase, decrease or reverse a coefficient. An ecological summary therefore needs a separate argument before it is interpreted as an individual-level association.
Consider three equally sized groups with means (−2,−2),(0,0),(2,2). Within each group the two individual deviations are (−2,2) and (2,−2). Every within-group correlation is −1, while the correlation of the three group means is 1. The six individual pairs together have centered sums Sxx=Syy=40 and Sxy=−8, giving overall r=−1/5.
Under the empirical equal-row law, the within-group covariance is −4 and the between-mean covariance is 8/3, totaling −4/3. Each total variance is 4+8/3=20/3. Their normalization yields −1/5, displaying how the two components and their spreads combine. Averaging the three within-group coefficients would give another quantity.
Preserve group sizes and target weights when reporting these summaries. Equal weights for group means and equal weights for individual observations can represent different populations even before the normalization is considered. Region-level economic or biological group averages can be informative on their own scale while leaving individual relationships unresolved.
Different stratum weights can reverse a comparison
Associations conditional on a stratum and associations after pooling are different summaries of a joint law. Their directions can reverse when the comparison groups have different stratum proportions. Display the actual counts and denominators before treating a pooled percentage as a contradiction of the conditional results.
In a hypothetical easy stratum, setting A has 9 successes in 10 and B has 16 in 20. In a hard stratum, A has 6 in 20 and B has 2 in 10. A’s rate exceeds B’s within both strata: 0.9 versus 0.8 and 0.3 versus 0.2. Pooled A has 15/30=0.5 while pooled B has 18/30=0.6, because A has a larger share of the hard stratum.
Using a common half-and-half stratum mix instead gives A=(0.9+0.3)/2=0.6 and B=(0.8+0.2)/2=0.5. This standardization describes a specified target mix. It does not discover the scientifically appropriate population weights merely by producing a preferred direction. The pooled binary A-indicator/success correlation in these counts is −1/√99, another descriptive summary of the pooled record.
A causal interpretation of adjustment needs additional assumptions: a valid adjustment set, consistency of the relevant outcomes, appropriate exchangeability and positivity for the target population. Conditioning on every available variable is not a general solution. A mediator, collider or outcome-selected stratum can change the scientific question or introduce bias.
W7: individuals and group means are different units. Recorded coordinate units: X[X units],Y[Y units]. Observed groups=3; individual rows=6; actual group weights=n_g/n. Group-mean correlation uses each named group once.
Assumptions: The individual points are the declared finite record. Group means define a different observational unit. Empirical within-group moments use denominator n_g and group weights n_g/n. A distinct specified target mixture, if supplied, is not substituted silently for the observed row law.
Target: Individual, within-group and group-mean association, with the exact within/between covariance identity.
Reference experiment: Preserve group IDs, rows and counts. Compute all empirical means/covariances before normalizing into correlations.
Calibration: The result describes its actual observational unit and declared weights. Group adjustment or standardization is not by itself a causal identification argument.
| Original row | X [X units] | Y [Y units] |
|---|---|---|
| 1 | -4 | 0 |
| 2 | 0 | -4 |
| 3 | -2 | 2 |
| 4 | 2 | -2 |
| 5 | 0 | 4 |
| 6 | 4 | 0 |
| Quantity | Exact value / status | Approximate decimal | Units / meaning |
|---|---|---|---|
| All individuals pair count | 6 | ≈6 | pairs. Recorded pairs; not automatically independent units. |
| All individuals mean X | 0 | ≈0 | X units. Same complete pairs. |
| All individuals mean Y | 0 | ≈0 | Y units. Same complete pairs. |
| All individuals Sxx | 40 | ≈40 | X units squared. Sum of centered squared X deviations. |
| All individuals Syy | 40 | ≈40 | Y units squared. Sum of centered squared Y deviations. |
| All individuals Sxy | -8 | ≈-8 | X units × Y units. Paired centered product sum. |
| All individuals Pearson r | -1/5 | ≈-0.2 | dimensionless. Finite descriptive coefficient; no population, inference or causal model is supplied by the calculation. |
| All individuals Pearson r squared | 1/25 | ≈0.04 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| Within g1 Pearson | -1 | ≈-1 | dimensionless. Group-specific finite descriptor; a single/constant group does not acquire a defined correlation. |
| Within g1 Pearson squared | 1 | ≈1 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| Within g2 Pearson | -1 | ≈-1 | dimensionless. Group-specific finite descriptor; a single/constant group does not acquire a defined correlation. |
| Within g2 Pearson squared | 1 | ≈1 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| Within g3 Pearson | -1 | ≈-1 | dimensionless. Group-specific finite descriptor; a single/constant group does not acquire a defined correlation. |
| Within g3 Pearson squared | 1 | ≈1 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| Within-group covariance component | -4 | ≈-4 | X units × Y units. Σ(n_g/n) Cov_empirical(X,Y|g). |
| Between-mean covariance component | 8/3 | ≈2.66666666667 | X units × Y units. Covariance of group means using the actual individual-law weights n_g/n. |
| Total empirical covariance | -4/3 | ≈-1.33333333333 | X units × Y units. Within plus between; equals Sxy/n on all individual rows. |
| Within variance X component | 4 | ≈4 | X units squared. Empirical group moment with actual row weights. |
| Between variance X component | 8/3 | ≈2.66666666667 | X units squared. Variance of group means with actual row weights. |
| Total empirical variance X | 20/3 | ≈6.66666666667 | X units squared. Within plus between. |
| Within variance Y component | 4 | ≈4 | Y units squared. Empirical group moment with actual row weights. |
| Between variance Y component | 8/3 | ≈2.66666666667 | Y units squared. Variance of group means with actual row weights. |
| Total empirical variance Y | 20/3 | ≈6.66666666667 | Y units squared. Within plus between. |
| Equal-group-mean Pearson | 1 | ≈1 | dimensionless. Each named group contributes one mean; this is not the individual association. |
| Equal-group-mean Pearson squared | 1 | ≈1 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
Fractions and symbolic expressions retain exact declared calculations. Marked decimals and numeric axis ticks are finite approximations. The tables distinguish paired observations, specified population laws and inference under stated assumptions. A descriptive correlation or nominal confidence label does not establish a sampling design or coverage.
Exact pair, model, weights and calibration tables
| Group | Within-group row | X [X units] | Y [Y units] |
|---|---|---|---|
| g1 | 1 | -4 | 0 |
| g1 | 2 | 0 | -4 |
| g2 | 1 | -2 | 2 |
| g2 | 2 | 2 | -2 |
| g3 | 1 | 0 | 4 |
| g3 | 2 | 4 | 0 |
| Group | Individual count | Observed empirical weight | Specified target weight |
|---|---|---|---|
| g1 | 2 | 1/3 | not requested |
| g2 | 2 | 1/3 | not requested |
| g3 | 2 | 1/3 | not requested |
| X [X units] | Y [Y units] | Recorded multiplicity |
|---|---|---|
| -4 | 0 | 1 |
| 0 | -4 | 1 |
| -2 | 2 | 1 |
| 2 | -2 | 1 |
| 0 | 4 | 1 |
| 4 | 0 | 1 |
| X [X units] | Y [Y units] | Recorded multiplicity |
|---|---|---|
| -2 | -2 | 1 |
| 0 | 0 | 1 |
| 2 | 2 | 1 |
| Group | Mean X [X units] | Mean Y [Y units] | Within empirical covariance |
|---|---|---|---|
| g1 | -2 | -2 | -4 |
| g2 | 0 | 0 | -4 |
| g3 | 2 | 2 | -4 |
| Field | Declared value |
|---|---|
| xUnit | X units |
| yUnit | Y units |
| kind | groups |
| groups | [{"id":"g1","X":["-4","0"],"Y":["0","-4"]},{"id":"g2","X":["-2","2"],"Y":["2","-2"]},{"id":"g3","X":["0","4"],"Y":["4","0"]}] |
| targetWeights | null |
Finite values behind the scientific figures
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈0 | ≈4 |
| ≈4 | ≈0 |
| ≈2 | ≈6 |
| ≈6 | ≈2 |
| ≈4 | ≈8 |
| ≈8 | ≈4 |
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈2 | ≈2 |
| ≈4 | ≈4 |
| ≈6 | ≈6 |
Residual association is not automatically causal adjustment
A common cause can generate association between variables without an effect of one on the other. In the structural model X=C+U,Y=C+V, let C,U,V be independent mean-zero variables with variances 2,1,1. Then covariance is 2 and each total variance is 3, giving ρ=2/3. Replacing the X equation by an intervention does not change Y in this stated model.
Partial correlation after one variable Z is the correlation between linear-projection residuals of X and Y on Z. With finite second moments, positive original variances and positive residual variances, the standardized formula is ρXY·Z=(ρXY−ρXZρYZ)/√[(1−ρXZ²)(1−ρYZ²)]. The denominator excludes perfect prediction of either variable by Z.
This is a linear residual summary. It is not generally the conditional correlation Corr(X,Y|Z=z), and zero partial correlation does not generally imply conditional independence. Joint Gaussian models with suitable nonsingular covariance provide special equivalences, but normal marginal variables or a calculated residual coefficient alone do not establish those conditions.
Whether a variable is a confounder to adjust for is a scientific/causal question, not a consequence of it making a coefficient smaller. Specify the intervention target and causal structure or another valid identification argument. Residualizing an unsuitable set of covariates can leave confounding, remove part of a target effect or create selection bias.
Selection can create dependence
Conditioning changes a joint law. In particular, conditioning on a common effect of two variables can induce association even when the original causes were independent. The causal diagram is often called a collider structure, X→S←Y. Its statistical lesson is visible in a finite conditional-probability calculation.
Let independent X,Y each be Bernoulli(1/2), and retain a record only when S=1{X=1 or Y=1}=1. The retained outcomes (1,0),(0,1),(1,1) each have conditional probability 1/3. Thus E[X|S=1]=E[Y|S=1]=2/3 and E[XY|S=1]=1/3.
The conditional covariance is 1/3−4/9=−1/9, and both conditional variances are 2/9. The selected correlation is −1/2, although the original variables were independent with zero correlation. The selection rule, rather than an original negative relationship, generated this conditional association.
Eligibility, complete-case requirements, publication, case selection or model-based filtering can similarly alter which joint law is represented. Their effects depend on the actual mechanism; every selected sample is not automatically biased for every target. Describe the intended population and why the selection supports that target, rather than treating all observed rows as an unqualified population sample.
Measurement and shared components can change correlation
Under a classical additive error model, observed X*=X+U and Y*=Y+V have finite moments, with mean-zero U,V independent of each other and of the latent pair. Their covariance remains Cov(X,Y), while variances increase by Var(U),Var(V). Consequently ρobserved=ρlatent√(λXλY), where λX=Var(X)/[Var(X)+Var(U)] and similarly for Y. This stated model attenuates magnitude toward zero.
For latent unit-variance variables with correlation 3/4, adding independent error of variance 3 to X alone gives observed covariance 3/4 and X variance 4. The observed correlation is 3/8. Correlated, differential or nonadditive errors can instead inflate or reverse a coefficient; their covariance terms do not obey this simple attenuation formula. A correction needs validation information and a justified error model.
Shared algebraic components can also induce association. If X and Y are independent with variance one, define a change score C=Y−X. Then Cov(X,C)=Cov(X,Y)−Var(X)=−1 and Var(C)=2, so Corr(X,C)=−1/√2. The negative baseline/change association exists even though the original baseline and follow-up variables were independent.
This coupling calculation does not by itself establish a scientific process connecting baseline to the new outcome. Ratios, shared denominators, baselines and proxies require their actual algebra, moment conditions and measurement interpretation. Correlation among recorded variables concerns those variables; it does not automatically quantify the relationship between error-free scientific constructs.
Repeated pairs need a dependence-aware inference
Cross-sectional between-unit association, within-unit association and a lagged time-series association describe different targets. Participant-specific levels or common temporal patterns can affect an overall coefficient. Use the observation design and the earlier within/between decomposition to identify what variation is being summarized.
Exact duplicates make the information issue clear. Repeating every one of four pairs three times leaves the means unchanged and multiplies Sxx,Syy,Sxy by three, so r is unchanged. A naive iid formula nevertheless changes its nominal t statistic by √[(12−2)/(4−2)]=√5. Counting copies as independent has changed the stated calibration without adding an independent measurement.
The original four-pair inference would still need its own sampling assumptions; the duplicated twelve-row calculation cannot acquire those assumptions from its larger row count. Real clustered or serial data require an appropriate model, sampling design or justified dependence-preserving resampling method. A finite descriptive coefficient remains an arithmetic summary while its uncertainty claim needs that additional work.
Preserve identifiers, repeated-measure structure and observation times. Resampling individual coordinates separately destroys their pairing, while iid row resampling can destroy cluster or serial dependence. The number of plotted points and the number of independent units should remain visible as distinct quantities.
A correlation test needs its joint sampling law
Under iid bivariate-normal pairs with positive variances and null ρ=0, the statistic T=r√[(n−2)/(1−r²)] has a Student t distribution with n−2 degrees of freedom, for the ordinary nondegenerate n≥3 case. The joint normal iid model supplies this exact reference law. Separate normal marginal distributions or an observed numerical r alone do not establish it.
For finite inputs the expression also needs |r|<1. Perfect sample collinearity makes its denominator zero; n=2 has zero degrees of freedom and always gives a descriptive r of ±1 when both coordinates vary. Such boundaries need an explicit status rather than an ordinary finite t result. Under the continuous iid normal null with n≥3, exact perfect collinearity has probability zero.
An approximate Fisher interval uses z=atanh(r), estimated standard error 1/√(n−3), and back-transforms z±z_(1−α/2)/√(n−3) with tanh. It requires n>3 and |r|<1 and is an asymptotic approximation under its sampling assumptions, not an exact normal interval for every finite record. Its formula is not a universal Spearman, partial-correlation or clustered-data interval.
Significance and scientific magnitude remain distinct. A small correlation can be estimated precisely with enough appropriate independent information, while a large coefficient from few selected pairs can be uncertain. Report coefficient type, sample and independent-unit counts, interval method and model assumptions alongside a p-value.
A rank construction does not supply every null calibration
With iid paired observations under an independence null and continuous marginals, permuting one coordinate’s labels gives an exchangeable reference for a rank-association statistic. This intentionally breaks the original pairing under that null. A general null of population Spearman ρₛ=0 is weaker than independence, so the same permutation argument does not automatically test every distribution in that weaker null.
For four untied pairs, perfect positive Spearman correlation has two-sided absolute-tail probability 2/4!=1/12 under this exact independence permutation law: only identical and reversed rank orders give absolute coefficient one. A perfect sample rank value therefore need not cross a 0.05 two-sided threshold with this small discrete reference. The result concerns the stated null and ordering.
With ties, preserve their actual permutation multiplicities and declared rank convention. An implementation may enumerate a conditional law, use an approximation or apply a limited algorithmic shortcut. The word exact in a software option does not establish all assumptions or unlimited exactness for every n and tie pattern. Check what the actual method computes.
For bootstrap uncertainty of the observed joint association, resample complete paired units, or clusters/blocks under the justified design. Resampling X and Y separately replaces the joint empirical distribution with a product and targets another experiment. When many associations are searched, retain the full hypothesis family and valid multiplicity method from the preceding lesson.
Common-row correlations have a joint-matrix constraint
Complete-case correlation describes the law among the retained complete observations unless missingness assumptions justify a broader population interpretation. Missingness independent of the pair is one sufficient route to retaining its joint law; other mechanisms need appropriate modelling or adjustment. A convenient deletion setting is not itself a missingness model.
A correlation matrix of jointly defined finite-variance variables with positive spreads is positive semidefinite. For standardized variables Z and any vector a, aᵀRa=E[(aᵀZ)²]≥0. A complete-row sample correlation matrix has the corresponding Gram-matrix property. Symmetry, unit diagonal and individually bounded off-diagonal entries alone do not ensure it.
Pairwise deletion can use different observations and selected populations for each entry. For rows (A,B,C)=(0,0,missing),(1,1,missing),(0,missing,0),(1,missing,1),(missing,0,1),(missing,1,0), the three pairwise correlations are rAB=1,rAC=1,rBC=−1. The resulting matrix has determinant −4 and is not positive semidefinite.
Each pair’s arithmetic is valid on its own two complete rows, but the combined entries cannot represent one common joint correlation law. An indefinite result can matter for covariance-based models or dimension reduction. Replacing it with a positive-semidefinite matrix changes the summary and requires a justified modelling choice; it does not by itself recover the missing data mechanism or population truth.
Method result held: The displayed symmetric unit-diagonal entries are not positive semidefinite and cannot be one common correlation law. No nearest-matrix repair or imputation is applied.
W11: valid local pair calculations need not make a joint matrix. Recorded coordinate units: X[X units],Y[Y units]. Recorded rows=6; pairwise deletion uses each pair's own complete subset, means and spreads.
Assumptions: The six/finite rows are actual declared hypothetical records with literal missing cells, not a completed synthetic cloud. A common complete-row correlation matrix has the Gram PSD property. Pairwise deletion can combine different selected subsets/populations; it does not supply a missingness model.
Target: Visible missing cells and pairwise coefficients versus coherence of a proposed common joint matrix.
Reference experiment: Preserve null cells, use pair-specific complete rows and means, and do not impute or repair an indefinite matrix.
Calibration: Sample size, independent information, sampling-model assumptions and joint-matrix coherence are separate requirements.
| Quantity | Exact value / status | Approximate decimal | Units / meaning |
|---|---|---|---|
| XY complete-pair count | 2 | ≈2 | pairs. Actual subset size; two-point endpoints are descriptive and do not justify a t reference. |
| XY pairwise correlation | 1 | ≈1 | dimensionless. Computed from that pair’s own complete rows. |
| XY pairwise correlation squared | 1 | ≈1 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| XZ complete-pair count | 2 | ≈2 | pairs. Actual subset size; two-point endpoints are descriptive and do not justify a t reference. |
| XZ pairwise correlation | 1 | ≈1 | dimensionless. Computed from that pair’s own complete rows. |
| XZ pairwise correlation squared | 1 | ≈1 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| YZ complete-pair count | 2 | ≈2 | pairs. Actual subset size; two-point endpoints are descriptive and do not justify a t reference. |
| YZ pairwise correlation | -1 | ≈-1 | dimensionless. Computed from that pair’s own complete rows. |
| YZ pairwise correlation squared | 1 | ≈1 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| Correlation-matrix determinant | -4 | ≈-4 | dimensionless. Exact1+2abc−a²−b²−c². |
| Exact determinant sign | -1 | ≈-1 | sign. Zero is distinguished from positive/negative before finite conversion. |
| Negative quadratic-form witness | -3 | ≈-3 | dimensionless. For vector(-1,1,1),a^T R a<0 refutes PSD. |
Fractions and symbolic expressions retain exact declared calculations. Marked decimals and numeric axis ticks are finite approximations. The tables distinguish paired observations, specified population laws and inference under stated assumptions. A descriptive correlation or nominal confidence label does not establish a sampling design or coverage.
Exact pair, model, weights and calibration tables
| Row | X [X units] | Y [Y units] | Z [Z units] |
|---|---|---|---|
| 1 | 0 | 0 | missing |
| 2 | 1 | 1 | missing |
| 3 | 0 | missing | 0 |
| 4 | 1 | missing | 1 |
| 5 | missing | 0 | 1 |
| 6 | missing | 1 | 0 |
| Vector | a^T R a |
|---|---|
| (-1,1,1) | -3 |
| Entry | Exact value / status | Approximate value |
|---|---|---|
| XX | 1 | 1 |
| XY | 1 | ≈1 |
| XZ | 1 | ≈1 |
| YZ | -1 | ≈-1 |
| YY | 1 | 1 |
| ZZ | 1 | 1 |
| Field | Declared value |
|---|---|
| xUnit | X units |
| yUnit | Y units |
| kind | missing |
| rows | [["0","0",null],["1","1",null],["0",null,"0"],["1",null,"1"],[null,"0","1"],[null,"1","0"]] |
| zUnit | Z units |
The same observational law can have different causal effects
A causal intervention specifies how the data-generating system changes when a variable is set externally. It is not generally the same as conditioning on its observed value. Observational association alone can be compatible with different structural explanations, even if the entire joint distribution is known rather than only one correlation coefficient.
Let Ux,Uy be independent standard normals. Model A is X=Ux,Y=(3/5)X+(4/5)Uy. Model B is Y=Uy,X=(3/5)Y+(4/5)Ux. Both give centered bivariate-normal observations with each variance one and covariance 3/5. Their full observational laws agree, including the conditional mean E[Y|X=x]=(3/5)x.
Under an intervention replacing the X equation by X=x, Model A gives E[Y|do(X=x)]=(3/5)x. In Model B, Y remains its exogenous Uy, so E[Y|do(X=x)]=0. The intervention slopes differ although every observational distributional feature agrees. Scientific time order, randomization, valid adjustment or other identification information can distinguish models; correlation precision alone cannot.
A causal response can also be nonlinear with zero Pearson correlation. If a structural model explicitly makes Y=X² invariant under interventions on a symmetric X, its response is x² even though the observational covariance can be zero. That conclusion uses the added structural assumption, not the observed curve alone. Preserve the difference between descriptive association, prediction and a scientifically identified intervention effect.
W12: the same observations, different intervention means. Recorded coordinate units: X[X standard units],Y[Y standard units]. Model A:X=Ux,Y=(3/5)X+sqrt(1−rho²)Uy. Model B:Y=Uy,X=(3/5)Y+sqrt(1−rho²)Ux.
Assumptions: Ux,Uy are independent standard normals. Both specified models have the same centered Gaussian observational law with unit marginal variances and covariance rho. do(X=x) replaces the X equation. It is not conditioning on observed X. The observational conditional mean is rho*x in both models.
Target: The same full observational distribution can coexist with different intervention mean functions.
Reference experiment: Draw the shared actual Gaussian contour/support, then the two exact intervention mean functions. No pseudo-random points or fitted causal claim is added.
Calibration: Every conclusion uses the displayed structural or measurement assumptions. Observational association alone does not identify an intervention effect.
| Quantity | Exact value / status | Approximate decimal | Units / meaning |
|---|---|---|---|
| Shared observational covariance | 3/5 | ≈0.6 | standardized product units. Each observational variance is1. |
| Shared observational rho | 3/5 | ≈0.6 | dimensionless. This is a specified population parameter, not a sample estimate. |
| Shared observational conditional-mean slope | 3/5 | ≈0.6 | Y standard units/X standard units. E[Y|X=x]=rho*x in both supplied models. |
| Model A intervention-mean slope | 3/5 | ≈0.6 | Y standard units/X standard units. Replacing X propagates through the Y equation. |
| Model B intervention-mean slope | 0 | ≈0 | Y standard units/X standard units. The Y equation remains exogenous under do(X=x). |
Fractions and symbolic expressions retain exact declared calculations. Marked decimals and numeric axis ticks are finite approximations. The tables distinguish paired observations, specified population laws and inference under stated assumptions. A descriptive correlation or nominal confidence label does not establish a sampling design or coverage.
Exact pair, model, weights and calibration tables
| x [X standard units] | Shared E[Y|X=x] | Model A E[Y|do(X=x)] | Model B E[Y|do(X=x)] |
|---|---|---|---|
| -2 | -6/5 | -6/5 | 0 |
| 0 | 0 | 0 | 0 |
| 2 | 6/5 | 6/5 | 0 |
| Field | Declared value |
|---|---|
| xUnit | X standard units |
| yUnit | Y standard units |
| kind | causal |
| rho | 3/5 |
| halfWidth | 2 |
Finite values behind the scientific figures
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈2.4 | ≈2 |
| ≈2.3951847266722 | ≈2.07552454826697 |
| ≈2.38078528040323 | ≈2.14454342585484 |
| ≈2.35694033573221 | ≈2.2063919432429 |
| ≈2.32387953251129 | ≈2.26047446539884 |
| ≈2.28192126434835 | ≈2.30627014806981 |
| ≈2.23146961230255 | ≈2.34333795379721 |
| ≈2.17301045336274 | ≈2.37132089934856 |
| ≈2.10710678118655 | ≈2.38994949366117 |
| ≈2.03439328416365 | ≈2.39904433318838 |
| ≈1.9555702330196 | ≈2.3985178296538 |
| ≈1.871396736826 | ≈2.38837505357428 |
| ≈1.78268343236509 | ≈2.36871368542808 |
| ≈1.69028467725446 | ≈2.33972307493844 |
| ≈1.59509032201613 | ≈2.30168241753226 |
| ≈1.49801714032956 | ≈2.25495806553549 |
| ≈1.4 | ≈2.2 |
| ≈1.30198285967044 | ≈2.13733749714002 |
| ≈1.20490967798387 | ≈2.06757403111291 |
| ≈1.10971532274554 | ≈1.99138146223309 |
| ≈1.01731656763491 | ≈1.90949356658998 |
| ≈0.928603263174002 | ≈1.82269896938309 |
| ≈0.844429766980398 | ≈1.73183355003028 |
| ≈0.765606715836355 | ≈1.637772392192 |
| ≈0.692893218813452 | ≈1.54142135623731 |
| ≈0.626989546637263 | ≈1.44370835531327 |
| ≈0.568530387697455 | ≈1.34557441903415 |
| ≈0.518078735651645 | ≈1.24796463085179 |
| ≈0.476120467488713 | ≈1.1518190263853 |
| ≈0.443059664267791 | ≈1.05806354036424 |
| ≈0.419214719596769 | ≈0.967601089370964 |
| ≈0.404815273327803 | ≈0.88130287626033 |
| ≈0.4 | ≈0.8 |
| ≈0.404815273327803 | ≈0.724475451733033 |
| ≈0.419214719596769 | ≈0.655456574145159 |
| ≈0.443059664267791 | ≈0.593608056757105 |
| ≈0.476120467488713 | ≈0.539525534601156 |
| ≈0.518078735651645 | ≈0.493729851930189 |
| ≈0.568530387697454 | ≈0.456662046202791 |
| ≈0.626989546637263 | ≈0.428679100651441 |
| ≈0.692893218813452 | ≈0.410050506338833 |
| ≈0.765606715836354 | ≈0.400955666811623 |
| ≈0.844429766980398 | ≈0.401482170346202 |
| ≈0.928603263174002 | ≈0.411624946425717 |
| ≈1.01731656763491 | ≈0.431286314571916 |
| ≈1.10971532274554 | ≈0.460276925061555 |
| ≈1.20490967798387 | ≈0.498317582467738 |
| ≈1.30198285967044 | ≈0.545041934464506 |
| ≈1.4 | ≈0.6 |
| ≈1.49801714032956 | ≈0.662662502859978 |
| ≈1.59509032201613 | ≈0.732425968887093 |
| ≈1.69028467725446 | ≈0.80861853776691 |
| ≈1.78268343236509 | ≈0.890506433410025 |
| ≈1.871396736826 | ≈0.977301030616914 |
| ≈1.9555702330196 | ≈1.06816644996972 |
| ≈2.03439328416365 | ≈1.162227607808 |
| ≈2.10710678118655 | ≈1.25857864376269 |
| ≈2.17301045336274 | ≈1.35629164468673 |
| ≈2.23146961230255 | ≈1.45442558096585 |
| ≈2.28192126434835 | ≈1.55203536914821 |
| ≈2.32387953251129 | ≈1.6481809736147 |
| ≈2.35694033573221 | ≈1.74193645963576 |
| ≈2.38078528040323 | ≈1.83239891062904 |
| ≈2.3951847266722 | ≈1.91869712373967 |
| ≈2.4 | ≈2 |
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈0 | ≈0.56 |
| ≈2.8 | ≈2.24 |
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈0 | ≈0 |
| ≈4 | ≈2.4 |
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈0 | ≈1.2 |
| ≈4 | ≈1.2 |
Report the coefficient with its population, design and scale
A useful report includes a scatterplot, paired unit, variable definitions and units, target population, coefficient type, sample and independent-unit counts, ties and missingness rules, uncertainty method and design assumptions. Show relevant sensitivity to influential observations, selection and grouping. A single strength label cannot replace these scientific details.
In biology, measured traits and proxies can share causes, measurement error and group structure. In economics and resource studies, regional averages can describe a different unit from individuals and respond to changing composition. In computing and AI, training selection, dependent records and constructed features can alter association or inflate apparent evidence. These examples need their specific scientific models rather than one generic causal reading of r.
For simple least squares with an intercept and positive Sxx, the slope is b=Sxy/Sxx=r√(Syy/Sxx)=r·sY/sX when both spreads are positive and the same sample variance convention is used. Its units are Y units per X unit. The next lesson derives this relationship and its regression assumptions in depth. Describing or predicting a conditional relationship still does not identify a causal effect by itself.
The essential path is paired products and ranks interpreted with a plot. The deeper path adds moment existence, CDF transforms, aggregation, residualization, selection, measurement, matrix coherence and causal identification. Keep the conditions visible as the method becomes more elaborate, so the reported relationship answers the scientific question actually posed.
Keep the paired unit, target, scale and sampling design visible. Each selection distinguishes actual finite records from explicitly specified model curves. Undefined spreads, unsupported calibration and incoherent matrices remain explicit held results.
Paired products, geometry and affine coding
W1: the same four complete paired rows. Prepared under the selected assumptions.
W1: the same four complete paired rows. Recorded coordinate units: X[X units],Y[Y units]. X′=0+(1)X; Y′=0+(1)Y. Displayed transformed units: coded X units,coded Y units.
Assumptions: The displayed points are the actual finite hypothetical paired record. No iid or population model is needed for descriptive centered products. Population Pearson requires finite positive second moments. A finite sample does not establish them; no population coefficient is inferred from the record.
Target: Finite Pearson coefficient, its affine identity and normalized centered-vector geometry.
Reference experiment: Use the same paired rows and coordinate means for all three centered sums. Apply the stated affine recoding without dropping or jittering observations.
Calibration: Descriptive only. Correlation is dimensionless; a regression slope or causal effect is a different target.
| Original row | X [X units] | Y [Y units] |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 2 | 3 |
| 3 | 3 | 2 |
| 4 | 4 | 5 |
| Quantity | Exact value / status | Approximate decimal | Units / meaning |
|---|---|---|---|
| Original pair count | 4 | ≈4 | pairs. Recorded pairs; not automatically independent units. |
| Original mean X | 5/2 | ≈2.5 | X units. Same complete pairs. |
| Original mean Y | 11/4 | ≈2.75 | Y units. Same complete pairs. |
| Original Sxx | 5 | ≈5 | X units squared. Sum of centered squared X deviations. |
| Original Syy | 35/4 | ≈8.75 | Y units squared. Sum of centered squared Y deviations. |
| Original Sxy | 11/2 | ≈5.5 | X units × Y units. Paired centered product sum. |
| Original Pearson r | sqrt(121/175) | ≈0.83152184062 | dimensionless. Finite descriptive coefficient; no population, inference or causal model is supplied by the calculation. |
| Original Pearson r squared | 121/175 | ≈0.691428571429 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| Transformed pair count | 4 | ≈4 | pairs. Recorded pairs; not automatically independent units. |
| Transformed mean X | 5/2 | ≈2.5 | coded X units. Same complete pairs. |
| Transformed mean Y | 11/4 | ≈2.75 | coded Y units. Same complete pairs. |
| Transformed Sxx | 5 | ≈5 | coded X units squared. Sum of centered squared X deviations. |
| Transformed Syy | 35/4 | ≈8.75 | coded Y units squared. Sum of centered squared Y deviations. |
| Transformed Sxy | 11/2 | ≈5.5 | coded X units × coded Y units. Paired centered product sum. |
| Transformed Pearson r | sqrt(121/175) | ≈0.83152184062 | dimensionless. Finite descriptive coefficient; no population, inference or causal model is supplied by the calculation. |
| Transformed Pearson r squared | 121/175 | ≈0.691428571429 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| Affine Sxx identity | 5 | ≈5 | coded X units squared. b² Sxx. |
| Affine Syy identity | 35/4 | ≈8.75 | coded Y units squared. d² Syy. |
| Affine Sxy identity | 11/2 | ≈5.5 | coded X units × coded Y units. bd Sxy. |
| Affine sign identity | sign((1)(1))*(sqrt(121/175)) | ≈0.83152184062 | dimensionless. Nonzero positive scale conversions preserve r; exactly one negative multiplier reverses it. |
| Centered-vector angle | 180/pi*atan2(sqrt(1−121/175),sqrt(121/175)) | ≈33.7446133314 | degrees. Angle in the normalized vectors’ span; physical measurement units are removed. |
Fractions and symbolic expressions retain exact declared calculations. Marked decimals and numeric axis ticks are finite approximations. The tables distinguish paired observations, specified population laws and inference under stated assumptions. A descriptive correlation or nominal confidence label does not establish a sampling design or coverage.
Exact pair, model, weights and calibration tables
| X [coded X units] | Y [coded Y units] | Recorded multiplicity |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 3 | 1 |
| 3 | 2 | 1 |
| 4 | 5 | 1 |
| Field | Declared value |
|---|---|
| xUnit | X units |
| yUnit | Y units |
| X | ["1","2","3","4"] |
| Y | ["1","3","2","5"] |
| xOffset | 0 |
| xScale | 1 |
| yOffset | 0 |
| yScale | 1 |
| transformedXUnit | coded X units |
| transformedYUnit | coded Y units |
Finite values behind the scientific figures
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈0 | ≈0 |
| ≈1 | ≈2 |
| ≈2 | ≈1 |
| ≈3 | ≈4 |
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈1.2 | ≈1.2 |
| ≈2.2 | ≈1.2 |
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈1.2 | ≈1.2 |
| ≈2.0315218406203 | ≈1.75549205986353 |
Raw distances, ranks and nonlinear dependence
W4: perfectly increasing order is not an affine line. Prepared under the selected assumptions.
W4: perfectly increasing order is not an affine line. Recorded coordinate units: X[X units],Y[Y units]. n=4; average ranks; tied coordinate values=absent.
Assumptions: Average ranks preserve original pairing and all tied multiplicities. A constant rank list leaves rank correlation undefined. Only an iid independence/exchangeability null justifies the requested conditional pairing permutation; a general population Spearman-zero null is weaker.
Target: Descriptive raw Pearson and Pearson-of-average-ranks Spearman, with a separately declared conditional permutation test.
Reference experiment: Rank each coordinate separately, keep original pairs and evaluate the general rank-Pearson definition. Do not use the untied shortcut with ties.
Calibration: Ordering, raw linear co-movement and an independence null are distinct claims. No generic zero-coefficient⇒independence rule is used.
Decision at the declared threshold: Declared independence permutation at alpha: do not reject
| Original row | X [X units] | Y [Y units] |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 2 | 4 |
| 3 | 3 | 9 |
| 4 | 4 | 16 |
| Quantity | Exact value / status | Approximate decimal | Units / meaning |
|---|---|---|---|
| Raw pair count | 4 | ≈4 | pairs. Recorded pairs; not automatically independent units. |
| Raw mean X | 5/2 | ≈2.5 | X units. Same complete pairs. |
| Raw mean Y | 15/2 | ≈7.5 | Y units. Same complete pairs. |
| Raw Sxx | 5 | ≈5 | X units squared. Sum of centered squared X deviations. |
| Raw Syy | 129 | ≈129 | Y units squared. Sum of centered squared Y deviations. |
| Raw Sxy | 25 | ≈25 | X units × Y units. Paired centered product sum. |
| Raw Pearson r | sqrt(125/129) | ≈0.984374038698 | dimensionless. Finite descriptive coefficient; no population, inference or causal model is supplied by the calculation. |
| Raw Pearson r squared | 125/129 | ≈0.968992248062 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| Average-rank Spearman | 1 | ≈1 | dimensionless. Pearson correlation of the paired average-rank lists. |
| Average-rank Spearman squared | 1 | ≈1 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| Squared rank-difference sum | 0 | ≈0 | rank squared. Exact paired rank differences. |
| Valid untied shortcut | 1 | ≈1 | dimensionless. Complete untied ranks1…n in each coordinate. |
| Labelled rank permutations | 24 | ≈24 | permutations. Every original Y-index permutation is retained, including tied outputs. |
| Exact independence-permutation p | 1/12 | ≈0.0833333333333 | dimensionless. Inclusive absolute rank-correlation tail under the iid independence null, conditionally on the marginal rank lists. |
Fractions and symbolic expressions retain exact declared calculations. Marked decimals and numeric axis ticks are finite approximations. The tables distinguish paired observations, specified population laws and inference under stated assumptions. A descriptive correlation or nominal confidence label does not establish a sampling design or coverage.
Exact pair, model, weights and calibration tables
| Row | X [X units] | Y [Y units] | X average rank | Y average rank |
|---|---|---|---|---|
| 1 | 1 | 1 | 1 | 1 |
| 2 | 2 | 4 | 2 | 2 |
| 3 | 3 | 9 | 3 | 3 |
| 4 | 4 | 16 | 4 | 4 |
| X [X units] | Y [Y units] | Recorded multiplicity |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 4 | 1 |
| 3 | 9 | 1 |
| 4 | 16 | 1 |
| X [rank] | Y [rank] | Recorded multiplicity |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 2 | 1 |
| 3 | 3 | 1 |
| 4 | 4 | 1 |
| Centered rank product sum | Labelled multiplicity | Exact probability |
|---|---|---|
| -5 | 1 | 1/24 |
| -4 | 3 | 1/8 |
| -3 | 1 | 1/24 |
| -2 | 4 | 1/6 |
| -1 | 2 | 1/12 |
| 0 | 2 | 1/12 |
| 1 | 2 | 1/12 |
| 2 | 4 | 1/6 |
| 3 | 1 | 1/24 |
| 4 | 3 | 1/8 |
| 5 | 1 | 1/24 |
| Field | Declared value |
|---|---|
| xUnit | X units |
| yUnit | Y units |
| kind | sample |
| X | ["1","2","3","4"] |
| Y | ["1","4","9","16"] |
| permutationNull | iidIndependence |
| alpha | 1/20 |
Finite values behind the scientific figures
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈0 | ≈0 |
| ≈1 | ≈3 |
| ≈2 | ≈8 |
| ≈3 | ≈15 |
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈0 | ≈0 |
| ≈1 | ≈1 |
| ≈2 | ≈2 |
| ≈3 | ≈3 |
Influence and the predictor range
W6: keep common axes when the added point reverses Pearson. Prepared under the selected assumptions.
W6: keep common axes when the added point reverses Pearson. Recorded coordinate units: X[X units],Y[Y units]. Added pair=(20,-20). Both plots use the same axes computed from the complete augmented record.
Assumptions: Both point sets are actual specified hypothetical records; no fitted cloud is generated. The comparison is a sensitivity calculation. An observation is not removed merely because a preferred correlation would result.
Target: Influence of one declared observation on raw and rank association.
Reference experiment: Keep the original paired rows and exact point locations; compare original and augmented records on common axes, without jitter.
Calibration: These are descriptive records or declared population models, not independent-sample confidence statements or rules for deleting observations.
| Original row | X [X units] | Y [Y units] |
|---|---|---|
| 1 | 0 | 0 |
| 2 | 1 | 1 |
| 3 | 2 | 2 |
| 4 | 3 | 3 |
| Quantity | Exact value / status | Approximate decimal | Units / meaning |
|---|---|---|---|
| Before pair count | 4 | ≈4 | pairs. Recorded pairs; not automatically independent units. |
| Before mean X | 3/2 | ≈1.5 | X units. Same complete pairs. |
| Before mean Y | 3/2 | ≈1.5 | Y units. Same complete pairs. |
| Before Sxx | 5 | ≈5 | X units squared. Sum of centered squared X deviations. |
| Before Syy | 5 | ≈5 | Y units squared. Sum of centered squared Y deviations. |
| Before Sxy | 5 | ≈5 | X units × Y units. Paired centered product sum. |
| Before Pearson r | 1 | ≈1 | dimensionless. Finite descriptive coefficient; no population, inference or causal model is supplied by the calculation. |
| Before Pearson r squared | 1 | ≈1 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| After pair count | 5 | ≈5 | pairs. Recorded pairs; not automatically independent units. |
| After mean X | 26/5 | ≈5.2 | X units. Same complete pairs. |
| After mean Y | -14/5 | ≈-2.8 | Y units. Same complete pairs. |
| After Sxx | 1394/5 | ≈278.8 | X units squared. Sum of centered squared X deviations. |
| After Syy | 1874/5 | ≈374.8 | Y units squared. Sum of centered squared Y deviations. |
| After Sxy | -1566/5 | ≈-313.2 | X units × Y units. Paired centered product sum. |
| After Pearson r | -sqrt(613089/653089) | ≈-0.968892463036 | dimensionless. Finite descriptive coefficient; no population, inference or causal model is supplied by the calculation. |
| After Pearson r squared | 613089/653089 | ≈0.938752604928 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| Before Spearman | 1 | ≈1 | dimensionless. Paired average ranks. |
| Before Spearman squared | 1 | ≈1 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| After Spearman | 0 | ≈0 | dimensionless. The new pair can also change ordering; ranks are not immune to influence. |
| After Spearman squared | 0 | ≈0 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
Fractions and symbolic expressions retain exact declared calculations. Marked decimals and numeric axis ticks are finite approximations. The tables distinguish paired observations, specified population laws and inference under stated assumptions. A descriptive correlation or nominal confidence label does not establish a sampling design or coverage.
Exact pair, model, weights and calibration tables
| X [X units] | Y [Y units] | Recorded multiplicity |
|---|---|---|
| 0 | 0 | 1 |
| 1 | 1 | 1 |
| 2 | 2 | 1 |
| 3 | 3 | 1 |
| X [X units] | Y [Y units] | Recorded multiplicity |
|---|---|---|
| 0 | 0 | 1 |
| 1 | 1 | 1 |
| 2 | 2 | 1 |
| 3 | 3 | 1 |
| 20 | -20 | 1 |
| Field | Declared value |
|---|---|
| xUnit | X units |
| yUnit | Y units |
| kind | influence |
| X | ["0","1","2","3"] |
| Y | ["0","1","2","3"] |
| addedX | 20 |
| addedY | -20 |
Finite values behind the scientific figures
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈0 | ≈20 |
| ≈1 | ≈21 |
| ≈2 | ≈22 |
| ≈3 | ≈23 |
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈0 | ≈20 |
| ≈1 | ≈21 |
| ≈2 | ≈22 |
| ≈3 | ≈23 |
| ≈20 | ≈0 |
Individuals, groups and stratum weights
W7: individuals and group means are different units. Prepared under the selected assumptions.
W7: individuals and group means are different units. Recorded coordinate units: X[X units],Y[Y units]. Observed groups=3; individual rows=6; actual group weights=n_g/n. Group-mean correlation uses each named group once.
Assumptions: The individual points are the declared finite record. Group means define a different observational unit. Empirical within-group moments use denominator n_g and group weights n_g/n. A distinct specified target mixture, if supplied, is not substituted silently for the observed row law.
Target: Individual, within-group and group-mean association, with the exact within/between covariance identity.
Reference experiment: Preserve group IDs, rows and counts. Compute all empirical means/covariances before normalizing into correlations.
Calibration: The result describes its actual observational unit and declared weights. Group adjustment or standardization is not by itself a causal identification argument.
| Original row | X [X units] | Y [Y units] |
|---|---|---|
| 1 | -4 | 0 |
| 2 | 0 | -4 |
| 3 | -2 | 2 |
| 4 | 2 | -2 |
| 5 | 0 | 4 |
| 6 | 4 | 0 |
| Quantity | Exact value / status | Approximate decimal | Units / meaning |
|---|---|---|---|
| All individuals pair count | 6 | ≈6 | pairs. Recorded pairs; not automatically independent units. |
| All individuals mean X | 0 | ≈0 | X units. Same complete pairs. |
| All individuals mean Y | 0 | ≈0 | Y units. Same complete pairs. |
| All individuals Sxx | 40 | ≈40 | X units squared. Sum of centered squared X deviations. |
| All individuals Syy | 40 | ≈40 | Y units squared. Sum of centered squared Y deviations. |
| All individuals Sxy | -8 | ≈-8 | X units × Y units. Paired centered product sum. |
| All individuals Pearson r | -1/5 | ≈-0.2 | dimensionless. Finite descriptive coefficient; no population, inference or causal model is supplied by the calculation. |
| All individuals Pearson r squared | 1/25 | ≈0.04 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| Within g1 Pearson | -1 | ≈-1 | dimensionless. Group-specific finite descriptor; a single/constant group does not acquire a defined correlation. |
| Within g1 Pearson squared | 1 | ≈1 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| Within g2 Pearson | -1 | ≈-1 | dimensionless. Group-specific finite descriptor; a single/constant group does not acquire a defined correlation. |
| Within g2 Pearson squared | 1 | ≈1 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| Within g3 Pearson | -1 | ≈-1 | dimensionless. Group-specific finite descriptor; a single/constant group does not acquire a defined correlation. |
| Within g3 Pearson squared | 1 | ≈1 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| Within-group covariance component | -4 | ≈-4 | X units × Y units. Σ(n_g/n) Cov_empirical(X,Y|g). |
| Between-mean covariance component | 8/3 | ≈2.66666666667 | X units × Y units. Covariance of group means using the actual individual-law weights n_g/n. |
| Total empirical covariance | -4/3 | ≈-1.33333333333 | X units × Y units. Within plus between; equals Sxy/n on all individual rows. |
| Within variance X component | 4 | ≈4 | X units squared. Empirical group moment with actual row weights. |
| Between variance X component | 8/3 | ≈2.66666666667 | X units squared. Variance of group means with actual row weights. |
| Total empirical variance X | 20/3 | ≈6.66666666667 | X units squared. Within plus between. |
| Within variance Y component | 4 | ≈4 | Y units squared. Empirical group moment with actual row weights. |
| Between variance Y component | 8/3 | ≈2.66666666667 | Y units squared. Variance of group means with actual row weights. |
| Total empirical variance Y | 20/3 | ≈6.66666666667 | Y units squared. Within plus between. |
| Equal-group-mean Pearson | 1 | ≈1 | dimensionless. Each named group contributes one mean; this is not the individual association. |
| Equal-group-mean Pearson squared | 1 | ≈1 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
Fractions and symbolic expressions retain exact declared calculations. Marked decimals and numeric axis ticks are finite approximations. The tables distinguish paired observations, specified population laws and inference under stated assumptions. A descriptive correlation or nominal confidence label does not establish a sampling design or coverage.
Exact pair, model, weights and calibration tables
| Group | Within-group row | X [X units] | Y [Y units] |
|---|---|---|---|
| g1 | 1 | -4 | 0 |
| g1 | 2 | 0 | -4 |
| g2 | 1 | -2 | 2 |
| g2 | 2 | 2 | -2 |
| g3 | 1 | 0 | 4 |
| g3 | 2 | 4 | 0 |
| Group | Individual count | Observed empirical weight | Specified target weight |
|---|---|---|---|
| g1 | 2 | 1/3 | not requested |
| g2 | 2 | 1/3 | not requested |
| g3 | 2 | 1/3 | not requested |
| X [X units] | Y [Y units] | Recorded multiplicity |
|---|---|---|
| -4 | 0 | 1 |
| 0 | -4 | 1 |
| -2 | 2 | 1 |
| 2 | -2 | 1 |
| 0 | 4 | 1 |
| 4 | 0 | 1 |
| X [X units] | Y [Y units] | Recorded multiplicity |
|---|---|---|
| -2 | -2 | 1 |
| 0 | 0 | 1 |
| 2 | 2 | 1 |
| Group | Mean X [X units] | Mean Y [Y units] | Within empirical covariance |
|---|---|---|---|
| g1 | -2 | -2 | -4 |
| g2 | 0 | 0 | -4 |
| g3 | 2 | 2 | -4 |
| Field | Declared value |
|---|---|
| xUnit | X units |
| yUnit | Y units |
| kind | groups |
| groups | [{"id":"g1","X":["-4","0"],"Y":["0","-4"]},{"id":"g2","X":["-2","2"],"Y":["2","-2"]},{"id":"g3","X":["0","4"],"Y":["4","0"]}] |
| targetWeights | null |
Finite values behind the scientific figures
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈0 | ≈4 |
| ≈4 | ≈0 |
| ≈2 | ≈6 |
| ≈6 | ≈2 |
| ≈4 | ≈8 |
| ≈8 | ≈4 |
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈2 | ≈2 |
| ≈4 | ≈4 |
| ≈6 | ≈6 |
Measurement, selection and causal models
W12: the same observations, different intervention means. Prepared under the selected assumptions.
W12: the same observations, different intervention means. Recorded coordinate units: X[X standard units],Y[Y standard units]. Model A:X=Ux,Y=(3/5)X+sqrt(1−rho²)Uy. Model B:Y=Uy,X=(3/5)Y+sqrt(1−rho²)Ux.
Assumptions: Ux,Uy are independent standard normals. Both specified models have the same centered Gaussian observational law with unit marginal variances and covariance rho. do(X=x) replaces the X equation. It is not conditioning on observed X. The observational conditional mean is rho*x in both models.
Target: The same full observational distribution can coexist with different intervention mean functions.
Reference experiment: Draw the shared actual Gaussian contour/support, then the two exact intervention mean functions. No pseudo-random points or fitted causal claim is added.
Calibration: Every conclusion uses the displayed structural or measurement assumptions. Observational association alone does not identify an intervention effect.
| Quantity | Exact value / status | Approximate decimal | Units / meaning |
|---|---|---|---|
| Shared observational covariance | 3/5 | ≈0.6 | standardized product units. Each observational variance is1. |
| Shared observational rho | 3/5 | ≈0.6 | dimensionless. This is a specified population parameter, not a sample estimate. |
| Shared observational conditional-mean slope | 3/5 | ≈0.6 | Y standard units/X standard units. E[Y|X=x]=rho*x in both supplied models. |
| Model A intervention-mean slope | 3/5 | ≈0.6 | Y standard units/X standard units. Replacing X propagates through the Y equation. |
| Model B intervention-mean slope | 0 | ≈0 | Y standard units/X standard units. The Y equation remains exogenous under do(X=x). |
Fractions and symbolic expressions retain exact declared calculations. Marked decimals and numeric axis ticks are finite approximations. The tables distinguish paired observations, specified population laws and inference under stated assumptions. A descriptive correlation or nominal confidence label does not establish a sampling design or coverage.
Exact pair, model, weights and calibration tables
| x [X standard units] | Shared E[Y|X=x] | Model A E[Y|do(X=x)] | Model B E[Y|do(X=x)] |
|---|---|---|---|
| -2 | -6/5 | -6/5 | 0 |
| 0 | 0 | 0 | 0 |
| 2 | 6/5 | 6/5 | 0 |
| Field | Declared value |
|---|---|
| xUnit | X standard units |
| yUnit | Y standard units |
| kind | causal |
| rho | 3/5 |
| halfWidth | 2 |
Finite values behind the scientific figures
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈2.4 | ≈2 |
| ≈2.3951847266722 | ≈2.07552454826697 |
| ≈2.38078528040323 | ≈2.14454342585484 |
| ≈2.35694033573221 | ≈2.2063919432429 |
| ≈2.32387953251129 | ≈2.26047446539884 |
| ≈2.28192126434835 | ≈2.30627014806981 |
| ≈2.23146961230255 | ≈2.34333795379721 |
| ≈2.17301045336274 | ≈2.37132089934856 |
| ≈2.10710678118655 | ≈2.38994949366117 |
| ≈2.03439328416365 | ≈2.39904433318838 |
| ≈1.9555702330196 | ≈2.3985178296538 |
| ≈1.871396736826 | ≈2.38837505357428 |
| ≈1.78268343236509 | ≈2.36871368542808 |
| ≈1.69028467725446 | ≈2.33972307493844 |
| ≈1.59509032201613 | ≈2.30168241753226 |
| ≈1.49801714032956 | ≈2.25495806553549 |
| ≈1.4 | ≈2.2 |
| ≈1.30198285967044 | ≈2.13733749714002 |
| ≈1.20490967798387 | ≈2.06757403111291 |
| ≈1.10971532274554 | ≈1.99138146223309 |
| ≈1.01731656763491 | ≈1.90949356658998 |
| ≈0.928603263174002 | ≈1.82269896938309 |
| ≈0.844429766980398 | ≈1.73183355003028 |
| ≈0.765606715836355 | ≈1.637772392192 |
| ≈0.692893218813452 | ≈1.54142135623731 |
| ≈0.626989546637263 | ≈1.44370835531327 |
| ≈0.568530387697455 | ≈1.34557441903415 |
| ≈0.518078735651645 | ≈1.24796463085179 |
| ≈0.476120467488713 | ≈1.1518190263853 |
| ≈0.443059664267791 | ≈1.05806354036424 |
| ≈0.419214719596769 | ≈0.967601089370964 |
| ≈0.404815273327803 | ≈0.88130287626033 |
| ≈0.4 | ≈0.8 |
| ≈0.404815273327803 | ≈0.724475451733033 |
| ≈0.419214719596769 | ≈0.655456574145159 |
| ≈0.443059664267791 | ≈0.593608056757105 |
| ≈0.476120467488713 | ≈0.539525534601156 |
| ≈0.518078735651645 | ≈0.493729851930189 |
| ≈0.568530387697454 | ≈0.456662046202791 |
| ≈0.626989546637263 | ≈0.428679100651441 |
| ≈0.692893218813452 | ≈0.410050506338833 |
| ≈0.765606715836354 | ≈0.400955666811623 |
| ≈0.844429766980398 | ≈0.401482170346202 |
| ≈0.928603263174002 | ≈0.411624946425717 |
| ≈1.01731656763491 | ≈0.431286314571916 |
| ≈1.10971532274554 | ≈0.460276925061555 |
| ≈1.20490967798387 | ≈0.498317582467738 |
| ≈1.30198285967044 | ≈0.545041934464506 |
| ≈1.4 | ≈0.6 |
| ≈1.49801714032956 | ≈0.662662502859978 |
| ≈1.59509032201613 | ≈0.732425968887093 |
| ≈1.69028467725446 | ≈0.80861853776691 |
| ≈1.78268343236509 | ≈0.890506433410025 |
| ≈1.871396736826 | ≈0.977301030616914 |
| ≈1.9555702330196 | ≈1.06816644996972 |
| ≈2.03439328416365 | ≈1.162227607808 |
| ≈2.10710678118655 | ≈1.25857864376269 |
| ≈2.17301045336274 | ≈1.35629164468673 |
| ≈2.23146961230255 | ≈1.45442558096585 |
| ≈2.28192126434835 | ≈1.55203536914821 |
| ≈2.32387953251129 | ≈1.6481809736147 |
| ≈2.35694033573221 | ≈1.74193645963576 |
| ≈2.38078528040323 | ≈1.83239891062904 |
| ≈2.3951847266722 | ≈1.91869712373967 |
| ≈2.4 | ≈2 |
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈0 | ≈0.56 |
| ≈2.8 | ≈2.24 |
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈0 | ≈0 |
| ≈4 | ≈2.4 |
| Horizontal coordinate (approximate) | Vertical value (approximate) |
|---|---|
| ≈0 | ≈1.2 |
| ≈4 | ≈1.2 |
Independent information and coherent matrices
W11: valid local pair calculations need not make a joint matrix. The displayed symmetric unit-diagonal entries are not positive semidefinite and cannot be one common correlation law. No nearest-matrix repair or imputation is applied.
Method result held: The displayed symmetric unit-diagonal entries are not positive semidefinite and cannot be one common correlation law. No nearest-matrix repair or imputation is applied.
W11: valid local pair calculations need not make a joint matrix. Recorded coordinate units: X[X units],Y[Y units]. Recorded rows=6; pairwise deletion uses each pair's own complete subset, means and spreads.
Assumptions: The six/finite rows are actual declared hypothetical records with literal missing cells, not a completed synthetic cloud. A common complete-row correlation matrix has the Gram PSD property. Pairwise deletion can combine different selected subsets/populations; it does not supply a missingness model.
Target: Visible missing cells and pairwise coefficients versus coherence of a proposed common joint matrix.
Reference experiment: Preserve null cells, use pair-specific complete rows and means, and do not impute or repair an indefinite matrix.
Calibration: Sample size, independent information, sampling-model assumptions and joint-matrix coherence are separate requirements.
| Quantity | Exact value / status | Approximate decimal | Units / meaning |
|---|---|---|---|
| XY complete-pair count | 2 | ≈2 | pairs. Actual subset size; two-point endpoints are descriptive and do not justify a t reference. |
| XY pairwise correlation | 1 | ≈1 | dimensionless. Computed from that pair’s own complete rows. |
| XY pairwise correlation squared | 1 | ≈1 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| XZ complete-pair count | 2 | ≈2 | pairs. Actual subset size; two-point endpoints are descriptive and do not justify a t reference. |
| XZ pairwise correlation | 1 | ≈1 | dimensionless. Computed from that pair’s own complete rows. |
| XZ pairwise correlation squared | 1 | ≈1 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| YZ complete-pair count | 2 | ≈2 | pairs. Actual subset size; two-point endpoints are descriptive and do not justify a t reference. |
| YZ pairwise correlation | -1 | ≈-1 | dimensionless. Computed from that pair’s own complete rows. |
| YZ pairwise correlation squared | 1 | ≈1 | dimensionless. Exact squared normalized covariance; no causal or inferential interpretation is added. |
| Correlation-matrix determinant | -4 | ≈-4 | dimensionless. Exact1+2abc−a²−b²−c². |
| Exact determinant sign | -1 | ≈-1 | sign. Zero is distinguished from positive/negative before finite conversion. |
| Negative quadratic-form witness | -3 | ≈-3 | dimensionless. For vector(-1,1,1),a^T R a<0 refutes PSD. |
Fractions and symbolic expressions retain exact declared calculations. Marked decimals and numeric axis ticks are finite approximations. The tables distinguish paired observations, specified population laws and inference under stated assumptions. A descriptive correlation or nominal confidence label does not establish a sampling design or coverage.
Exact pair, model, weights and calibration tables
| Row | X [X units] | Y [Y units] | Z [Z units] |
|---|---|---|---|
| 1 | 0 | 0 | missing |
| 2 | 1 | 1 | missing |
| 3 | 0 | missing | 0 |
| 4 | 1 | missing | 1 |
| 5 | missing | 0 | 1 |
| 6 | missing | 1 | 0 |
| Vector | a^T R a |
|---|---|
| (-1,1,1) | -3 |
| Entry | Exact value / status | Approximate value |
|---|---|---|
| XX | 1 | 1 |
| XY | 1 | ≈1 |
| XZ | 1 | ≈1 |
| YZ | -1 | ≈-1 |
| YY | 1 | 1 |
| ZZ | 1 | 1 |
| Field | Declared value |
|---|---|
| xUnit | X units |
| yUnit | Y units |
| kind | missing |
| rows | [["0","0",null],["1","1",null],["0",null,"0"],["1",null,"1"],[null,"0","1"],[null,"1","0"]] |
| zUnit | Z units |
Worked examples
Compute the paired-data coefficient
For x=(1,2,3,4) and y=(1,3,2,5), find the means, centered sums, Pearson r and r² as descriptive quantities.
- The means are x̄=10/4=5/2 and ȳ=11/4. Centering uses these same four complete pairs for both coordinates.
- Summing squared deviations gives Sxx=5 and Syy=35/4. Summing paired centered products gives Sxy=11/2.
- Therefore r=(11/2)/√(5·35/4)=11/√175≈0.8315218406. Squaring gives r²=121/175.
- These are finite-record summaries. No sampling distribution or causal conclusion follows merely from obtaining this positive coefficient.
r=11/√175≈0.83152184 and r²=121/175.
Track a negative and a positive scale change
Transform the preceding pairs by x′=5−2x and y′=100+3y. Find the transformed centered sums and correlation.
- The transformed means are 5−2(5/2)=0 and 100+3(11/4)=433/4. Offsets cancel from centered deviations.
- Sxx′=4·5=20,Syy′=9·35/4=315/4, and Sxy′=(−2)·3·11/2=−33.
- The denominator multiplies by |−2·3|=6, while the numerator multiplies by −6. Thus r′=−11/√175≈−0.8315218406 and r′²=121/175.
- The sign reversal comes from the coding of one coordinate. Both original spreads were nonzero and both multipliers are nonzero, so the normalization remains defined.
The transformed correlation reverses sign and retains its squared magnitude.
Calculate zero correlation with deterministic dependence
Let X∼Uniform(−1,1) and Y=X². Find Pearson ρ and determine whether the variables are independent.
- Symmetry gives E[X]=0 and E[X³]=0. Integration gives E[X²]=1/3 and E[X⁴]=1/5.
- Thus Cov(X,Y)=E[X³]−E[X]E[X²]=0, Var(X)=1/3 and Var(Y)=1/5−1/9=4/45.
- Both variances are finite and positive, so ρ=0. However Y is exactly X² and is not constant, so the variables are dependent.
- The joint law lies on a parabola and does not need an ordinary two-dimensional density for these moments or the correlation to be defined. Inferring a causal response would require an additional structural assumption, rather than this moment calculation alone.
ρ=0 with genuine dependence; Var(X)=1/3 and Var(Y)=4/45.
Compare raw and ranked versions of one curve
For pairs x=(1,2,3,4), y=(1,4,9,16), compute Pearson and Spearman correlations.
- The raw means are 5/2 and 15/2. Centered sums are Sxx=5,Syy=129,Sxy=25.
- Pearson r=25/√645≈0.9843740387, with r²=125/129. The raw values are not affine-collinear, so the coefficient is below one.
- Both separate rank lists are (1,2,3,4). Their rank-Pearson correlation is exactly one.
- The difference distinguishes linear co-movement from perfectly increasing order. It does not imply that either calculation detects every nonlinear association or establishes a causal response.
Pearson r=25/√645; Spearman rₛ=1.
The untied shortcut changes the answer
Use average ranks for X=(1,1,2,3),Y=(1,2,2,3). Find Spearman correlation and compare the untied shortcut.
- The rank lists are (3/2,3/2,3,4) and (1,5/2,5/2,4), each with mean 5/2.
- Their centered squared sums are both 9/2 and centered product sum is 15/4. Thus their Pearson correlation is 5/6.
- The squared rank differences sum to 3/2. Substitution into the no-tie shortcut gives 1−6(3/2)/(4·15)=17/20.
- That shortcut used untied squared-rank sums, which these tied lists do not have. The general rank-Pearson definition with the declared average-rank convention gives the correct value.
rₛ=5/6; the inapplicable untied shortcut returns 17/20.
Retain the unusual observation in the comparison
Begin with pairs (0,0),(1,1),(2,2),(3,3), then add (20,−20). Compute Pearson and Spearman after the addition and compare with the original values.
- The original four pairs give both coefficients one. In the five-pair record, means are 26/5 and −14/5, and centered sums are Sxx=1394/5,Syy=1874/5,Sxy=−1566/5.
- Thus Pearson r=−1566/√(1394·1874)≈−0.9688924630, with r²=613089/653089.
- The rank lists are X ranks (1,2,3,4,5) and Y ranks (2,3,4,5,1). Both have centered squared sum 10, while their centered product sum is zero, giving Spearman zero.
- The raw coefficient reverses and the rank summary also changes substantially. This is a hypothetical sensitivity analysis; a scientific reason and transparent rule are needed before removing the added point, rather than choosing a coefficient one prefers.
After addition, Pearson is about −0.96889246 and Spearman is zero; the original two coefficients were one.
Aggregation changes the unit and the coefficient
Three equal-sized groups have individual pairs (−4,0),(0,−4); (−2,2),(2,−2); and (0,4),(4,0). Compare within-group, overall individual and group-mean correlations.
- Each group’s two deviations from its own mean are (−2,2),(2,−2), so its descriptive correlation is −1. The group means are (−2,−2),(0,0),(2,2), whose correlation is 1.
- Across all six individuals the coordinate means are zero. Sxx=Syy=40 and Sxy=−8, giving r=−8/40=−1/5.
- Using equal-row empirical moments, the within covariance is −4, between-mean covariance 8/3 and total covariance −4/3. Each total variance is 20/3; normalization again yields −1/5.
- These are descriptions at different units. Averaging subgroup correlations or interpreting the three-mean coefficient as an individual association would discard the required variance components and target weighting.
Within groups −1; overall individuals −1/5; group means 1.
Keep the denominators and target mix
In an easy stratum, A succeeds 9/10 and B 16/20. In a hard stratum, A succeeds 6/20 and B 2/10. Compare conditional rates, pooled rates and rates standardized to equal stratum weights.
- The easy rates are A=0.9,B=0.8; hard rates A=0.3,B=0.2. A is higher in both strata.
- Pooling each setting’s actual counts gives A=15/30=1/2 and B=18/30=3/5. A includes two-thirds hard records, while B includes only one-third hard records.
- With common weights one-half easy and one-half hard, A becomes (0.9+0.3)/2=3/5 and B becomes (0.8+0.2)/2=1/2.
- The pooled binary correlation between the A indicator and success is −1/√99. Standardization describes a chosen target mix; a causal interpretation additionally needs a valid adjustment set and the relevant identification assumptions.
Pooled A=1/2<B=3/5; standardized A=3/5>B=1/2. The weighting, not an arithmetic contradiction, explains the reversal.
Separate covariance from marginal spread
Latent X,Y have finite unit variances and correlation 3/4. Observe X*=X+U, where U is independent mean-zero error of variance 3. Find Corr(X*,Y).
- Unit variances make latent covariance 3/4. Independence of U from the latent pair gives Cov(U,Y)=0, so observed covariance remains 3/4.
- Var(X*)=Var(X)+Var(U)=1+3=4, while Var(Y)=1. The product of observed standard deviations is 2.
- The observed correlation is (3/4)/2=3/8. The reliability factor for X is 1/4, whose square root halves the original coefficient.
- The attenuation conclusion uses this finite-variance independent additive error model. Correlated or differential errors need different covariance calculations, and an error correction requires additional validation information.
Observed correlation 3/8 under the stated classical measurement model.
More rows can leave all independent information unchanged
Repeat each of the first example’s four pairs three times. Compare the descriptive r and the numerical Pearson-null t formula evaluated naively at n=4 and n=12. Explain the independence issue.
- Equal replication leaves the coordinate means unchanged and multiplies all three centered sums by three. Thus r remains 11/√175≈0.8315218406.
- At n=4, the t expression is r√[2/(1−r²)]=11/√27≈2.1169509870. Its ordinary reference interpretation would require the iid bivariate-normal null assumptions for the original pairs.
- Pretending the copies give n=12 yields r√[10/(1−r²)]≈4.7336463120, exactly √5 times the original numerical expression.
- The twelve rows are not independent observations: each source pair has been copied. The larger-n calibration is therefore invalid for this design. Neither the unchanged r nor a smaller naive p-value creates new independent information.
r is unchanged; the naive t expression is inflated by √5 through false counting of copies.
Keep the missing cells visible
Rows (A,B,C) are (0,0,missing),(1,1,missing),(0,missing,0),(1,missing,1),(missing,0,1),(missing,1,0). Compute pairwise-deletion correlations and test whether their matrix can be one common correlation matrix.
- The complete AB rows are (0,0),(1,1), giving rAB=1. The complete AC rows are also (0,0),(1,1), giving rAC=1.
- The complete BC rows are (0,1),(1,0), giving rBC=−1. The proposed symmetric matrix is [[1,1,1],[1,1,−1],[1,−1,1]].
- Its determinant is −4, so it is not positive semidefinite. Equivalently, common jointly standardized variables with rAB=rAC=1 would have to agree almost surely, forcing rBC=1 rather than −1.
- Each local two-row calculation is descriptive arithmetic on its selected subset. They do not form a coherent common joint covariance law, and their n=2 values do not support an ordinary Pearson-null t inference.
Pairwise entries (1,1,−1) produce determinant −4 and no coherent common correlation matrix.
Intervene on equations rather than condition on a correlation
Let Ux,Uy be independent standard normals. Compare Model A: X=Ux,Y=(3/5)X+(4/5)Uy, and Model B: Y=Uy,X=(3/5)Y+(4/5)Ux. Find their observational law and E[Y|do(X=x)].
- In Model A, Var(X)=1,Var(Y)=9/25+16/25=1 and Cov(X,Y)=3/5. Model B has the same means, variances and covariance.
- Both are linear transformations of independent Gaussian exogenous variables, so their complete centered bivariate-normal observational laws agree. Both have Pearson correlation 3/5 and observational conditional mean E[Y|X=x]=(3/5)x.
- An intervention do(X=x) replaces the X equation. In A it propagates to Y, giving mean (3/5)x. In B it leaves exogenous Y=Uy unchanged, giving mean zero.
- Thus the intervention slope is 3/5 in A and zero in B. Additional causal assumptions or intervention/design information are needed to distinguish these explanations; knowing the observational joint law exactly is insufficient.
Same observational correlation and full law; causal intervention slopes 3/5 and zero under the respective structural models.
Try it yourself
One coordinate is constant in every observation. What is the sample Pearson coefficient?
Show the answer and reasoning
Undefined.
Its centered sum of squares is zero, so the normalization denominator vanishes. A horizontal or vertical set of points does not produce a computed coefficient of zero.
X is uniform on {−1,0,1}, and Y=X². Find population Pearson correlation and determine independence.
Show the answer and reasoning
ρ=0, with dependence.
E[X]=E[X³]=0, Var(X)=2/3 and Var(Y)=2/9. Covariance is zero, but nonconstant Y is determined by X. The moments meet Pearson’s finite positive-variance conditions.
Multiply X by −3 and Y by −4, with both original spreads positive. What happens to Pearson correlation?
Show the answer and reasoning
It is unchanged.
The covariance multiplier is positive 12 and the denominator multiplier is |12|. Two sign reversals cancel. A zero multiplier would instead destroy the required spread and make the coefficient undefined.
Use divisor n rather than n−1 consistently in covariance and both variances on the same complete pairs. Does sample r change?
Show the answer and reasoning
No.
The common divisor cancels between the numerator and the product of standard deviations. This is a finite algebra identity. Mixing conventions or using different pair subsets does not give that identity.
For pairs (1,3),(2,2),(3,1), find sample Pearson and Spearman correlations.
Show the answer and reasoning
Both equal −1.
The raw points follow a nonconstant decreasing affine line. Their ranks are also exactly reversed with positive rank spreads, so both normalized centered-vector products are −1.
Every value in one coordinate belongs to one tied block. What is average-rank Spearman correlation?
Show the answer and reasoning
Undefined.
The coordinate’s average ranks are all equal, giving zero rank variance. Inventing an arbitrary ordering within that block would create information not supplied by the observed values.
For untied ranks X=(1,2,3,4),Y=(1,3,2,4), find Spearman correlation.
Show the answer and reasoning
4/5.
The squared rank differences sum to 2. Since both lists are complete untied ranks, the shortcut applies: 1−6·2/[4(4²−1)]=4/5. The tied-list example requires the general rank-Pearson definition instead.
A finite sample from Cauchy marginal variables gives a defined finite sample r. Does that establish a population Pearson ρ?
Show the answer and reasoning
No.
Population Pearson requires finite positive variances, which Cauchy marginals lack. Finite-record arithmetic does not supply those moments. With continuous marginals, population Spearman based on bounded uniform CDF transforms can still be defined.
Latent variables have finite unit variances and correlation 3/5. Add independent mean-zero error of variance 8 to X only. Find the observed correlation.
Show the answer and reasoning
1/5.
Covariance remains 3/5, while observed X variance is 9 and Y variance is 1. Divide by the standard-deviation product 3. The result uses the declared independent additive-error model.
Under Y=X+ε with independent mean-zero noise variance one, compare correlation for Var(X)=4 and Var(X)=1/4.
Show the answer and reasoning
2/√5 and 1/√5 respectively.
Use ρ=√[v/(v+1)] with finite positive v. The conditional mean slope remains one in this model while predictor spread changes. Other selection schemes need their actual joint-law calculation.
Let X=C+U,Y=C+V with independent mean-zero terms, Var(C)=2 and Var(U)=Var(V)=1. Find correlation and the effect on Y of intervening on X in this structural model.
Show the answer and reasoning
Correlation 2/3; intervention effect zero.
The shared C gives covariance 2 and each total variance is 3. Replacing the equation for X does not change the equation for Y, so its intervention mean remains unchanged. That causal conclusion uses the explicitly supplied structure.
Independent Bernoulli-half variables X,Y are retained only when at least one equals one. Find their selected correlation.
Show the answer and reasoning
−1/2.
The three retained outcomes are equally likely. Each mean is 2/3 and variance 2/9; E[XY]=1/3 gives covariance −1/9. Dividing produces −1/2, illustrating dependence introduced by conditioning on a common effect.
A symmetric proposed correlation matrix has unit diagonal and off-diagonals (4/5,4/5,−4/5). Can it represent one jointly defined finite-variance correlation law?
Show the answer and reasoning
No; determinant −243/125.
For off-diagonals a,b,c the determinant is 1+2abc−a²−b²−c². Here it is negative. Individual entries in [−1,1] are necessary but do not establish the required positive-semidefinite joint matrix.
A ten-pair record with 0<|r|<1 is copied five times. By what factor does the naive iid Pearson-null t expression change?
Show the answer and reasoning
√6.
The descriptive r stays unchanged. The numerical formula multiplies by √[(50−2)/(10−2)]=√6, although no independent information was added. The restrictions make both original numerical expressions finite and the ratio defined.
For observed r=3/5 and n=12, calculate the ordinary Pearson-null t expression and degrees of freedom. State its exact reference conditions.
Show the answer and reasoning
T=3√10/4, with 10 degrees of freedom.
Insert r into r√[(n−2)/(1−r²)]=(3/5)√(10/(16/25)). Exact t calibration requires iid bivariate-normal pairs under ρ=0 with positive variances. A coefficient and row count alone do not establish those conditions.
Under iid bivariate-normal sampling, n=100 and observed r=0.5, give the approximate Fisher-z 95% interval.
Show the answer and reasoning
Approximately [0.33664330,0.63413984].
Transform with atanh(0.5), use SE 1/√97 and the normal 0.975 quantile, then back-transform with tanh. This is an asymptotic interval under its model, not a universal exact interval or a generic Spearman/clustered-data formula.
Four untied pairs have sample Spearman one. Under an exchangeable independence permutation null, find the exact absolute two-sided p-value.
Show the answer and reasoning
1/12.
There are 4!=24 equal rank permutations. Only identical and reversed ordering have absolute coefficient one, giving 2/24. This tests the specified independence/exchangeability null, rather than every possible dependent law with population rank correlation zero.
Twenty variables are searched through every distinct pairwise association test. How many tests are in that declared family and what is the Bonferroni threshold at 0.05?
Show the answer and reasoning
190 tests and threshold 1/3800.
There are C(20,2)=190 pairs. Dividing 1/20 by 190 gives 1/3800. The family guarantee still requires valid individual tests under the actual design, and the report should retain the full search rather than only selected large coefficients.
What to carry forward
- Define the paired unit, target population, variables, units and selection process. A scatterplot and design record give context that one coefficient cannot supply.
- Pearson correlation requires finite positive population variances; sample r requires finite complete pairs with positive centered sums. Its cosine geometry supplies bounds and affine properties.
- Zero correlation does not generally mean independence. Spearman describes rank ordering, with explicit tie conventions and a continuous-marginal population parameter, but also misses some dependence.
- Influence, restricted range, grouping, selection and measurement can change the coefficient or its scientific target. Correlation is not an average of subgroup correlations.
- Exact or approximate inference needs its joint sampling assumptions and real independent units. Duplicates and dependent rows do not create precision by increasing a count.
- Missingness can alter the selected population, and pairwise-deletion entries need not form a coherent positive-semidefinite joint matrix.
- Observational association, predictive slopes and intervention effects remain distinct. Causal identification needs additional scientific structure or design, even when the observational law is known.
References
Sources for the concepts and teaching approaches in this article.
- Covariance and CorrelationKyle Siegrist; Random ServicesAuthor open textbook
Philip B. Stark; University of California, Berkeley2 sources
- Scatter PlotNIST/SEMATECHOfficial handbook
- Copulas, Section8.5.2 Spearman’s Correlation CoefficientDavid Ruppert; original textbook chapter hosted by University of WashingtonAuthor textbook chapter · PDF
- The Effects of InterventionsJudea Pearl, Madelyn Glymour, Nicholas P. Jewell; UCLA author-hosted previewAuthor book preview · PDF
- Berkson’s bias, selection bias, and missing dataDaniel Westreich; original methodological paperOriginal methodological paper