# Choosing a Model by MSE: Solution

*English translation by SOTA – AI Community of the Russian original. Organisers who would like this translation removed can email sota.ai.community@gmail.com.*

*Task 3 of the school stage of the All-Russian School Olympiad (VsOSh) 2025/26 in artificial intelligence (region group II), grades 9–11. Answer and official solution.*

**Answer:** 1) $y = 2x$; 2) $y = \frac{1}{2}(x + 2)^2 - 2$

**Solution.**

The mean squared error is $\frac{1}{n}\sum (y - \hat{y})^2$. Within one and the same set of points, the number $n$ is the same for all models, so it is not necessary to divide by it: it is enough to compare the sums of squares $\sum (y - \hat{y})^2$.

*(Translator's note: A, B, C and D denote the four models in the order in which they are listed in the statement.)*

Training set $(-0.5, -0.75), (0, -0.5), (0.5, 1.25), (1, 1.5)$. Sums of squared deviations:

$$
\begin{aligned}
\text{Sum for A} &= 0.0625 + 0.25 + 0.0625 + 0.25 = 0.625,\\
\text{Sum for B} &= 0.5625 + 1 + 0.0625 + 0 = 1.625,\\
\text{Sum for C} &= 0.015625 + 0.25 + 0.015625 + 1 = 1.28125,\\
\text{Sum for D} &= 0 + 0.25 + 0 + 2.25 = 2.5.
\end{aligned}
$$

The minimum is for A, so on the training set the best model is $y = 2x$.

Combined set: we add $(2, 5), (3, 11.5), (4, 14)$. The three new points give:

$$
\begin{aligned}
&\text{For A: } 1^2 + 5.5^2 + 6^2 = 67.25,\\
&\text{For B: } 2.5^2 + 8^2 + 9.5^2 = 160.5,\\
&\text{For C: } 1^2 + (-1)^2 + 2^2 = 6,\\
&\text{For D: } 3^2 + 3.5^2 + 10^2 = 121.25.
\end{aligned}
$$

Total over all seven points (we add these to the sums for the training set):

$$
\begin{aligned}
&\text{A: } 0.625 + 67.25 = 67.875,\\
&\text{B: } 1.625 + 160.5 = 162.125,\\
&\text{C: } 1.28125 + 6 = 7.28125,\\
&\text{D: } 2.5 + 121.25 = 123.75.
\end{aligned}
$$

The minimum is for C, so for the combined set the best model is $y = \frac{1}{2}(x + 2)^2 - 2$.
