Written and maintained by CASRAI Editorial Board
Published
On this page
A predicted probability is the probability, between 0 and 1, that a model assigns to an outcome for a specific set of predictor values. In logistic regression it is obtained by converting the model’s linear prediction (the log odds) back to a probability with p = 1 / (1 + e−xβ). For example, a model of graduate admission gives a rank 1 applicant with a GRE score of 588 and a GPA of 3.39 a predicted probability of about 0.52.
What is a predicted probability? Definition in one paragraph
A model that predicts a yes/no outcome (admitted or not, relapsed or not, replicated or not) does not output a yes or a no. It outputs a probability for each case, computed from that case’s predictor values. That number is the predicted probability. It is not a count of how often the event happened in your data; it is the model’s estimate of how likely the event is for someone, or something, with exactly those characteristics. In a logistic regression (logit) model the coefficients are on the log-odds scale, so the raw linear prediction is not yet a probability: it must be back-transformed, and the back-transformed value is what software returns when you ask for type = "response" in R, .predict() in Python’s statsmodels or margins in Stata.
Predicted probabilities are usually easier to communicate than coefficients or odds ratios, because they are on the scale readers already understand. An odds ratio of 0.51 says little to a reader who has never worked with odds; “a predicted probability of 0.35 against 0.52” does.
Formula for a predicted probability, with every symbol explained
For a logistic regression with predictors x1, …, xk:
p̂ = 1 / (1 + e−(β0 + β1x1 + … + βkxk))
- p̂: the predicted probability that the outcome equals 1, always between 0 and 1.
- β0: the intercept, the log odds when every predictor is 0 (or at its reference category).
- β1, …, βk: the estimated coefficients, each the change in log odds for a one-unit increase in that predictor, other predictors held fixed.
- x1, …, xk: the values of the predictors for the case you are predicting for.
- xβ: shorthand for the linear prediction β0 + β1x1 + … + βkxk, the predicted log odds.
- e: Euler’s number, about 2.71828.
Equivalent steps: compute xβ, exponentiate it to get the odds (odds = exβ), then convert odds to probability with p̂ = odds / (1 + odds). The UCLA Office of Advanced Research Computing (OARC) describes the same model as one in which the log odds are linear in the predictors and obtains probabilities by applying the inverse logit (plogis in R) to the link-scale prediction.
Worked example with real numbers and the arithmetic shown
The example uses the graduate-admission model published by UCLA OARC: admit ~ gre + gpa + rank, where rank is the prestige of the applicant’s undergraduate institution (1 to 4, with 1 as the reference category). The published coefficients are: intercept −3.98998; gre 0.00226; gpa 0.80404; rank 2 −0.67544; rank 3 −1.34020; rank 4 −1.55146.
Step 1, linear prediction for rank 1, GRE 588, GPA 3.39.
xβ = −3.98998 + (0.00226 × 588) + (0.80404 × 3.39) = −3.98998 + 1.32888 + 2.72569 = 0.06459.
Step 2, odds. e0.06459 = 1.0667.
Step 3, probability. p̂ = 1.0667 / (1 + 1.0667) = 0.516.
UCLA reports 0.517 for this applicant. The 0.001 gap is rounding: the published coefficients are rounded to five decimals, while the software uses the unrounded estimates. For a rank 2 institution add the rank 2 coefficient: xβ = 0.06459 − 0.67544 = −0.61085; odds = 0.5429; p̂ = 0.5429 / 1.5429 = 0.352, matching the 0.352 UCLA reports. The 0.5429 odds also equal 1.0667 × 0.5089, where 0.5089 is the odds ratio for rank 2 reported by UCLA (e−0.67544), which shows how odds ratios and predicted probabilities connect.
The same arithmetic for the other categories gives 0.218 for rank 3 and 0.184 for rank 4 from the rounded coefficients, against 0.219 and 0.185 in the UCLA output.
Interpreting predicted probabilities, with reading guidance
A predicted probability is conditional: it applies only to the predictor values you chose. Changing one predictor and re-predicting shows the effect on the probability scale, which is not constant, because the logistic curve is steepest near 0.5 and flat near 0 and 1. Raising GRE by 100 points (0.226 on the log-odds scale) moves the rank 1, GPA 3.39 applicant from 0.516 to 0.572, an increase of about 0.056 (writer-computed from the published coefficients). The same 100 points would move an applicant with a lower baseline probability by a smaller amount.
| What you see | How to read it |
|---|---|
| p̂ = 0.50 | Odds of 1 to 1; the log odds are 0. |
| p̂ above 0.50 | The model rates the outcome as more likely than not for these predictor values. |
| p̂ below 0.50 | The model rates the outcome as less likely than not for these predictor values. |
| Difference between two p̂ values | An absolute change in probability, valid only for the two profiles compared. |
| Odds ratio | A ratio of odds, constant across profiles, but not a ratio of probabilities. |
Predictions at the means versus average predicted probabilities
Two different quantities are both called “predicted probability” in software output, and they answer different questions. In the UCLA Stata example, margins rank, atmeans sets every other predictor at its sample mean and gives 0.5166, 0.3523, 0.2186 and 0.1847 for ranks 1 to 4. By contrast, margins, at(gre=(200(100)800)) computes each case’s own prediction with GRE set to the chosen value, keeping that case’s real GPA and rank, and then averages. Those averages are 0.1667 at GRE 200, 0.1985 at 300, 0.2344 at 400, 0.2743 at 500, 0.3178 at 600, 0.3647 at 700 and 0.4141 at 800. The average at GRE 600 (0.3178) is far below the rank 1 prediction near the means (0.5166) because the average blends all four ranks and every real GPA in the sample. Neither is wrong; they describe different populations. State which one you report.
The data table below compares the model’s predictions by institution rank in the UCLA R and Stata outputs and shows the corresponding odds ratios from the Stata output.
Odds ratio versus change in probability
The odds ratio for rank 2 is 0.5089, which can be misread as “half as likely”. The probability actually falls from 0.517 to 0.352, a ratio of about 0.68 and a difference of about −0.165. Odds ratios are close to risk ratios only when the outcome is rare; at probabilities near 0.5 they are not. Reporting both the odds ratio and predicted probabilities for named profiles protects readers from this misreading.
Assumptions and common mistakes
- The model must be right for the predictions to mean anything. A predicted probability inherits every flaw of the model: omitted predictors, wrong functional form, or missing interactions. Check fit and calibration before treating predictions as accurate, and score them with a measure such as the Brier score.
- Log odds are assumed linear in each continuous predictor. This is the core logit model assumption quoted from UCLA above.
- Reporting a prediction without its profile. “The predicted probability is 0.35” is incomplete; give the values of every predictor.
- Confusing a probability with a classification. Predicting 0.52 is not the same as saying the event will happen. A cutoff such as 0.5 is a separate decision rule.
- Averaging predictions and calling it the prediction at the mean. See the section above.
- Extrapolating. Do not predict for predictor values far outside the range of the data used to fit the model.
- Ignoring uncertainty. A predicted probability is an estimate. Software can supply standard errors or confidence intervals (for example through the delta method or
margins); report them when the probability is the main result.
How to report predicted probabilities (APA example)
Give the model, the profile each probability applies to, the probabilities, and the uncertainty. APA style generally omits the leading zero for statistics that cannot exceed 1, which includes probabilities. A report based on the example above could read:
A logistic regression predicted admission from GRE score, undergraduate GPA and institutional rank. For applicants with the sample mean GRE score and GPA, the predicted probability of admission was .52 for rank 1 institutions, .35 for rank 2, .22 for rank 3 and .18 for rank 4.
Add 95% confidence intervals when your software provides them, and report the odds ratios in a regression table alongside, so readers can see both scales.
How to calculate predicted probabilities in Excel, R or Python
Excel
Type the coefficients into cells, then apply the inverse logit directly. With the example values and the rank 1 category:
=1/(1+EXP(-(-3.98998+0.00226*588+0.80404*3.39)))
This returns about 0.5161. For rank 2, add -0.67544 inside the inner parentheses.
R
fit = glm(admit ~ gre + gpa + factor(rank), data = mydata, family = binomial)newdata = data.frame(gre = 588, gpa = 3.39, rank = factor(1:4))predict(fit, newdata = newdata, type = "response")
Without type = "response", predict() returns log odds. See also the predict() function in R.
Python (statsmodels)
import pandas as pdimport statsmodels.formula.api as smffit = smf.logit("admit ~ gre + gpa + C(rank)", data=df).fit()new = pd.DataFrame({"gre": [588]*4, "gpa": [3.39]*4, "rank": [1, 2, 3, 4]})print(fit.predict(new))
For the full modelling workflow see logistic regression in statsmodels. In Stata the equivalent is margins rank, atmeans after logit or logistic.
How to do expected value probability?
The expected value of a discrete random variable is the sum of each value multiplied by its probability: μ = Σ x · P(x). OpenStax’s example has a variable taking 0, 1 and 2 days with probabilities 0.2, 0.5 and 0.3, so μ = 0(0.2) + 1(0.5) + 2(0.3) = 1.1. Predicted probabilities feed expected values directly: the expected number of events across n cases is the sum of their predicted probabilities.
What is a logistic regression model?
A logistic regression model relates a binary outcome to predictors through the logit function, so that the log odds of the outcome are a linear function of the predictors. It estimates coefficients, converts them to odds ratios by exponentiating, and converts any combination of predictor values to a predicted probability with the formula above. Estimation and diagnostics are beyond this page.
What are the rules of probability?
OpenStax Introductory Statistics presents these basics, and they are what make a predicted probability valid:
- Every probability lies from 0 to 1, inclusive.
- The probabilities of an event and its complement sum to 1: P(A) + P(A′) = 1.
- Multiplication rule: P(A AND B) = P(B) P(A | B); for independent events, P(A AND B) = P(A) P(B).
- Addition rule: P(A OR B) = P(A) + P(B) − P(A AND B); for mutually exclusive events, P(A OR B) = P(A) + P(B).
A logistic model respects the first rule by construction: the inverse logit can never leave the 0 to 1 interval, unlike a linear model of a binary outcome. See also types of probability.
What is a probability distribution?
A probability distribution lists the possible values of a random variable and the probability of each. For a discrete variable, OpenStax’s requirements are that each probability is between 0 and 1 and that the probabilities sum to 1. A binary outcome has the simplest distribution: P(Y = 1) = p̂ and P(Y = 0) = 1 − p̂, and the predicted probability is exactly the parameter of that distribution for the case in question.
Frequently asked questions
What is a predicted probability in logistic regression?
It is the model’s estimated probability that the outcome equals 1 for a given set of predictor values, computed as 1 / (1 + e−xβ).
Why does my software give log odds instead of probabilities?
Many functions return the link scale by default. In R, request type = "response"; in statsmodels, .predict() on a fitted logit returns probabilities.
Why do the average predicted probability and the prediction at the means differ?
The logistic curve is nonlinear, and averaging predictions over real cases mixes all categories and values, whereas a prediction at the means describes one hypothetical profile. In the UCLA example, 0.3178 (average at GRE 600) and 0.5166 (rank 1 at the means) answer different questions.
Is a predicted probability the same as an odds ratio?
No. Odds = p / (1 − p), and an odds ratio compares two odds. A probability of 0.352 corresponds to odds of about 0.543.
How many decimals should I report?
Two or three is typical for probabilities in APA style; use the same number throughout and omit the leading zero.
Sources
- UCLA Office of Advanced Research Computing, Logit Regression: R Data Analysis Examples (read 2026-11-19).
- UCLA Office of Advanced Research Computing, Logistic Regression: Stata Data Analysis Examples (read 2026-11-19).
- OpenStax, Introductory Statistics 2e, 3.1 Terminology (read 2026-11-19).
- OpenStax, Introductory Statistics 2e, 3.3 Two Basic Rules of Probability (read 2026-11-19).
- OpenStax, Introductory Statistics 2e, 4.1 Probability Distribution Function for a Discrete Random Variable (read 2026-11-19).
- OpenStax, Introductory Statistics 2e, 4.2 Mean or Expected Value and Standard Deviation (read 2026-11-19).
Data: Predicted probability of admission by institution rank (UCLA logit example)
Predicted probabilities of admission by undergraduate institution rank from the UCLA OARC logit example (admit ~ gre + gpa + rank), compiled from the R and Stata outputs, with the Stata odds ratios for comparison.
| Institution rank | R predicted probability (GRE 588, GPA 3.39) | Stata margins, atmeans | Odds ratio vs rank 1 (Stata) |
|---|---|---|---|
| 1 | 0.517 | 0.5166 | reference |
| 2 | 0.352 | 0.3523 | 0.5089 |
| 3 | 0.219 | 0.2186 | 0.2618 |
| 4 | 0.185 | 0.1847 | 0.2119 |
Sources
- UCLA OARC Logit Regression: R Data Analysis Examples (accessed 2026-11-19)
- UCLA OARC Logistic Regression: Stata Data Analysis Examples (accessed 2026-11-19)
Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.







