Correlation & Regression
Pearson and Spearman correlation plus linear regression with confidence and prediction bands
Two continuous variables, and a question about how they move together. Correlation tells you the strength and direction of the association; regression gives you the line, the slope, and a way to predict one variable from the other.
What it measures
- Correlation. Pearson's r for linear association, Spearman's ρ for monotonic association that isn't necessarily linear (and for ranked or non-normal data).
- Linear regression. The best-fit line, its slope and intercept with confidence intervals, and the R² that says how much of the variance the line explains.
Data you upload
- Two numeric columns - your x and your y. One row per observation.
- Optionally a grouping column if you want a separate fit per condition rather than one line through everything.
What you get back
- The correlation coefficient with its p-value and 95% CI.
- The regression equation, slope and intercept with CIs, R², and residual standard error.
- A scatter plot with the fitted line, a confidence band for the mean response, and a prediction band for new observations.
- A residual diagnostic so you can see whether a straight line was the right model.
Method note
The choice between Pearson and Spearman is driven by the data: the agent checks linearity and normality and defaults to Spearman when a Pearson assumption is violated. Regression coefficients are fit by ordinary least squares; confidence bands reflect uncertainty in the line, while the wider prediction band reflects uncertainty in an individual future point. Influential points are flagged so a single outlier can't silently drive the slope.
Related
Comparing discrete groups instead of a continuous trend? See Group Comparison. For method-comparison agreement (not prediction), see Bland-Altman. For sigmoidal dose-response rather than linear trends, see Dose-Response.