using System; using System.Collections.Generic; using S = Science.Statistics.BasicStatistics; namespace ScienceTest.StatisticsTest.BasicStatisticsTest { public class RegressionTest { public RegressionTest() { } private string result; public string Result { get{return result;} } public void Compute() { S.Regression reg = new S.Regression(71.0,12.0,70.0,11.0,0.6); result += reg.PredictedYFromX(83.0).ToString()+"\r\n"; for (int i = 0; i < 30; i++) result += (i+60).ToString() + " " + reg.RegressionLine((double)i + 60.0).ToString() + "\r\n"; S.Regression reg2 = new S.Regression(70.0, 11.0, 71.0, 12.0, 0.6); result += reg2.PredictedYFromX(76.6).ToString(); } } } /* 76.6 60 63.95 61 64.5 62 65.05 63 65.6 64 66.15 65 66.7 66 67.25 67 67.8 68 68.35 69 68.9 70 69.45 71 70 72 70.55 73 71.1 74 71.65 75 72.2 76 72.75 77 73.3 78 73.85 79 74.4 80 74.95 81 75.5 82 76.05 83 76.6 84 77.15 85 77.7 86 78.25 87 78.8 88 79.35 89 79.9 75.32 */