public void Bad3()
 {
     CorrelationCalc correlation = new CorrelationCalc();
     double[] dependents = new double[] { 43, 21, 25, 42, 57, 59 };
     double[] independents = new double[] { 99, 65, 79, 75, 87 };
     correlation.AddIndependents(independents);
     double coef = Math.Round(correlation.GetPearsons()[0], 6);
 }
        public void Bad4()
        {
            CorrelationCalc correlation = new CorrelationCalc();
            double[] dependents = new double[] { 43, 21, 25, 42, 57, 59 };
            double[] independents = new double[] { 99, 65, 79, 75, 87 };
            correlation.SetDependents(dependents);

            Assert.AreEqual(0, correlation.GetPearsons().Length);
        }
        public void GetPearson2()
        {
            CorrelationCalc correlation = new CorrelationCalc();
            double[] independents = new double[] { 43, 21, 25, 42, 57, 59 };
            double[] dependents = new double[] { 99, 65, 79, 75, 87, 81 };
            correlation.SetDependents(dependents);
            correlation.AddIndependents(independents);
            double coef = Math.Round(correlation.GetPearsons()[0], 6);

            Assert.AreEqual(0.529809, coef);
        }