@@ -60,14 +60,14 @@ public class Test_StudentT
6060 [ TestMethod ( ) ]
6161 public void Test_StudentT_PDF ( )
6262 {
63- var t = new StudentT ( 4.2d ) ;
63+ var t = new StudentT ( 4d ) ;
6464 double pdf = t . PDF ( 1.4d ) ;
6565 double result = 0.138377537135553d ;
66- Assert . AreEqual ( pdf , result , 1E-10 ) ;
67- t = new StudentT ( 2.5d , 0.5d , 4.2d ) ;
66+ Assert . AreEqual ( result , pdf , 1E-10 ) ;
67+ t = new StudentT ( 2.5d , 0.5d , 4d ) ;
6868 pdf = t . PDF ( 1.4d ) ;
6969 result = 0.0516476521260042d ;
70- Assert . AreEqual ( pdf , result , 1E-10 ) ;
70+ Assert . AreEqual ( result , pdf , 1E-10 ) ;
7171 }
7272
7373 /// <summary>
@@ -76,14 +76,14 @@ public void Test_StudentT_PDF()
7676 [ TestMethod ( ) ]
7777 public void Test_StudentT_CDF ( )
7878 {
79- var t = new StudentT ( 4.2d ) ;
79+ var t = new StudentT ( 4d ) ;
8080 double cdf = t . CDF ( 1.4d ) ;
8181 double result = 0.882949686336585d ;
82- Assert . AreEqual ( cdf , result , 1E-10 ) ;
83- t = new StudentT ( 2.5d , 0.5d , 4.2d ) ;
82+ Assert . AreEqual ( result , cdf , 1E-10 ) ;
83+ t = new StudentT ( 2.5d , 0.5d , 4d ) ;
8484 cdf = t . CDF ( 1.4d ) ;
8585 result = 0.0463263350898173d ;
86- Assert . AreEqual ( cdf , result , 1E-10 ) ;
86+ Assert . AreEqual ( result , cdf , 1E-10 ) ;
8787 }
8888
8989 /// <summary>
@@ -92,16 +92,16 @@ public void Test_StudentT_CDF()
9292 [ TestMethod ( ) ]
9393 public void Test_StudentT_InverseCDF ( )
9494 {
95- var t = new StudentT ( 4.2d ) ;
95+ var t = new StudentT ( 4d ) ;
9696 double cdf = t . CDF ( 1.4d ) ;
9797 double invcdf = t . InverseCDF ( cdf ) ;
9898 double result = 1.4d ;
99- Assert . AreEqual ( invcdf , result , 1E-2 ) ;
100- t = new StudentT ( 2.5d , 0.5d , 4.2d ) ;
99+ Assert . AreEqual ( result , invcdf , 1E-2 ) ;
100+ t = new StudentT ( 2.5d , 0.5d , 4d ) ;
101101 cdf = t . CDF ( 1.4d ) ;
102102 invcdf = t . InverseCDF ( cdf ) ;
103103 result = 1.4d ;
104- Assert . AreEqual ( invcdf , result , 1E-2 ) ;
104+ Assert . AreEqual ( result , invcdf , 1E-2 ) ;
105105 }
106106
107107 /// <summary>
@@ -111,14 +111,14 @@ public void Test_StudentT_InverseCDF()
111111 public void Test_Construction ( )
112112 {
113113 var t = new StudentT ( ) ;
114- Assert . AreEqual ( 0 , t . Mu ) ;
115- Assert . AreEqual ( 1 , t . Sigma ) ;
116- Assert . AreEqual ( 10 , t . DegreesOfFreedom ) ;
114+ Assert . AreEqual ( 0d , t . Mu ) ;
115+ Assert . AreEqual ( 1d , t . Sigma ) ;
116+ Assert . AreEqual ( 10d , t . DegreesOfFreedom ) ;
117117
118118 var t2 = new StudentT ( 10 , 10 , 10 ) ;
119- Assert . AreEqual ( 10 , t2 . Mu ) ;
120- Assert . AreEqual ( 10 , t2 . Sigma ) ;
121- Assert . AreEqual ( 10 , t2 . DegreesOfFreedom ) ;
119+ Assert . AreEqual ( 10d , t2 . Mu ) ;
120+ Assert . AreEqual ( 10d , t2 . Sigma ) ;
121+ Assert . AreEqual ( 10d , t2 . DegreesOfFreedom ) ;
122122 }
123123
124124 /// <summary>
@@ -148,7 +148,7 @@ public void Test_ParametersToString()
148148 Assert . AreEqual ( "Scale (σ)" , t . ParametersToString [ 1 , 0 ] ) ;
149149 Assert . AreEqual ( "Degrees of Freedom (ν)" , t . ParametersToString [ 2 , 0 ] ) ;
150150 Assert . AreEqual ( "0" , t . ParametersToString [ 0 , 1 ] ) ;
151- Assert . AreEqual ( "1" , t . ParametersToString [ 1 , 1 ] ) ;
151+ Assert . AreEqual ( "1" , t . ParametersToString [ 1 , 1 ] ) ;
152152 Assert . AreEqual ( "10" , t . ParametersToString [ 2 , 1 ] ) ;
153153 }
154154
@@ -160,10 +160,10 @@ public void Test_Moments()
160160 {
161161 var dist = new StudentT ( 10 , 1 , 100 ) ;
162162 var mom = dist . CentralMoments ( 1E-8 ) ;
163- Assert . AreEqual ( mom [ 0 ] , dist . Mean , 1E-2 ) ;
164- Assert . AreEqual ( mom [ 1 ] , dist . StandardDeviation , 1E-2 ) ;
165- Assert . AreEqual ( mom [ 2 ] , dist . Skewness , 1E-2 ) ;
166- Assert . AreEqual ( mom [ 3 ] , dist . Kurtosis , 1E-2 ) ;
163+ Assert . AreEqual ( dist . Mean , mom [ 0 ] , 1E-2 ) ;
164+ Assert . AreEqual ( dist . StandardDeviation , mom [ 1 ] , 1E-2 ) ;
165+ Assert . AreEqual ( dist . Skewness , mom [ 2 ] , 1E-2 ) ;
166+ Assert . AreEqual ( dist . Kurtosis , mom [ 3 ] , 1E-2 ) ;
167167 }
168168
169169 /// <summary>
@@ -231,7 +231,7 @@ public void Test_Skewness()
231231 Assert . AreEqual ( 0 , t . Skewness ) ;
232232
233233 var t2 = new StudentT ( 1 , 1 , 1 ) ;
234- Assert . AreEqual ( double . NaN , t2 . Skewness ) ;
234+ Assert . AreEqual ( double . NaN , t2 . Skewness ) ;
235235 }
236236
237237 /// <summary>
@@ -241,7 +241,7 @@ public void Test_Skewness()
241241 public void Test_Kurtosis ( )
242242 {
243243 var t = new StudentT ( ) ;
244- Assert . AreEqual ( 4 , t . Kurtosis ) ;
244+ Assert . AreEqual ( 4 , t . Kurtosis ) ;
245245
246246 var t2 = new StudentT ( 1 , 1 , 4 ) ;
247247 Assert . AreEqual ( double . PositiveInfinity , t2 . Kurtosis ) ;
0 commit comments