Example 14 (Singapore Math Competition Question) Find the maximum value of the function $y=\sqrt{1+\sin x}+\sqrt{1-\sin x}$.
Consider $\sqrt{1+\sin x}$ and $\sqrt{1-\sin x}$ as a set of data, then by the variance formula, we get
$$
\begin{aligned}
s^{2} & =\frac{1}{2}\left[(\sqrt{1+\sin x})^{2}+(\sqrt{1-\sin x})^{2}-2\left(\frac{\sqrt{1+\sin x}+\sqrt{1-\sin x}}{2}\right)^{2}\right] \\
& =\frac{1}{2}\left[1+\sin x+1-\sin x-\frac{(\sqrt{1+\sin x}+\sqrt{1-\sin x})^{2}}{2}\right] \\
& =1-\frac{1}{4}(\sqrt{1+\sin x}+\sqrt{1-\sin x})^{2} \geqslant 0,
\end{aligned}
$$

Thus, $(\sqrt{1+\sin x}+\sqrt{1-\sin x})^{2} \leqslant 4$,
which means $\sqrt{1+\sin x}+\sqrt{1-\sin x} \leqslant 2$,
therefore $y_{\text {max }}=2$.