; ========================================================================== ; ####################### ARTS IDL INTERFACE PROCEDURE ##################### ; ========================================================================== ; ; ************************************************************************** ;+ ;NAME: ; aii_student_t_dist_95_table ; ; Purpose: table of Student t-distribution for a 5% significance level. ; Thus for a double sided test a confidence level of 97.5% ; is taken and 95% for single sided test. ; ; Inputs: integer i degree of freedom ; ; Output: float integral value of the integral of the ; t-disttributed variable from -infinity to ; t_(1-alpha/2) for a double sided test ; ; Source: http://www.itl.nist.gov/div898/handbook/mpc/section3/mpc3652.htm ; To reference the Handbook please use a citation of the form: ; NIST/SEMATECH e-Handbook of Statistical Methods, ; http://www.itl.nist.gov/div898/handbook/, date. ; ; History: 2002-10-08 Thomas Kuhn, iup Bremen ;- ; ************************************************************************** ; FUNCTION aii_student_t_dist_95_table, i if ((i LT 1) OR (i GT 89)) then begin print,'aii_student_t_dist_table> ERROR! degree of freedom is out of range!' print,'(1 ERROR! degree of freedom is out of range!' print,'(0 < n < infinity) n =',n print,' return without action!' return, -999.99 endif if (n GT 100) then begin print,'aii_student_t_dist_table> degree of freedom exceeds 100.' print,'take value for infinity' n = 101 endif m = 111 if ( ABS(alpha-0.100) LT 0.0005) then m = 1 if ( ABS(alpha-0.050) LT 0.0005) then m = 2 if ( ABS(alpha-0.025) LT 0.0005) then m = 3 if ( ABS(alpha-0.010) LT 0.0005) then m = 4 if ( ABS(alpha-0.001) LT 0.0005) then m = 5 if (m GT 100) then begin print,'aii_student_t_dist_table> input significance level not recognized' print,' input alpha = ',alpha print,' standard alpha = 0.10 0.05 0.025 0.01 0.001 ' print,' return without action!' return, -999.99 endif ; ; ----------------------------------------------------------------------------------------- ; Given a specified value for : ; ; 1.For a two-sided test, find the column corresponding to alpha/2 and reject the null ; hypothesis if the absolute value of the test statistic is greater than the value of ; t_(alpha/2) in the table below. ; 2.For an upper one-sided test, find the column corresponding to alpha and reject the null ; hypothesis if the test statistic is greater than the tabled value. ; 3.For an lower one-sided test, find the column corresponding to alpha and reject the null ; hypothesis if the test statistic is less than the negative of the tabled value. ; ----------------------------------------------------------------------------------------- ; ; ; ------------------------------------------------ ; degree significance level ; of alpha (single sided test) ; freedom alpha/2 (double sided test) ; ------------------------------------------------ ; n 0.10 0.05 0.025 0.01 0.001 ; ------------------------------------------------ talpha0 = [ $ [ 0, 0.0, 0.0, 0.0, 0.0, 0.0 ], $ ; line 0 [ 1, 3.078, 6.314, 12.706, 31.821, 318.313 ], $ [ 2, 1.886, 2.920, 4.303, 6.965, 22.327 ], $ [ 3, 1.638, 2.353, 3.182, 4.541, 10.215 ], $ [ 4, 1.533, 2.132, 2.776, 3.747, 7.173 ], $ [ 5, 1.476, 2.015, 2.571, 3.365, 5.893 ], $ [ 6, 1.440, 1.943, 2.447, 3.143, 5.208 ], $ [ 7, 1.415, 1.895, 2.365, 2.998, 4.782 ], $ [ 8, 1.397, 1.860, 2.306, 2.896, 4.499 ], $ [ 9, 1.383, 1.833, 2.262, 2.821, 4.296 ], $ [ 10, 1.372, 1.812, 2.228, 2.764, 4.143 ], $ [ 11, 1.363, 1.796, 2.201, 2.718, 4.024 ], $ [ 12, 1.356, 1.782, 2.179, 2.681, 3.929 ], $ [ 13, 1.350, 1.771, 2.160, 2.650, 3.852 ], $ [ 14, 1.345, 1.761, 2.145, 2.624, 3.787 ], $ [ 15, 1.341, 1.753, 2.131, 2.602, 3.733 ], $ [ 16, 1.337, 1.746, 2.120, 2.583, 3.686 ], $ [ 17, 1.333, 1.740, 2.110, 2.567, 3.646 ], $ [ 18, 1.330, 1.734, 2.101, 2.552, 3.610 ], $ [ 19, 1.328, 1.729, 2.093, 2.539, 3.579 ], $ [ 20, 1.325, 1.725, 2.086, 2.528, 3.552 ], $ [ 21, 1.323, 1.721, 2.080, 2.518, 3.527 ], $ [ 22, 1.321, 1.717, 2.074, 2.508, 3.505 ], $ [ 23, 1.319, 1.714, 2.069, 2.500, 3.485 ], $ [ 24, 1.318, 1.711, 2.064, 2.492, 3.467 ], $ [ 25, 1.316, 1.708, 2.060, 2.485, 3.450 ], $ [ 26, 1.315, 1.706, 2.056, 2.479, 3.435 ], $ [ 27, 1.314, 1.703, 2.052, 2.473, 3.421 ], $ [ 28, 1.313, 1.701, 2.048, 2.467, 3.408 ], $ [ 29, 1.311, 1.699, 2.045, 2.462, 3.396 ], $ [ 30, 1.310, 1.697, 2.042, 2.457, 3.385 ], $ [ 31, 1.309, 1.696, 2.040, 2.453, 3.375 ], $ [ 32, 1.309, 1.694, 2.037, 2.449, 3.365 ], $ [ 33, 1.308, 1.692, 2.035, 2.445, 3.356 ], $ [ 34, 1.307, 1.691, 2.032, 2.441, 3.348 ], $ [ 35, 1.306, 1.690, 2.030, 2.438, 3.340 ], $ [ 36, 1.306, 1.688, 2.028, 2.434, 3.333 ], $ [ 37, 1.305, 1.687, 2.026, 2.431, 3.326 ], $ [ 38, 1.304, 1.686, 2.024, 2.429, 3.319 ], $ [ 39, 1.304, 1.685, 2.023, 2.426, 3.313 ], $ [ 40, 1.303, 1.684, 2.021, 2.423, 3.307 ], $ [ 41, 1.303, 1.683, 2.020, 2.421, 3.301 ], $ [ 42, 1.302, 1.682, 2.018, 2.418, 3.296 ], $ [ 43, 1.302, 1.681, 2.017, 2.416, 3.291 ], $ [ 44, 1.301, 1.680, 2.015, 2.414, 3.286 ], $ [ 45, 1.301, 1.679, 2.014, 2.412, 3.281 ], $ [ 46, 1.300, 1.679, 2.013, 2.410, 3.277 ], $ [ 47, 1.300, 1.678, 2.012, 2.408, 3.273 ], $ [ 48, 1.299, 1.677, 2.011, 2.407, 3.269 ], $ [ 49, 1.299, 1.677, 2.010, 2.405, 3.265 ] $ ; line 50 ] ; ; ; ------------------------------------------------ ; degree significance level ; of alpha (single sided test) ; freedom alpha/2 (double sided test) ; ------------------------------------------------ ; n 0.10 0.05 0.025 0.01 0.001 ; ------------------------------------------------ talpha1 = [ $ [ 50, 1.299, 1.676, 2.009, 2.403, 3.261 ], $ ; line 0 [ 51, 1.298, 1.675, 2.008, 2.402, 3.258 ], $ [ 52, 1.298, 1.675, 2.007, 2.400, 3.255 ], $ [ 53, 1.298, 1.674, 2.006, 2.399, 3.251 ], $ [ 54, 1.297, 1.674, 2.005, 2.397, 3.248 ], $ [ 55, 1.297, 1.673, 2.004, 2.396, 3.245 ], $ [ 56, 1.297, 1.673, 2.003, 2.395, 3.242 ], $ [ 57, 1.297, 1.672, 2.002, 2.394, 3.239 ], $ [ 58, 1.296, 1.672, 2.002, 2.392, 3.237 ], $ [ 59, 1.296, 1.671, 2.001, 2.391, 3.234 ], $ [ 60, 1.296, 1.671, 2.000, 2.390, 3.232 ], $ [ 61, 1.296, 1.670, 2.000, 2.389, 3.229 ], $ [ 62, 1.295, 1.670, 1.999, 2.388, 3.227 ], $ [ 63, 1.295, 1.669, 1.998, 2.387, 3.225 ], $ [ 64, 1.295, 1.669, 1.998, 2.386, 3.223 ], $ [ 65, 1.295, 1.669, 1.997, 2.385, 3.220 ], $ [ 66, 1.295, 1.668, 1.997, 2.384, 3.218 ], $ [ 67, 1.294, 1.668, 1.996, 2.383, 3.216 ], $ [ 68, 1.294, 1.668, 1.995, 2.382, 3.214 ], $ [ 69, 1.294, 1.667, 1.995, 2.382, 3.213 ], $ [ 70, 1.294, 1.667, 1.994, 2.381, 3.211 ], $ [ 71, 1.294, 1.667, 1.994, 2.380, 3.209 ], $ [ 72, 1.293, 1.666, 1.993, 2.379, 3.207 ], $ [ 73, 1.293, 1.666, 1.993, 2.379, 3.206 ], $ [ 74, 1.293, 1.666, 1.993, 2.378, 3.204 ], $ [ 75, 1.293, 1.665, 1.992, 2.377, 3.202 ], $ [ 76, 1.293, 1.665, 1.992, 2.376, 3.201 ], $ [ 77, 1.293, 1.665, 1.991, 2.376, 3.199 ], $ [ 78, 1.292, 1.665, 1.991, 2.375, 3.198 ], $ [ 79, 1.292, 1.664, 1.990, 2.374, 3.197 ], $ [ 80, 1.292, 1.664, 1.990, 2.374, 3.195 ], $ [ 81, 1.292, 1.664, 1.990, 2.373, 3.194 ], $ [ 82, 1.292, 1.664, 1.989, 2.373, 3.193 ], $ [ 83, 1.292, 1.663, 1.989, 2.372, 3.191 ], $ [ 84, 1.292, 1.663, 1.989, 2.372, 3.190 ], $ [ 85, 1.292, 1.663, 1.988, 2.371, 3.189 ], $ [ 86, 1.291, 1.663, 1.988, 2.370, 3.188 ], $ [ 87, 1.291, 1.663, 1.988, 2.370, 3.187 ], $ [ 88, 1.291, 1.662, 1.987, 2.369, 3.185 ], $ [ 89, 1.291, 1.662, 1.987, 2.369, 3.184 ], $ [ 90, 1.291, 1.662, 1.987, 2.368, 3.183 ], $ [ 91, 1.291, 1.662, 1.986, 2.368, 3.182 ], $ [ 92, 1.291, 1.662, 1.986, 2.368, 3.181 ], $ [ 93, 1.291, 1.661, 1.986, 2.367, 3.180 ], $ [ 94, 1.291, 1.661, 1.986, 2.367, 3.179 ], $ [ 95, 1.291, 1.661, 1.985, 2.366, 3.178 ], $ [ 96, 1.290, 1.661, 1.985, 2.366, 3.177 ], $ [ 97, 1.290, 1.661, 1.985, 2.365, 3.176 ], $ [ 98, 1.290, 1.661, 1.984, 2.365, 3.175 ], $ [ 99, 1.290, 1.660, 1.984, 2.365, 3.175 ], $ [100, 1.290, 1.660, 1.984, 2.364, 3.174 ], $ [101, 1.282, 1.645, 1.960, 2.326, 3.090 ] $ ; infinity value ] ; ta = -999.9 if (n LT 50) then begin ta = talpha0[ m, n] endif else begin ta = talpha1[ m, n-50] endelse ; ; RETURN, ta END ; ; ; ==========================================================================