## 6 Numerical Experiments  
In this section, we present the results of the joint estimation of the density and distribution function for two examples that use a two-parameter family (30) of densities with different degrees of smoothness. In these examples, the results are presented in the tables that contain the errors of the projection estimates of the density and distribution function in \(L_{2}(\Omega)\). We study the dependence of error on the projection expansion length (for the maximum degree \(n\) of the Legendre polynomials, values 4, 8, 16, 32, and 64 are used, i.e., \(n=2^{k+2}\) for \(k=0,1,\ldots,4\)), on the sample size \(N=2^{m+9}\) for \(m=0,1,\ldots,18\), and on the degree of smoothness of the approximated density (see Examples 1 and 2 below). Algorithm 2 is applied for estimation. These examples show the approximation errors \(\varepsilon_{g}^{(n)}\) and \(\varepsilon_{f}^{(n)}\), which are calculated using Formula (39), i.e., deterministic components of projection estimate errors. In the tables, they are in rows marked by the symbol \"\({}_{k}\)\". The remaining rows contain errors that include deterministic and stochastic components. The formulae for these errors follow from [PERSON]'s identity:  
\[\varepsilon_{g}^{(n)} =\left(\int_{-1}^{1}g_{v_{1},v_{2}}^{2}(x)dx-\sum_{i=0}^{n}G_{v_{ 1},v_{2},i}^{2}+\sum_{i=0}^{n}(G_{v_{1},v_{2},i}-\bar{G}_{v_{1},v_{2},i})^{2} \right)^{1/2},\] \[\varepsilon_{f}^{(n)} =\left(\int_{-1}^{1}f_{v_{1},v_{2}}^{2}(x)dx-\sum_{i=0}^{n}F_{v_{ 1},v_{2},i}^{2}+\sum_{i=0}^{n}(F_{v_{1},v_{2},i}-\bar{F}_{v_{1},v_{2},i})^{2} \right)^{1/2},\]  
where \(\bar{G}_{v_{1},v_{2},i}\) and \(\bar{F}_{v_{1},v_{2},i}\) are estimates of expansion coefficients \(G_{v_{1},v_{2},i}\) and \(F_{v_{1},v_{2},i}\), respectively. For an arbitrary density \(g\), a similar formula was used to obtain estimate (27). **Example 1**. : _Let \(g_{v_{1},v_{2}}\) be the density from a two-parameter family (30), and let \(f_{v_{1},v_{2}}\) be the related distribution function described by Formula (32), with the following parameters: \(v_{1}=\
u\), \(v_{2}=\
u+1\) for \(\
u=1\). The modeling formula is given in Proposition 1._  
_The function \(g_{1,2}\) is continuous, non-differentiable at \(x=0\), but its first-order derivative exists almost everywhere on \(\Omega\): \(g_{1,2}\in C(\Omega)\), \(g_{1,2}^{(1)}\in L_{2}(\Omega)\), i.e., \(g_{1,2}\in W_{2}^{1}(\Omega)\). However, if we do not restrict ourselves to the space \(W_{2}^{s}(\Omega)\) with natural \(s\) (see Remark 1), then \(g_{1,2}\in W_{2}^{s}(\Omega)\) for \(s<\min\{v_{1},v_{2}\}+1/2=3/2\) (\(\sup s=3/2\)). The degree of smoothness of \(f_{1,2}\) is greater, and \(f_{1,2}\in W_{2}^{s+1}(\Omega)\). This corresponds to Formulae (40), which take the form_  
\[\varepsilon_{g}^{(n)}\approx\frac{C^{g}}{n^{3/2}},\ \ \ \varepsilon_{f}^{(n)} \approx\frac{C^{f}}{n^{5/2}}\]  
_for given parameters \(v_{1}\) and \(v_{2}\)._  
_According to Theorem 1, for the limit value \(s=3/2\), to achieve the required approximation accuracy \(B(g_{1,2},\bar{g}_{1,2}^{(n)})=\gamma\leqslant cN^{-3/8}\), \(c>0\), the conditionally optimal parameters should be as follows: \(N_{\rm opt}\asymp n_{\rm opt}^{4}\); this is confirmed by the statistical modeling results (see Tables 1 and 2). In the row \"\({}_{k}\)\" of Table 1, the deterministic component of error decreases by approximately \(2^{3/2}\approx 2.8\) times (in Table 2, by approximately \(2^{5/2}\approx 5.6\) times) when the projection expansion length \(n\) is doubled. In the rest of this table, errors corresponding to optimal parameters \(n_{\rm opt}\) and \(N_{\rm opt}\) are highlighted in bold, and they are consistent with the relationship \(N_{\rm opt}\asymp n_{\rm opt}^{4}\).