12. (14 points) A flower shop purchases a certain number of roses from a farm at a price of 5 yuan per stem every day, and then sells them at a price of 10 yuan per stem. If they are not sold on the same day, the remaining roses are treated as garbage.
(1) If the flower shop purchases 16 stems of roses one day, find the function expression for the profit $y$ (unit: yuan) of that day in terms of the demand $n$ (unit: stems, $n \in \mathbf{N}$).
(2) The flower shop recorded the daily demand for roses (unit: stems) over 100 days, and organized the data as shown in Table 1.
Table 1
\begin{tabular}{|c|l|l|l|l|l|l|l|}
\hline Daily demand $n$ & 14 & 15 & 16 & 17 & 18 & 19 & 20 \\
\hline Frequency & 10 & 20 & 16 & 16 & 15 & 13 & 10 \\
\hline
\end{tabular}

The frequencies of each demand over 100 days are used as the probabilities of each demand.
(i) If the flower shop purchases 16 stems of roses one day, and $X$ represents the profit (unit: yuan) of that day, find the distribution of $X$, its expected value, and variance.
(ii) If the flower shop plans to purchase 16 or 17 stems of roses one day, do you think they should purchase 16 or 17 stems? Please explain your reasoning.
12. (1) When the daily demand $n \geqslant 16$, the profit $y=80$. When the daily demand $n<16$, the profit $y=10 n-80$. Therefore, the function expression of $y$ with respect to the positive integer $n$ is
$$
y=\left\{\begin{array}{ll}
10 n-80, & n<16 ; \\
80, & n \geqslant 16 .
\end{array}\right.
$$
(2) (i) The possible values of $X$ are $60, 70, 80$, and
$$
\begin{array}{l}
P(X=60)=0.1, P(X=70)=0.2, \\
P(X=80)=0.7 .
\end{array}
$$

Thus, the distribution of $X$ is as shown in Table 2.
Table 2
\begin{tabular}{|c|c|c|c|}
\hline$X$ & 60 & 70 & 80 \\
\hline$P$ & 0.1 & 0.2 & 0.7 \\
\hline
\end{tabular}
The expected value of $X$ is
$$
\mathrm{E}(X)=60 \times 0.1+70 \times 0.2+80 \times 0.7=76 \text {; }
$$
The variance of $X$ is
$$
\begin{array}{l}
\mathrm{D}(X)=(60-76)^{2} \times 0.1+(70-76)^{2} \times 0.2+ \\
\quad(80-76)^{2} \times 0.7 \\
=44 .
\end{array}
$$
(ii) Method 1 The flower shop should purchase 16 roses per day. If the flower shop purchases 17 roses per day, let $Y$ represent the profit for the day (unit: yuan), then the distribution of $Y$ is as shown in Table 3.
Table 3
\begin{tabular}{|c|c|c|c|c|}
\hline$Y$ & 55 & 65 & 75 & 85 \\
\hline$P$ & 0.1 & 0.2 & 0.16 & 0.54 \\
\hline
\end{tabular}
The expected value of $Y$ is
$$
\begin{array}{l}
\mathrm{E}(Y)=55 \times 0.1+65 \times 0.2+ \\
75 \times 0.16+85 \times 0.54 \\
=76.4 ;
\end{array}
$$
The variance of $Y$ is
$$
\begin{aligned}
\mathrm{D}(Y)= & (55-76.4)^{2} \times 0.1+ \\
& (65-76.4)^{2} \times 0.2+ \\
& (75-76.4)^{2} \times 0.16+ \\
& (85-76.4)^{2} \times 0.54 \\
= & 112.04 .
\end{aligned}
$$

Thus, $\mathrm{D}(X)<\mathrm{D}(Y)$, meaning the profit fluctuation is smaller when purchasing 16 roses.

Additionally, although $\mathrm{E}(X)<\mathrm{E}(Y)$, the difference is not significant.
Therefore, the flower shop should purchase 16 roses per day.
Method 2 The flower shop should purchase 17 roses per day.
From Method 1, we know that $\mathrm{E}(X)<\mathrm{E}(Y)$, meaning the average profit is higher when purchasing 17 roses compared to purchasing 16 roses.
Therefore, the flower shop should purchase 17 roses per day.