Bivariate Linear Regression Tool

Regression Foundations

Fit and interpret simple linear regression models for marketing data, using either a single continuous predictor or a single binary (two-level) categorical predictor.

👨‍🏫 Professor Mode: Guided Learning Experience

New to regression? Enable Professor Mode for step-by-step guidance through fitting and interpreting simple linear regression models!

OVERVIEW & WHAT THIS TOOL SOLVES

When you want to know how strongly a single marketing driver—like weekly ad spend, sales rep calls, or email frequency—moves a continuous outcome like revenue or order value, eye-balling a scatterplot isn't enough to make a budget commitment. Bivariate Linear Regression fits the best straight line through your paired data, tells you the exact dollar or unit change in your outcome for every one-unit increase in your predictor, and tests whether that slope could simply be random sampling noise.

🎯 Questions It Answers

  • How much does our outcome change, on average, for every 1-unit increase in this predictor?
  • Is the relationship between our marketing input and outcome statistically significant?
  • What percentage of the total variation in our outcome is explained by this single driver alone?

📂 What Data You Need

  • Paired Observations: At least 4 rows (30+ recommended) where each row is a store, customer, week, or campaign.
  • 1 Outcome Column: A continuous numeric metric (e.g., revenue, average order value, time on site).
  • 1 Predictor Column: Either a continuous numeric metric (e.g., ad spend) or a two-group categorical label (e.g., Control vs. Promo).

💡 What You'll Discover

  • Fitted Slope & Baseline: The exact regression equation predicting your outcome from any input level.
  • Confidence & Prediction Bands: Visual bands showing uncertainty around both the average trend line and individual forecasts.
  • Model Fit & Diagnostics: R-squared, correlation, standard error of the estimate, and residual checks.
🔍 Key Nuances & Common Traps to Watch For
  • Continuous vs. Binary Predictors: When your predictor is continuous (e.g., ad spend in dollars), the slope measures the expected change in the outcome per 1-unit increase. When your predictor is a two-group indicator (0 = Control, 1 = Treatment), the intercept is the Control group mean and the slope is the exact difference between Treatment and Control means.
  • Regression Is Directional: Predicting Revenue from Ad Spend estimates a different line than predicting Ad Spend from Revenue. Always place the lever you control (or the antecedent cause) on the horizontal predictor axis and the metric you want to explain on the vertical outcome axis.
  • Omitted Variable Bias: Because bivariate regression looks at only one predictor in isolation, its slope can absorb credit or blame from unmeasured confounders (such as seasonality or price changes). If multiple levers move together, switch to Multiple Linear Regression.
📐 Under the Hood: Model Equations & Variable Definitions
1. Bivariate Linear Regression Model
\[ Y_i = \beta_0 + \beta_1 X_i + \varepsilon_i \]
💬 Read it in plain English: Each observation's outcome (Yi) equals a starting baseline when the predictor is zero (β0), plus the slope (β1) multiplied by that row's predictor value (Xi), plus unexplained individual noise (εi).
Yi
Outcome Variable YOUR DATA ⓘ
The continuous metric you want to explain or predict for observation i (e.g., Weekly Revenue).
Xi
Predictor Variable YOUR DATA ⓘ
The value of your marketing input or group indicator for observation i.
β0
Intercept (Baseline) ESTIMATED ⓘ
Expected value of Y when predictor X equals zero (or the reference group mean for a 0/1 indicator).
β1
Slope Coefficient ESTIMATED ⓘ
Expected change in Y for a 1-unit increase in X.
εi
Residual Error OUTPUT ⓘ
Unexplained gap between the actual outcome and the fitted regression line for row i.
2. Slope Hypothesis Test & Confidence Interval
\[ t = \frac{\hat{\beta}_1}{\mathrm{SE}(\hat{\beta}_1)} \quad (\nu = n - 2), \qquad \mathrm{CI}_{1-\alpha} = \hat{\beta}_1 \pm t_{\alpha/2,\,\nu}\,\mathrm{SE}(\hat{\beta}_1) \]
💬 Read it in plain English: The t-statistic divides your estimated slope by its sampling uncertainty; if the signal is large relative to the noise, the confidence interval excludes zero and confirms a real linear relationship.
t, tα/2,ν
Slope Test Statistic & Critical Value INFERENCE ⓘ
Signal-to-noise ratio of the estimated slope (t) and the two-tailed critical multiplier (tα/2,ν) for significance level α.
SE(β̂1)
Standard Error of the Slope OUTPUT ⓘ
Precision of the estimated slope β̂1; shrinks with larger sample size n and wider spread in X.
ν, n
Degrees of Freedom & Sample Size YOUR DATA ⓘ
Sample size n and degrees of freedom ν = n − 2 remaining after estimating the intercept and slope.

DATA SOURCE

📚

Use a Case Study

Use presets to explore realistic use cases, such as ad spend vs. revenue or control vs. treatment on order value. Each scenario can expose either a summary CSV of aggregated statistics or a raw data file that you can download, edit in Excel, and re-upload.

📂

Enter Your Data

Manual raw data entry

