Проверка гипотезы о нормальности закона распределения экспериментальных данных, страница 4

            dataC = dataCount();

            mid = 0;

            for (i = 0; i < arr.Length; mid += arr[i] / n, i++) ;

            X0_A = 0;

            for (i = 0; i < n; X0_A += Math.Pow((arr[i] - mid), 2), i++) ;

            sigma = Math.Sqrt(X0_A / (n-1));

            Xi0_A = new double[8];

            for (i = 0; i < r; Xi0_A[i] = midInter[i] - mid, i++) ;

            Zi = new double[8];

            for (i = 0; i < r; Zi[i] = Xi0_A[i] / sigma, i++) ;

            Fi = new double[8];

            for (i = 0; i < r; Fi[i] = Math.Exp(Math.Pow(Zi[i], 2) / 2) / Math.Sqrt(2 * Math.PI), i++) ;

            Nteor = new double[8];

            //for (i = 0; i < r; Nteor[i] = step * Fi[i] / sigma, i++) ;

            //for (i = 0; i < r; Nteor[i] = dataC[i] * step * sigma / Fi[i], i++) ;

            for (i = 0; i < r; Nteor[i] = 10 * step * sigma / Fi[i], i++) ;

            Xi2 = new double[8];

            for (i = 0; i < r; Xi2[i] = Math.Pow((Nteor[i] - dataC[i]), 2) / dataC[i], i++) ;

            for (i = 1; i < r - 1; X2 += Xi2[i], i++) ;

            f = 6; // 7-1

            /*

            for (i = 0; i < r; Nteor[i] = dataC[i] * step * sigma / Fi[i], i++) ;

            Xi2 = new double[8];

            for (i = 0; i < r; Xi2[i] = Math.Pow((Nteor[i] - dataC[i]), 2) / Math.Pow(dataC[i], 2), i++) ;

            for (i = 0; i < r; X2 += Xi2[i], i++) ;

            */

        }

        private void panel1_Paint(object sender, PaintEventArgs e)

        {

            Graphics g = e.Graphics;

            Brush b = new SolidBrush(Color.Black);

            Pen p = new Pen(b);

            g.DrawString("Number of", Font, b, new PointF(20, 10));

            g.DrawString("Interval", Font, b, new PointF(20, 20));

            g.DrawString("middle of", Font, b, new PointF(80, 10));

            g.DrawString("Interval", Font, b, new PointF(80, 20));

            g.DrawString("Count of data".ToString(), Font, b, new PointF(140, 10));