What does the background in blue mean or determine in the regression plot when using seaborn? What determines its width at both ends?
1 Answers
According to seaborn documentation, that area rappresents the confidence interval. You can set it through the ci
parameter:
Size of the confidence interval for the regression estimate. This will be drawn using translucent bands around the regression line. The confidence interval is estimated using a bootstrap; for large datasets, it may be advisable to avoid that computation by setting this parameter to None
For the statistical meaning of confidence interval, I suggest you the wikipedia definition:
The confidence interval represents values for the population parameter for which the difference between the parameter and the observed estimate is not statistically significant at the 10% level
Strictly speaking, there is 95% of probability (seaborn
uses 95% as default value) that a new sample falls in the confidence interval. In practice, the confidence interval indicates the forecast error associated with data dispersion.

- 11,891
- 53
- 45
- 80
-
1confidence intervals are about parameters not samples; e.g. the majority of the points in the OP's image are not within the shaded area (also seaborn uses 95% CIs by default). a better intuition in this example is that the data is consistent with any slope that passes through the CI. the reason it expands at the ends is because the data gives "less information" there – Sam Mason Jun 03 '20 at 14:02