statsmodels.regression.linear_model.PredictionResults.conf_int

PredictionResults.conf_int(obs=False, alpha=0.05)[source]

Confidence or prediction interval for the predicted values.

Parameters:
obsbool, optional

If False (default), return the confidence interval for the mean prediction, using the standard error of the mean (se_mean). If True, return the prediction interval for a new observation, using the standard error of the observation (se_obs), which also accounts for the residual variance.

alphafloat, optional

The significance level for the confidence interval. ie., The default alpha = .05 returns a 95% confidence interval.

Returns:
cindarray, (nobs, 2)

The lower and upper bound of the interval for each observation. Column 0 contains the lower bound, column 1 the upper bound.