private double X2fFound(InitialStatisticalAnalys gr1, InitialStatisticalAnalys gr2, double[,] f)
        {
            double rez = 0;

            for (int i = 0; i < f.GetLength(0); i++)
            {
                for (int j = 0; j < f.GetLength(1); j++)
                {
                    double f1 = Distributions.NormalDoublefFound(
                        ((i + 0.5) * gr1.Len.Q / f.GetLength(0) + gr1.Min.Q), gr1.Mx.Q, gr1.Gx.Q,
                        ((j + 0.5) * gr2.Len.Q / f.GetLength(1) + gr2.Min.Q), gr2.Mx.Q, gr2.Gx.Q, Korelation[0]) *
                                (gr2.Len.Q / f.GetLength(1)) * (gr1.Len.Q / f.GetLength(0));
                    if (Math.Round(f1, 4) != 0)
                    {
                        rez += Math.Pow(f[i, j] - f1, 2) / f1;
                    }
                }
            }
            return(rez);
        }