The interval for a normal mean

Let X_1,\ldots,X_n be independent and \operatorname{N}(\mu,\sigma^2) with \sigma unknown. Starting from the t pivot (\overline X-\mu)/(s/\sqrt n), derive the confidence interval for \mu with confidence 1-\alpha.

T\sim t_{n-1}, so \mathbb{P}(-t_{n-1;\,1-\alpha/2}\le T\le t_{n-1;\,1-\alpha/2})=1-\alpha. Substituting T=(\overline X-\mu)/(s/\sqrt n) and solving for \mu gives

\overline X\pm t_{n-1;\,1-\alpha/2}\,\frac{s}{\sqrt n}.