Interactive Scatter Plot & Linear Regression Maker

Analyze bivariate correlation, Pearson r coefficients, and best-fit regression lines

Chart Headers & Labels

XY Coordinate Pairs

7 Points
#X CoordinateY Coordinate

Regression & Plot Settings

Pearson Correlation (r)+0.96
R-Squared (R²)0.92
Regression Equationy = 8.24x + 35.1
Correlation StrengthStrong Positive
Statistical & Bivariate Data Manual

The Complete Guide to Scatter Plots & Linear Regression

Explore bivariate data relationships, Pearson correlation formulas (r), ordinary least squares regression (y = mx + b), and outlier detection.

What is a Scatter Plot (XY Graph)?

A scatter plot (also known as a scatter graph, scattergram, or scatter chart) is a mathematical diagram using Cartesian coordinates to display values for two continuous variables across a set of data. Each point placed on the canvas represents a single observation that possesses both an X value (independent variable) and a Y value (dependent variable).

Scatter plots are the primary diagnostic tool in statistics, data science, and scientific research for assessing whether a relationship, pattern, or correlation exists between two quantitative phenomena (such as height vs. weight, study hours vs. exam grades, or engine size vs. fuel efficiency).

Mathematical Foundations: Pearson r and Linear Regression

When analyzing bivariate data points (x_1, y_1), (x_2, y_2), ..., (x_n, y_n), statisticians compute two core mathematical metrics:

1. Pearson Correlation Coefficient (r)

Measures the linear association strength between X and Y on a scale from -1.0 to +1.0:

r = ∑(x - x̄)(y - ȳ) / √[∑(x - x̄)² ∑(y - ȳ)²]
  • r = +1.0: Perfect positive linear relationship.
  • r = -1.0: Perfect negative linear relationship.
  • r = 0.0: No linear correlation.

2. Ordinary Least Squares (OLS) Line

Calculates the best-fit line y = mx + b that minimizes squared vertical residuals:

m = ∑(x - x̄)(y - ȳ) / ∑(x - x̄)²
b = ȳ - m · x̄

The coefficient of determination R² = r² indicates the proportion of variance in Y predictable from X.

Understanding Correlation vs. Causation

A foundational rule in empirical research is that correlation does not imply causation. A high Pearson r value on a scatter plot indicates that changes in variable X consistently coincide with changes in variable Y, but it does not prove that X directly causes Y.

Three Possible Explanations for Correlated Scatter Points:

  • Direct Causality: X truly influences Y (e.g. heating water increases its temperature).
  • Confounding / Lurking Variable (Z): Both X and Y are driven by an unmeasured third factor (e.g. ice cream sales and sunburn rates both increase during hot summer months).
  • Coincidental Correlation: Statistical noise in limited sample sizes.

How to Read Common Scatter Plot Patterns

Linear Clusters

Points tightly follow a diagonal line from bottom-left to top-right (positive) or top-left to bottom-right (negative).

Curvilinear / Quadratic

Points follow a parabolic or exponential curve; requires polynomial regression rather than simple linear fitting.

Outlier Isolation

Isolated points situated far from the main cluster; should be investigated for experimental errors or special phenomena.

Real-World Scientific & Commercial Applications

  • Pharmaceutical Clinical Trials: Plotting drug dosage concentrations (X) against patient symptom reduction rates (Y).
  • Economics & Marketing: Determining the elasticity between digital ad spend (X) and e-commerce conversions (Y).
  • Environmental Science: Plotting atmospheric carbon concentrations (X) against global average temperature anomalies (Y).
  • Physics Lab Work: Verifying Ohm's law (V = IR) by plotting voltage against electric current to measure resistance from the slope.

Frequently Asked Questions

How does this tool calculate the linear regression line?
Our tool automatically calculates the slope (m) and intercept (b) using Ordinary Least Squares (OLS) regression in real time. It computes the Pearson correlation coefficient (r), coefficient of determination (R²), and overlays the best-fit line onto your scatter points.
What is a strong correlation on a scatter plot?
A Pearson correlation coefficient |r| ≥ 0.8 is generally considered strong, 0.5 ≤ |r| < 0.8 is moderate, and |r| < 0.5 is weak. An r = 0 indicates no linear correlation between the two variables.