Correlation and regression
Enter X and Y values to get a scatter plot, the correlation, the regression line and predictions.
Question: Do two measurements change together? Knowing one, how well can the other be predicted?
Example: Yield (kg/da) at different nitrogen rates (kg/da). Is there a relationship between nitrogen and yield, and how much does yield rise as the rate increases?
n = 7, mean 9
n = 7, mean 376
Dots are the measurements, the line is the regression line. The green dot is the prediction for your X.
Regression equation
- Correlation (r)
- 0.969
- Determination (R²)
- 93.9%
- Prediction for x = 10
- 384.45
When X increases by one unit, Y increases by 8.452 units on average. 93.9% of the variation in Y is explained by X; the relationship is strong.
Slope (b): how much Y changes on average when X increases by one unit.
Intercept (a): makes the line pass through the mean point (x̄, ȳ).
Regression equation:
Coefficient of determination: the share of the variation in Y explained by X.
Is the relationship significant?
The red area is the rejection region (α = 0.05). The green line is the value calculated from your data.
H₀ rejected: the difference is significant
There is a strong, positive (as one increases, so does the other) and statistically significant relationship between X and Y.
p-value = 0.0003 (significant at 1%, **)
Correlation is not causation: two variables changing together does not mean one causes the other.
How was it calculated?
= 8.785
Compute the corrected sums of squares and products.
Correlation coefficient: the direction and strength of the relationship (between −1 and +1).
A t test checks whether r differs from zero.
Compare the calculated value with the table (critical) value.
The calculated value is in the rejection region: H₀ is rejected. The p-value (0.0003) is smaller than α = 0.05.