Standard Error

Pengantar Pemodelan Linear di 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
Pengantar Pemodelan Linear di Python

Uncertainty in Parameters

Model Parameters and Standard Error:

  • Parameter value as center
  • Parameter standard error as spread
  • Standard Error, measures parameter uncertainty
Pengantar Pemodelan Linear di 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
Pengantar Pemodelan Linear di Python

Computing Standard Errors

e0 = model_fit.bse['Intercept']
e1 = model_fit.bse['times']
standard_error_of_intercept = e0
standard_error_of_slope = e1
Pengantar Pemodelan Linear di Python

Let's practice!

Pengantar Pemodelan Linear di Python

Preparing Video For Download...