void PrintDataInForm() { RxytextBox.Text = Math.Round(Lab10.GetEmpRegrXonY(), ROUND_DIGITS).ToString(); RyxtextBox.Text = Math.Round(Lab10.GetEmpRegrYonX(), ROUND_DIGITS).ToString(); XonYLabel.Text = Lab10.GetXYEquation(); YonXLabel.Text = Lab10.GetYXEquation(); KxytextBox.Text = Statistic.GetCov(X, Y).ToString(); CortextBox.Text = Statistic.GetCorr(X, Y).ToString(); double[] IntersectPoint = Lab10.GetIntersectionPoint(); if (IntersectPoint == null) { Interlabel.Text = "Точки перетину немає"; } else { Interlabel.Text = String.Format("Точка перетину прямих: ( {0} ; {1} )", Math.Round(IntersectPoint[0], ROUND_DIGITS), Math.Round(IntersectPoint[1], ROUND_DIGITS)); } }
public static double GetCorr(double[] X, double[] Y) { double CORRxy = Statistic.GetCov(X, Y) / (GetSx(X) * GetSy(Y)); return(CORRxy); }