STATISTICSStatisticsMathematics Calculator
📊

Scatter Plot & Correlation

A scatter plot shows x,y pairs. Pearson correlation r measures linear relationship (-1 to 1). The best-fit line y=mx+b minimizes squared errors; R² = r².

Concept Fundamentals
-1 to 1
Pearson r
Variance explained
y = mx + b
Best-fit
No correlation
r = 0

Did our AI summary help? Let us know.

r = 1: perfect positive correlation; r = -1: perfect negative. R² is the proportion of variance in y explained by x. Correlation does not imply causation.

Key quantities
-1 to 1
Pearson r
Key relation
Variance explained
Key relation
y = mx + b
Best-fit
Key relation
No correlation
r = 0
Key relation

Ready to run the numbers?

Why: Scatter plots reveal relationships—height vs weight, study time vs grade, price vs demand.

How: Enter x,y pairs; the calculator computes Pearson r, best-fit line, and R².

r = 1: perfect positive correlation; r = -1: perfect negative.R² is the proportion of variance in y explained by x.

Run the calculator when you are ready.

Correlation & RegressionVisualize relationships
📊

Scatter Plot — Correlation & Regression

Enter x,y data pairs. Get scatter plot, Pearson correlation, best-fit line, and R². Comma or space separated.

Quick Examples — Click to Load

Input — X,Y Data Pairs

One pair per line or comma/space separated. Format: x,y (e.g. 1,3 or 1 3)

At least 2 data points required. Use format: x,y per line (e.g. 1,3 or 1 3)

For educational and informational purposes only. Verify with a qualified professional.

🧮 Fascinating Math Facts

📊

Pearson r measures linear relationship; r=0 means no linear correlation.

📐

R² = r²—the proportion of variance in y explained by x.

Key Takeaways

  • • Scatter plots visualize the relationship between two variables (x and y)
  • • Pearson r ranges from -1 (perfect negative) to +1 (perfect positive); 0 means no linear correlation
  • • R² (coefficient of determination) = proportion of variance in y explained by x
  • • Best-fit line: y = mx + b (least squares regression)

Did You Know?

📊Correlation does not imply causation. Two variables can be correlated due to a third factor.Source: Statistics
📈R² = 0.75 means 75% of the variation in y is explained by the linear relationship with x.Source: Regression
🎯Outliers can strongly affect Pearson r. Spearman correlation uses ranks and is more robust.Source: Robust Stats
📐The best-fit line minimizes the sum of squared vertical distances from points to the line.Source: Least Squares

How It Works

Enter x,y pairs (one per line or comma-separated). The calculator computes Pearson correlation, fits a least-squares regression line, and reports R². Outliers are detected using distance from the regression line (mean + 2×SD).

Pearson r formula

r = [nΣxy − ΣxΣy] / √[(nΣx² − (Σx)²)(nΣy² − (Σy)²)]

Best-fit line

Slope m = [nΣxy − ΣxΣy] / [nΣx² − (Σx)²], Intercept b = (Σy − mΣx) / n

Expert Tips

Data format

Use x,y per line: 1,3 or 1 3. Multiple formats: 1,3 2,5 3,7 or one pair per line.

Outliers

Points far from the regression line may be outliers. Verify they are not data errors before removing.

Non-linear data

Pearson r measures linear correlation. For curved relationships, consider polynomial or other models.

Sample size

At least 10–30 points recommended for reliable correlation. Small samples can produce misleading r.

Correlation Strength Comparison

|r| RangeInterpretation
0.9 – 1.0Very strong
0.7 – 0.9Strong
0.5 – 0.7Moderate
0.3 – 0.5Weak
0.0 – 0.3Very weak / None

FAQ

What data format do I use?

Enter x,y pairs. One pair per line (e.g. 1,3) or comma/space separated (e.g. 1,3 2,5 3,7).

What does R² mean?

R² is the proportion of variance in y explained by x. R²=0.9 means 90% of y variation is explained by the linear fit.

Does correlation imply causation?

No. Correlation shows association, not cause. A third variable or coincidence can produce correlation.

How are outliers detected?

Points with distance from the regression line greater than mean + 2×SD of distances are flagged as potential outliers.

When is Pearson r appropriate?

For linear relationships with roughly normal distributions. For non-linear or ordinal data, consider Spearman correlation.

Infographic Stats

r = ±1
Perfect correlation
r = 0
No linear correlation
Variance explained
n ≥ 30
Recommended min

Official Sources

Disclaimer: This tool is for educational and exploratory analysis. Correlation does not imply causation. For formal statistical inference, consult a statistician or use specialized software.

👈 START HERE
⬅️Jump in and explore the concept!
AI

Related Calculators