Which definition of confidence interval is correct, or are they the same thing? Wondering 1) which of the two ways of calculating confidence intervals is correct, and 2) if they both are correct, are they the same or different? How do they reconcile?

*

*CI = [Coef x1 ± 2*SE(coef x1)]


*CI = [Sample mean ± Margin of error]
Number 1's source is page 76 in ISLR 2nd Edition:

Number 2's source is page 7 here: https://www.westga.edu/academics/research/vrc/assets/docs/confidence_intervals_notes.pdf


Neither definition is the most general definition of a confidence interval, and you don’t have to get that exotic to find situations where both are inappropriate. In particular, both give intervals that are symmetric about the point estimate, and a confidence interval for variance, for example, does not have this property when it is calculated the parametric way that inverts a chi-squared test.
