Interactive Correlation and Regression Tool

statistical-calculators.site

This is an interactive visual calculator.

Click here to switch to a Manual Data Entry (X's and Y's) ➚

Scatter Plot

X Axis
Y Axis

Tap/Click a point to remove it.

Instructions

Tap anywhere on the plot to add data points (within the range X: -10 to 10, Y: -10 to 10). Tap an existing point to remove it. When ready, tap "Calculate" to see results.

Statistics

Points: 0

Add points and calculate to see results.

Correlation and R-Squared

Linear Regression

Equation:

Slope (b):

Intercept (a):

Data Table

Point X Value Y Value Predicted Y Residual

Background: Pearson Correlation and Linear Regression

What Is Pearson's Correlation Coefficient (r)?

Pearson's correlation coefficient measures the strength and direction of the linear relationship between two continuous variables, ranging from -1 (perfect negative) to 1 (perfect positive), with 0 indicating no linear relationship.

Linear Regression: y = a + bx

The regression line describes the relationship as a straight line. The slope (b) shows how much y changes for each one-unit increase in x, and the intercept (a) is the estimated value of y when x = 0. For each point you plot, the tool also calculates the predicted y value and the residual — the difference between the actual and predicted value.

Significance Test (t-test) and p-value

The t-statistic tests whether the observed correlation is likely due to chance, using the formula t = r × √((n-2) / (1 - r²)). A p-value below 0.05 is generally considered statistically significant.

Worked Example

Try plotting points roughly along a rising diagonal, e.g. (-8,-6), (-4,-3), (0,0), (4,3), (8,6). You'll get r close to 1, a near-perfect positive correlation, with a regression line that closely fits all the points and a very small p-value.

How to Do This in R

x <- c(-8, -4, 0, 4, 8)
y <- c(-6, -3, 0, 3, 6)

cor.test(x, y, method = "pearson")
model <- lm(y ~ x)
summary(model)

How to Do This in SPSS

Correlation: Analyze → Correlate → Bivariate, add both variables, check Pearson.
Regression: Analyze → Regression → Linear, set y as Dependent and x as Independent.

How to Do This in JASP

Correlation: Regression → Correlation Matrix, drag in both variables, check Pearson's r.
Regression: Regression → Linear Regression, set y as Dependent Variable and x as Covariate.

Related Statistical Calculators