Standard Error of Regression Calculator Formula

Understand the math behind the standard error of regression calculator. Each variable explained with a worked example.

Formulas Used

Standard Error of Regression

se_reg = sqrt(sse / (n - p - 1))

Mean Squared Error (MSE)

mse = sse / (n - p - 1)

Variables

VariableDescriptionDefault
sseResidual Sum of Squares (SSE)200
nSample Size (n)50
pNumber of Predictors (p)2

How It Works

Standard Error of Regression (RMSE)

The standard error of regression (also called residual standard error or RMSE) estimates the standard deviation of the residuals.

Formula

Se = sqrt(SSE / (n - p - 1))

where SSE is the sum of squared residuals, n is sample size, and p is the number of predictors. Smaller Se means better prediction accuracy. The denominator (n - p - 1) accounts for the degrees of freedom lost estimating the model parameters.

Worked Example

SSE = 200, n = 50, p = 2 predictors.

sse = 200n = 50p = 2
  1. 01df = 50 - 2 - 1 = 47
  2. 02MSE = 200 / 47 = 4.2553
  3. 03Se = sqrt(4.2553) = 2.0629