Understanding R² (R-squared)

An Interactive Guide to Regression Model Fit

Current R² Score

94.2%
Excellent Fit
💡

94.2% of the variation in Y can be explained by X. This indicates a very strong linear relationship.

Interactive Controls

Try Different Patterns

Click to see how different data patterns affect R²

Add Random Scatter

Increase scatter to see R² decrease

10

Interactive Visualization

Drag the blue dots up or down to see how R² changes

Data Points (draggable)
Regression Line
Residuals (errors)

What's Happening Here?

1

The Blue Dots

Each blue dot represents a data point with X and Y values. Drag them to see the effect!

2

The Red Line

This is the "line of best fit" that minimizes the overall distance to all points.

3

The Gray Lines

These show the "residuals" - the prediction errors. Shorter lines = better fit = higher R².

High R² (80-100%)

  • Points cluster near the line
  • Small residuals
  • Strong predictive power
  • X explains Y well

Low R² (0-30%)

  • Points scattered widely
  • Large residuals
  • Poor predictive power
  • X doesn't explain Y