Worked Example of Pair Correlation (Explained with Assumptions)

Pair correlation worked example with explicit assumptions and limitations.

Direct answer

Pair correlation (often referring to the correlation between two return series) is a numerical measure of how two variables tend to move together. In practice, you compute a correlation coefficient from a set of paired observations (for example, returns of two currency pairs) collected over the same dates and intervals. A worked example clarifies the steps, but the calculation always depends on assumptions such as the time window, how returns are defined, and what data cleaning rules are used.

Mechanism and definition (what you actually compute)

To compute a worked example of pair correlation, you need two equal-length series of numbers:

  • Series A: X₁, X₂, …, Xₙ (often returns for instrument A)
  • Series B: Y₁, Y₂, …, Yₙ (often returns for instrument B)

A common choice is the Pearson correlation coefficient, defined as the standardized covariance of A and B:

corr(A,B) = Σ[(Xᵢ − mean(X)) (Yᵢ − mean(Y))] / [ (n−1) × std(X) × std(Y) ]

Where:

  • mean(X) is the arithmetic average of Xᵢ
  • std(X) is the sample standard deviation of Xᵢ (similarly for Y)

Interpretation (general):

  • corr ≈ +1: they move together in the same direction
  • corr ≈ −1: they tend to move in opposite directions
  • corr ≈ 0: no linear relationship is evident from the sample

Worked evidence: a fully transparent numerical scenario

Assume you already converted price data into returns using a specific rule, and you choose a 5-period window. To keep the example concrete, use these return series (assumption: they are synchronized by date and interval):

  • X returns (instrument A): [0.01, 0.02, −0.01, 0.00, 0.01]
  • Y returns (instrument B): [0.005, 0.015, −0.005, 0.002, 0.008]

Assumptions for this worked example:

  1. Returns are already computed (we do not define the price-to-return formula here).
  2. Both series are measured over the same five timestamps.
  3. We use Pearson correlation with sample standard deviations (the denominator uses n−1).
  4. No missing observations exist in either series.

Step 1: Compute means. mean(X) = (0.01+0.02−0.01+0.00+0.01)/5 = 0.006 mean(Y) = (0.005+0.015−0.005+0.002+0.008)/5 = 0.005

Step 2: Compute deviations and products. For each i:

  • i1: (X−mean) = 0.004; (Y−mean) = 0.000 → product = 0
  • i2: (X−mean) = 0.014; (Y−mean) = 0.010 → product = 0.00014
  • i3: (X−mean) = −0.016; (Y−mean) = −0.010 → product = 0.00016
  • i4: (X−mean) = −0.006; (Y−mean) = −0.003 → product = 0.000018
  • i5: (X−mean) = 0.004; (Y−mean) = 0.003 → product = 0.000012

Sum of products = 0 + 0.00014 + 0.00016 + 0.000018 + 0.000012 = 0.00033

Step 3: Compute sample standard deviations. std(X) = sqrt( Σ(X−mean)² / (n−1) )

  • Σ(X−mean)² = 0.004² + 0.014² + (−0.016)² + (−0.006)² + 0.004² = 0.000016 + 0.000196 + 0.000256 + 0.000036 + 0.000016 = 0.00052 So std(X) = sqrt(0.00052 / 4) = sqrt(0.00013) ≈ 0.01140

std(Y) = sqrt( Σ(Y−mean)² / (n−1) )

  • Σ(Y−mean)² = 0.000² + 0.010² + (−0.010)² + (−0.003)² + 0.003² = 0 + 0.0001 + 0.0001 + 0.000009 + 0.000009 = 0.000218 So std(Y) = sqrt(0.000218 / 4) = sqrt(0.0000545) ≈ 0.00738

Step 4: Compute correlation. Using the formula with (n−1): Cov(A,B) (sample) = 0.00033 / (n−1) = 0.00033 / 4 = 0.0000825 corr(X,Y) = Cov / (std(X)×std(Y)) corr ≈ 0.0000825 / (0.01140 × 0.00738) Denominator ≈ 0.0000841 corr ≈ 0.98

So in this specific scenario (with all stated assumptions), the pair correlation is close to +1, meaning the two return series are strongly positively linearly related over the five periods.

Limitations and risks (what correlation can fail to capture)

  1. Instability over time: correlation computed from a short or specific window can differ substantially if you change the time period or sampling interval. Even if the two series look correlated in the past, the relationship can weaken or reverse. 2) Sensitivity to the exact definition of returns: different return formulas or handling of outliers can change Xᵢ and Yᵢ, which changes the computed correlation.
Trading foreign exchange and CFDs involves substantial risk. Information on FoxiForex is educational and is not personal financial advice. Sponsored placements are labelled clearly.