using System; using System.Collections.Generic; using S = Science.Statistics.BasicStatistics; namespace ScienceTest.StatisticsTest.BasicStatisticsTest { public class RegressionRMSErrorTest { public RegressionRMSErrorTest() { } 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); S.StandardDeviationAndAverage sd = new S.StandardDeviationAndAverage(); sd.Average = reg.PredictedYFromX(83.0); sd.StandardDeviation = reg.RootMeanSquareErrorOfY; S.Variable vari = new S.Variable(sd); double su = vari.ToStandardUnit(70.0); S.NormalCurve nc = new S.NormalCurve(); double symArea = nc.AreaBetween(su, -su); double percent = (100.0 - symArea) / 2.0 + symArea; result += percent.ToString(); } } } /* 77.3372647623191 */