Add up to 50 paired observations. The predictor can be numeric (continuous) or categorical labels.

Row Predictor (X) Outcome (Y)

Enter data to see which column is the predictor and which is the outcome.

Predictor type

Upload raw case-level data. The file should have exactly two columns: a predictor and an outcome. Text/string predictors are treated as categorical; numeric predictors can be interpreted as continuous or categorical based on the option you choose below.

Drag & Drop raw data file (.csv, .tsv, .txt, .xls, .xlsx)

Two columns with headers, such as Predictor,Outcome. Numeric predictors can be treated as continuous or categorical.

No raw file uploaded.

Upload a file to see which column is the predictor and which is the outcome.

INPUTS & SETTINGS

Confidence Level & Reporting

Set the significance level for hypothesis tests on the slope and the corresponding confidence intervals.

Advanced analysis settings

Hypothesis direction

Choose whether the slope test is two-sided or directional. Two-sided is the safest default; one-sided tests are only appropriate when you truly care about movement in one direction.

Directional tests adjust the reported p-value and decision at your chosen alpha but keep confidence intervals two-sided for now.

Scale & transformations

Log scales can turn curved relationships into straighter lines and make coefficients easier to interpret as approximate percentage effects, but they require strictly positive values.

Only rows with X > 0 or Y > 0 are used when the corresponding log option is checked; non-positive values are dropped. Use these transforms when the diagnostics or plots suggest a curved, multiplicative, or heavy-tailed relationship on the original scale.

Reporting preferences

The standardized slope rescales both X and Y to standard deviation units. It can help compare effect sizes across different predictors in other tools that share this pattern.

VISUAL OUTPUT

Relationship with Predictor on Outcome

This is the equation the picture below is drawing

Provide data to see the fitted regression equation.

Range for focal (continuous):

Interpretation Aid

Scatterplot: Observed Data with the Fitted Line

TEST RESULTS

Start here: what your results actually say

Load or enter data to see a plain-language reading of your results.

Regression Equation

Provide data to see the fitted regression equation.

The downloaded file includes your raw paired data plus two columns: y_fitted (predicted outcome from the fitted regression line) and residual (actual minus predicted) for each observation.

Summary Statistics

Outcome & Continuous Predictor

Variable Mean Median Std. Dev. Min Max
Provide data to see numeric summaries.

Categorical Predictor (% by level)

Predictor Level Percent
Provide data to see level percentages.

The three numbers that answer your question

How much does the outcome change?

–

Slope (b1)

Load data to see what it means here.

Could this just be luck?

–

p-value for the slope

Smaller means less likely to be chance.

How much of the outcome does the predictor explain?

–

R-squared (R2)

Load data to see what share this represents.

Those bold names are the terms your textbook, your exam and every stats package will use. The question above each one is what it is actually for.

More detail (supporting numbers)

These are not extra answers. They describe how the model was fitted and how far off its typical prediction is. You need them for a formal write-up, not to decide what your result means.

Predictor type: –
Intercept: –
Slope t-statistic: –
Overall F-statistic: –
Model p-value: –
RMSE: –
MAE: –
Residual SE: –
Decision (alpha): –
Interpretation Aid

R-squared: Share of outcome variation explained by this single predictor. Higher means the line fits the data better.

Slope & t / p-value: Slope shows change in outcome for one-unit change in predictor (or difference vs. reference for a categorical predictor). A small p-value (below alpha) means that slope is statistically reliable. With a categorical predictor of three or more levels, this tests one group against the reference, not the variable as a whole.

Intercept: Expected outcome when the predictor is zero (or at the reference group).

Overall F & model p-value: The test of whether the predictor explains any variance in the outcome at all, on (k−1, n−k) degrees of freedom. You will see it called the omnibus test, the overall F-test or the ANOVA F in SPSS, R and most textbooks; “omnibus” simply means it covers every group at once rather than one pair at a time. For a continuous predictor, or a categorical one with only two levels, F = t² and this p-value equals the slope p-value. With three or more levels they differ, and this is the one that decides whether the variable matters — read it before looking at any individual group comparison.

RMSE / MAE: Typical prediction error size. RMSE weights big errors more; MAE is a straight average of absolute errors.

Residual SE: Standard deviation of residuals (uses degrees of freedom), a classic “standard error of the regression.”

Decision (alpha): An easy yes/no cue based on the chosen significance level.

APA-Style Statistical Reporting

Managerial Interpretation

Summary of Estimates

Parameter Level / Term Estimate Standard Error t p-value Lower Bound Upper Bound
Provide summary statistics or upload data to see parameter estimates.

Interpretation Aid

DIAGNOSTICS & ASSUMPTIONS

Diagnostics & Assumption Checks

Run the analysis to see checks on linearity, influential points, variance patterns, and normality of residuals. Use these as prompts for plots and follow-up modeling, not as strict pass/fail gates.

Residuals vs. Fitted

Actual vs. Fitted

Interpretation Aid

Each point is one case: x-axis is the model's fitted value, y-axis is the actual outcome. Points close to the 45° line indicate good predictions; systematic curves or funnels suggest model misspecification or unequal variance.