Standard Error

Introduction to Linear Modeling in Python

Jason Vestuto

Data Scientist

Uncertainty in Predictions

Model Predictions and RMSE:

  • predictions compared to data gives residuals
  • residuals have spread
  • RMSE, measures residual spread
  • RMSE, quantifies prediction goodness
Introduction to Linear Modeling in Python

Uncertainty in Parameters

Model Parameters and Standard Error:

  • Parameter value as center
  • Parameter standard error as spread
  • Standard Error, measures parameter uncertainty
Introduction to Linear Modeling in Python

Computing Standard Errors

df = pd.DataFrame(dict(times=x_data, distances=y_data))
model_fit = ols(formula="distances ~ times", data=df).fit()
a1 = model_fit.params['times']
a0 = model_fit.params['Intercept']
slope = a1
intercept = a0
Introduction to Linear Modeling in Python

Computing Standard Errors

e0 = model_fit.bse['Intercept']
e1 = model_fit.bse['times']
standard_error_of_intercept = e0
standard_error_of_slope = e1
Introduction to Linear Modeling in Python

Let's practice!

Introduction to Linear Modeling in Python

Preparing Video For Download...