Regression Analysis: Understand Relationships, Build Models and Interpret Results
Understand relationships. Explore statistical models. Develop analytical confidence.
Regression is one of the most widely used methods in research. This guide explains what a regression model does, how to read its output, which assumptions matter and how to avoid the most common mistakes, using one worked example throughout.
What is regression analysis?
Regression analysis is a family of statistical methods for describing and estimating the relationship between an outcome and one or more explanatory variables. It is used to explain (which factors are associated with the outcome, and how strongly?) and to predict (what outcome do we expect for given values of the predictors?).
Simple linear regression has one predictor: ŷ = b₀ + b₁x. The intercept b₀ is the predicted outcome when x = 0; the slope b₁ is the predicted change in y for a one-unit increase in x. The line is chosen by ordinary least squares (OLS), which minimises the sum of squared residuals (observed minus predicted values).
Multiple linear regression adds predictors: ŷ = b₀ + b₁x₁ + b₂x₂ + …. Each coefficient is now the association with that predictor after accounting for the others in the model.
Watch the topic explained
Video lesson · about 10 minutes · in production
Regression Analysis Explained
An original lesson that teaches regression analysis with diagrams and a worked example, with captions and a transcript. These are the chapters it will cover; each links to the matching part of this guide.
- 01What a regression line represents
- 02Simple and multiple regression
- 03Reading coefficients and R²
- 04Assumptions and residual plots
- 05Choosing the right regression model
Types of regression
| Outcome variable | Model | Example |
|---|---|---|
| Continuous | Linear regression (OLS) | Exam score |
| Binary (yes/no) | Logistic regression | Passed or failed |
| Counts | Poisson or negative binomial regression | Number of hospital visits |
| Ordered categories | Ordinal logistic regression | Satisfaction: low / medium / high |
| Repeated or grouped data | Multilevel or panel models | Students within schools; firms over years |
| Time to an event | Survival (Cox) regression | Time to course withdrawal |
Key assumptions of linear regression
- Correct specification: the relationship is linear in the parameters and important variables are included.
- Independence: observations (and errors) are independent of each other.
- Zero conditional mean: errors are unrelated to the predictors; otherwise coefficients are biased.
- Homoscedasticity: the spread of residuals is roughly constant.
- No perfect multicollinearity; high (not perfect) collinearity inflates standard errors.
- Approximately normal errors, mainly for small-sample inference.
- No unduly influential observations driving the result.
Check them with residual plots, Q–Q plots, variance inflation factors (VIF) and influence statistics such as Cook’s distance. Try the Regression Assumptions Lab to learn to read residual patterns.
How to run a regression analysis, step by step
- Start from the research question and theory: which outcome, which predictors and why?
- Prepare the data: check coding, missing values, outliers and variable types.
- Explore: descriptive statistics, scatterplots and correlations.
- Specify the model and choose the right type for the outcome.
- Estimate the model in your software.
- Check assumptions and diagnostics; revise the model if needed, explaining why.
- Interpret coefficients, confidence intervals, p-values and R² in context.
- Report transparently, including limitations.
Practical example: study hours and exam performance
Illustrative, fictional data for 120 students.
A researcher models exam score (0–100) using weekly study hours and attendance rate (%).
| Term | Coefficient | Std. error | t | p | 95% CI |
|---|---|---|---|---|---|
| Intercept | 28.40 | 4.10 | 6.93 | < .001 | 20.28 to 36.52 |
| Study hours | 2.15 | 0.32 | 6.72 | < .001 | 1.52 to 2.78 |
| Attendance (%) | 0.24 | 0.06 | 4.00 | < .001 | 0.12 to 0.36 |
R² = 0.48, adjusted R² = 0.47, F(2, 117) = 54.0, p < .001.
Interpretation:
- Holding attendance constant, each additional weekly study hour is associated with an exam score about 2.15 points higher (95% CI 1.52 to 2.78).
- Holding study hours constant, each extra percentage point of attendance is associated with a score about 0.24 points higher.
- The two predictors together explain about 48% of the variation in scores.
- The intercept (a student with zero hours and zero attendance) is outside the observed data and has no practical meaning here.
- The data are observational, so the results show association. Motivation, for example, could influence both study hours and scores.
Regression and correlation
Correlation measures the strength of a linear association between two variables, without distinguishing outcome and predictor. Regression models the outcome as a function of predictors, can include several variables and controls, and gives predictions. In simple regression, R² equals the square of Pearson’s r.
Common mistakes
- Reading coefficients as causal effects without a design that supports causation.
- Ignoring assumptions and influential observations.
- Including too many predictors for the sample size (overfitting).
- Leaving out important confounders (omitted-variable bias).
- Interpreting the intercept when x = 0 is meaningless.
- Relying only on p-values; report coefficients, confidence intervals and practical meaning.
- Comparing raw coefficients across predictors measured on different scales.
Explore learning resources
Worked examples, worksheets and checklists to use alongside this guide. They are learning tools, not answers to an assessment: adapt them to your own task and your institution’s requirements.
WorksheetRegression interpretation templateTurn any coefficient into a clear sentence.
For each predictor, complete:
"Holding [other predictors] constant, a one-unit increase in [predictor, units] is associated with a [coefficient] [unit] change in [outcome] (95% CI [lower] to [upper], p = [value])."
Then add: Is the effect practically meaningful? What design limits a causal interpretation?
ChecklistDiagnostics checklistBefore you trust a model.
- Residuals vs fitted: no clear pattern or funnel shape
- Q–Q plot of residuals: roughly on the line (or large sample)
- VIF values reasonable (many texts use 5 or 10 as rough warning levels)
- No single observation with very high Cook’s distance driving results
- Observations independent, or the model accounts for clustering
- Specification justified by theory, not only by significance
Try the interactive tools
Free tools that let you practise regression analysis hands-on. They run in your browser, explain every result and keep what you type private.
- Correlation & Regression LabPaste X and Y values to see the scatter plot, Pearson’s r, the regression line, R² and significance.
- Regression Assumptions & VIF LabPaste a small dataset to fit a multiple regression, inspect residuals and check multicollinearity with VIF.
- Regression Model SelectorPick the type of outcome and data structure and see which regression model fits.
- Statistical Test SelectorAnswer a few questions about your aim and data, and see which test fits and why.
Check your understanding
4 short questions. Choose an answer for each, then check. Every answer comes with an explanation.
Take your learning further
Learn regression analysis with a specialist Academic Expert
Sometimes a concept needs more than a written explanation. A live 1:1 session with an Academic Expert who works in regression analysis lets you ask your own questions, work through examples at your pace and get feedback on your own thinking.
What you can work on together
- Specify a regression model from your research question
- Choose between linear, logistic and other models
- Check and interpret assumptions and diagnostics
- Interpret coefficients, intervals and R² correctly
- Run regression in SPSS, Stata, R, Python or Excel
- Get feedback on the results section you have written
How sessions help
- Make sense of your brief and marking criteria, so you know exactly what is being asked.
- Ask the questions you would not ask in a big class, as often as you need.
- Get timely, specific feedback on work you have written yourself.
- Practise explaining your reasoning out loud, ready for vivas, presentations and practicals.
- Extra support with academic English and conventions if English is not your first language.
Teach → coach → review. Experts explain, demonstrate and give feedback. You stay the author of your work and make the decisions in it.
Frequently asked questions
What sample size do I need for regression?
It depends on the number of predictors, expected effect sizes and model type. Rules of thumb exist (for example, at least 10–20 observations per predictor), but a power analysis is better.
Should I remove outliers?
Not automatically. Investigate them: correct genuine errors, and report analyses with and without influential points if they change conclusions.
What is the difference between R² and adjusted R²?
Adjusted R² penalises adding predictors that do not improve the model much, so it is more useful when comparing models with different numbers of predictors.
Our academic integrity commitment
UniLearno supports learning, understanding and independent academic development. Our Academic Experts explain concepts, demonstrate methods, guide research and give feedback on work you have created. We do not complete assessed work, fabricate data or references, or produce anything for you to submit. You remain responsible for your own ideas, analysis, conclusions and final submission, and for following your institution’s academic integrity and AI-use rules.
Why a shortcut costs more than it saves
- It is more visible than it looks. Markers notice when work does not match what they know of you; document history, reference lists and follow-up conversations about your work are all used to check authorship.
- It creates a lasting risk. Services that sell completed assignments have threatened students afterwards, demanding money not to tell their university.
- The gap does not go away. Later units, supervised exams, vivas, placements and the job itself all assume you have the skill.
- Help that teaches is the safer route. Understanding the brief, getting feedback early and practising with an expert closes the gap for good.
Sources and about this guide
- Field, A. (2024). Discovering statistics using IBM SPSS Statistics (6th ed.). SAGE.
- Wooldridge, J. M. (2020). Introductory econometrics: A modern approach (7th ed.). Cengage.
- Gelman, A., Hill, J., & Vehtari, A. (2020). Regression and other stories. Cambridge University Press.
- Written by
- UniLearno Learning Team
- Last reviewed
- Found an error?
- Tell us and we will check and correct it.