Example. A random variable $\xi$ is distributed according to the normal law with unknown mathematical expectation $a$ and variance $\sigma^{2}$. There is a sample $x_{1}, \ldots, x_{10}$ of values of $\xi$. The sample mean is 1.17, and the sample variance is 0.25. Find the confidence intervals for $a$ and $\sigma^{2}$ at confidence levels $p_{a}=0.98$ and $p_{\sigma^{2}}=0.96$.
Solution. Let's introduce the notation for the sample mean and sample variance:

$$
M_{x}^{*}=\frac{x_{1}+\ldots+x_{10}}{10} \quad \text { and } \quad D_{x}^{*}=\frac{\left(x_{1}-M_{x}^{*}\right)^{2}+\ldots+\left(x_{10}-M_{x}^{*}\right)^{2}}{9} .
$$

1. The random variable

$$
T=f_{1}\left(x_{1}, \ldots, x_{10}, a\right)=\frac{M_{x}^{*}-a}{\sqrt{D_{x}^{*}}} \sqrt{10}
$$

is distributed according to the Student's t-distribution with 9 degrees of freedom.

The random variable

$$
\chi^{2}=f_{2}\left(x_{1}, \ldots, x_{10}, \sigma^{2}\right)=\frac{9 D_{x}^{*}}{\sigma^{2}}
$$

is distributed according to the Pearson's chi-squared distribution with 9 degrees of freedom.

2. We find in the t-distribution table or using the RESHEBNIK.VM package the quantiles $q_{a}^{(1)}$ and $q_{a}^{(2)}$, such that

$$
\mathrm{P}\left(Tq_{a}^{(2)}\right)=\frac{1-p_{a}}{2}=\frac{1-0.98}{2}=0.01
$$

We have $q_{a}^{(2)}=t_{1-\alpha}(m)=2.821\left(\alpha=1-p_{a}=0.02, m=n-1=9\right)$, $q_{a}^{(1)}=-q_{a}^{(2)}=-2.821$.

3. The random interval

$$
\left(M_{x}^{*}-q_{a} \sqrt{\frac{D_{x}^{*}}{n}}, M_{x}^{*}+q_{a} \sqrt{\frac{D_{x}^{*}}{n}}\right)
$$

contains $a$ with probability $p_{a}=0.98$. Substituting the values $M_{x}^{*}$, $D_{x}^{*}, n, q_{a}$ into (3) and we obtain a specific realization of the random interval (3), i.e., the confidence interval for $a$ at the confidence level $p_{a}=0.98$ :

$$
\left(1.17-2.821 \sqrt{\frac{0.25}{10}}, 1.17+2.821 \sqrt{\frac{0.25}{10}}\right)_{0.98}=(1.029,1.311)_{0.98}
$$

4. We find in the chi-squared distribution table or using the RESHEBNIK.VM package the quantiles $q_{\sigma^{2}}^{(1)}$ and $q_{\sigma^{2}}^{(2)}$, such that

$$
\mathrm{P}\left(q_{\sigma^{2}}^{(1)}<\chi^{2}<q_{\sigma^{2}}^{(2)}\right)=\frac{1-p_{\sigma^{2}}}{2}=\frac{1-0.96}{2}=0.02
$$

We have $q_{\sigma^{2}}^{(1)}=\chi_{1-\alpha}^{2}(m)=2.532\left(\alpha=\left(1+p_{\sigma^{2}}\right) / 2=0.98, m=n-1=9\right)$, $q_{\sigma^{2}}^{(2)}=\chi_{1-\alpha}^{2}(m)=19.679\left(\alpha=\left(1-p_{\sigma^{2}}\right) / 2=0.02, m=n-1=9\right)$.

5. The random interval

$$
\left((n-1) \frac{D_{x}^{*}}{q_{\sigma^{2}}^{(2)}},(n-1) \frac{D_{x}^{*}}{q_{\sigma^{2}}^{(1)}}\right)
$$

contains $\sigma^{2}$ with probability $p_{\sigma^{2}}=0.96$. Substituting the values $n$, $D_{x}^{*}, q_{\sigma^{2}}^{(1)}, q_{\sigma^{2}}^{(2)}$ into (4) and we obtain a specific realization of the random interval (4), i.e., the confidence interval for $\sigma^{2}$ at the confidence level $p_{\sigma^{2}}=0.96$ :

$$
\left(9 \frac{0.25}{19.679}, 9 \frac{0.25}{2.532}\right)_{0.96}=(0.114,0.889)_{0.96}
$$

Answer. $\quad a \in(1.029,1.311)_{0.98}, \quad \sigma^{2} \in(0.114,0.889)_{0.96}$.

Conditions of the problem. A random variable $\xi$ is distributed according to the normal law with unknown mathematical expectation $a$ and variance $\sigma^{2}$. Based on a sample of size $n$, the sample mean $M_{x}^{*}$ and sample variance $D_{x}^{*}$ are calculated. Find the confidence intervals for $a$ and $\sigma^{2}$ at the confidence probabilities $p_{a}$ and $p_{\sigma^{2}}$.

1. $n=19, \quad M_{x}^{*