Run 2 Regression Step-by-Step (Actual Data)

This walkthrough uses the real 66-pair Run 2 data behind the regression chart.

n = 66 pairs R^2 = 0.203509 Baseline coherence = 18.1743

What each plotted point means

Each point is one pair with:

For Run 2, each pair's y is calculated as:

coherence loss = baseline coherence - ((coherence1 + coherence2) / 2)

Step 1: Collect all x and y values

  • x values: all 66 sigma values
  • y values: all 66 coherence-loss values
Measure Value
x minimum0.000000
x maximum0.944977
y minimum2.895850
y maximum17.174300

Step 2: Compute means

x-bar = 0.5843207121
y-bar = 13.0142000000

Step 3: Compute deviations for each point

For each of the 66 points:

dx = x - x-bar
dy = y - y-bar

Step 4: Build top and bottom totals

Top total (numerator):

sum(dx * dy) = -32.5859977319

Bottom total (denominator):

sum(dx^2) = 5.8642655921

Step 5: Slope (easy arithmetic version)

  • top total = -32.5859977319
  • bottom total = 5.8642655921
slope = top / bottom = -32.5859977319 / 5.8642655921 = -5.5567056472

Rounded slope used in docs: -5.5567

Step 6: Intercept (easy arithmetic version)

Use y-bar, x-bar, and slope:

slope * x-bar = -5.5567056472 * 0.5843207121 = -3.2468982008
intercept = y-bar - (slope * x-bar) = 13.0142 - (-3.2468982008) = 16.2610982008

Rounded intercept used in docs: 16.2611

Step 7: Final regression line

y-hat = 16.2611 - 5.5567 * sigma

Equivalent notation:

Loss = -5.5567 sigma + 16.2611

Quick real-data check

At sigma = 0.000000: predicted loss = 16.2611
At sigma = 0.944977: predicted loss ≈ 16.2611 - 5.5567 * 0.944977 ≈ 11.01

Why points do not all sit on the line

The regression line is the one straight line that minimizes total squared vertical error across all 66 points. It captures average trend, not every individual point.

Source values used (Run 2)