27-Nov-2018 20:01:18 ASA266_TEST MATLAB version Tests for the ASA266 package. TEST01 ALNORM, NORMP, and NPROB are routines that compute the cumulative density function for the normal distribution. X CDF1 1-CDF1 CDF2 1-CDF2 PDF2 CDF3 1-CDF3 PDF3 0.000000 0.500000 0.500000 0.500000 0.500000 0.398942 0.500000 0.500000 0.398942 0.200000 0.579260 0.420740 0.579260 0.420740 0.391043 0.579260 0.420740 0.391043 0.400000 0.655422 0.344578 0.655422 0.344578 0.368270 0.655422 0.344578 0.368270 0.600000 0.725747 0.274253 0.725747 0.274253 0.333225 0.725747 0.274253 0.333225 0.800000 0.788145 0.211855 0.788145 0.211855 0.289692 0.788145 0.211855 0.289692 1.000000 0.841345 0.158655 0.841345 0.158655 0.241971 0.841345 0.158655 0.241971 1.200000 0.884930 0.115070 0.884930 0.115070 0.194186 0.884930 0.115070 0.194186 1.400000 0.919243 0.080757 0.919243 0.080757 0.149727 0.919243 0.080757 0.149727 1.600000 0.945201 0.054799 0.945201 0.054799 0.110921 0.945201 0.054799 0.110921 1.800000 0.964070 0.035930 0.964070 0.035930 0.078950 0.964070 0.035930 0.078950 2.000000 0.977250 0.022750 0.977250 0.022750 0.053991 0.977250 0.022750 0.053991 2.200000 0.986097 0.013903 0.986097 0.013903 0.035475 0.986097 0.013903 0.035475 2.400000 0.991802 0.008198 0.991802 0.008198 0.022395 0.991802 0.008198 0.022395 2.600000 0.995339 0.004661 0.995339 0.004661 0.013583 0.995339 0.004661 0.013583 2.800000 0.997445 0.002555 0.997445 0.002555 0.007915 0.997445 0.002555 0.007915 3.000000 0.998650 0.001350 0.998650 0.001350 0.004432 0.998650 0.001350 0.004432 TEST02 PPND, R4_NORMAL_01_CDF_INVERSE and R8_NORMAL_01_CDF_INVERSE compute the percentage points of the normal distribution. CDF, PPND(CDF), R4(CDF), R8(CDF) 0.100000 -1.281552 -1.281552 -1.281552 0.200000 -0.841621 -0.841621 -0.841621 0.300000 -0.524401 -0.524401 -0.524401 0.400000 -0.253347 -0.253347 -0.253347 0.500000 0.000000 0.000000 0.000000 0.600000 0.253347 0.253347 0.253347 0.700000 0.524401 0.524401 0.524401 0.800000 0.841621 0.841621 0.841621 0.900000 1.281552 1.281552 1.281552 TEST03 digamma(X) = d ( Log ( Gamma ( X ) ) ) / dX. DIGAMMA and R8_PSI compute the digamma function: X DIGAMMA R8_PSI 0.100000 -10.423755 -10.423755 0.200000 -5.289040 -5.289040 0.300000 -3.502524 -3.502524 0.400000 -2.561385 -2.561385 0.500000 -1.963510 -1.963510 0.600000 -1.540619 -1.540619 0.700000 -1.220024 -1.220024 0.800000 -0.965009 -0.965009 0.900000 -0.754927 -0.754927 1.000000 -0.577216 -0.577216 TEST04 TRIGAMMA computes the trigamma function: trigamma(X) = d^2 ( Log ( Gamma ( X ) ) ) / dX^2. X TRIGAMMA 0.100000 101.433299 0.200000 26.267377 0.300000 12.245365 0.400000 7.275357 0.500000 4.934802 0.600000 3.636210 0.700000 2.834049 0.800000 2.299474 0.900000 1.922540 1.000000 1.644934 TEST05 ALNGAM, ALOGAM, R8_GAMMA_LOG, and LNGAMMA compute the logarithm of the gamma function. X ALNGAM ALOGAM R8_GAMMA_LOG LNGAMMA 0.100000 2.252713 2.252713 2.252713 2.252713 0.200000 1.524064 1.524064 1.524064 1.524064 0.300000 1.095798 1.095798 1.095798 1.095798 0.400000 0.796678 0.796678 0.796678 0.796678 0.500000 0.572365 0.572365 0.572365 0.572365 0.600000 0.398234 0.398234 0.398234 0.398234 0.700000 0.260867 0.260867 0.260867 0.260867 0.800000 0.152060 0.152060 0.152060 0.152060 0.900000 0.066376 0.066376 0.066376 0.066376 1.000000 0.000000 -0.000000 0.000000 0.000000 TEST06 GAMAIN, GAMMDS and GAMMAD compute the incomplete Gamma integral. X P GAMMDS GAMMAD GAMAIN 0.100000 0.100000 0.827552 0.827552 0.827552 0.100000 0.200000 0.676043 0.676043 0.676043 0.100000 0.300000 0.545913 0.545913 0.545913 0.100000 0.400000 0.436236 0.436236 0.436236 0.100000 0.500000 0.345279 0.345279 0.345279 0.100000 0.600000 0.270899 0.270899 0.270899 0.100000 0.700000 0.210824 0.210824 0.210824 0.100000 0.800000 0.162840 0.162840 0.162840 0.100000 0.900000 0.124895 0.124895 0.124895 0.100000 1.000000 0.095163 0.095163 0.095163 0.200000 0.100000 0.879420 0.879420 0.879420 0.200000 0.200000 0.764435 0.764435 0.764435 0.200000 0.300000 0.657507 0.657507 0.657507 0.200000 0.400000 0.560104 0.560104 0.560104 0.200000 0.500000 0.472911 0.472911 0.472911 0.200000 0.600000 0.396022 0.396022 0.396022 0.200000 0.700000 0.329108 0.329108 0.329108 0.200000 0.800000 0.271553 0.271553 0.271553 0.200000 0.900000 0.222566 0.222566 0.222566 0.200000 1.000000 0.181269 0.181269 0.181269 0.300000 0.100000 0.908358 0.908358 0.908358 0.300000 0.200000 0.816527 0.816527 0.816527 0.300000 0.300000 0.726957 0.726957 0.726957 0.300000 0.400000 0.641490 0.641490 0.641490 0.300000 0.500000 0.561422 0.561422 0.561422 0.300000 0.600000 0.487583 0.487583 0.487583 0.300000 0.700000 0.420417 0.420417 0.420417 0.300000 0.800000 0.360060 0.360060 0.360060 0.300000 0.900000 0.306407 0.306407 0.306407 0.300000 1.000000 0.259182 0.259182 0.259182 0.400000 0.100000 0.927574 0.927574 0.927574 0.400000 0.200000 0.852337 0.852337 0.852337 0.400000 0.300000 0.776381 0.776381 0.776381 0.400000 0.400000 0.701441 0.701441 0.701441 0.400000 0.500000 0.628907 0.628907 0.628907 0.400000 0.600000 0.559835 0.559835 0.559835 0.400000 0.700000 0.494986 0.494986 0.494986 0.400000 0.800000 0.434858 0.434858 0.434858 0.400000 0.900000 0.379725 0.379725 0.379725 0.400000 1.000000 0.329680 0.329680 0.329680 0.500000 0.100000 0.941402 0.941402 0.941402 0.500000 0.200000 0.878775 0.878775 0.878775 0.500000 0.300000 0.813812 0.813812 0.813812 0.500000 0.400000 0.748019 0.748019 0.748019 0.500000 0.500000 0.682689 0.682689 0.682689 0.500000 0.600000 0.618901 0.618901 0.618901 0.500000 0.700000 0.557515 0.557515 0.557515 0.500000 0.800000 0.499192 0.499192 0.499192 0.500000 0.900000 0.444406 0.444406 0.444406 0.500000 1.000000 0.393469 0.393469 0.393469 0.600000 0.100000 0.951832 0.951832 0.951832 0.600000 0.200000 0.899123 0.899123 0.899123 0.600000 0.300000 0.843211 0.843211 0.843211 0.600000 0.400000 0.785350 0.785350 0.785350 0.600000 0.500000 0.726678 0.726678 0.726678 0.600000 0.600000 0.668198 0.668198 0.668198 0.600000 0.700000 0.610769 0.610769 0.610769 0.600000 0.800000 0.555101 0.555101 0.555101 0.600000 0.900000 0.501764 0.501764 0.501764 0.600000 1.000000 0.451188 0.451188 0.451188 0.700000 0.100000 0.959945 0.959945 0.959945 0.700000 0.200000 0.915220 0.915220 0.915220 0.700000 0.300000 0.866863 0.866863 0.866863 0.700000 0.400000 0.815892 0.815892 0.815892 0.700000 0.500000 0.763276 0.763276 0.763276 0.700000 0.600000 0.709908 0.709908 0.709908 0.700000 0.700000 0.656589 0.656589 0.656589 0.700000 0.800000 0.604021 0.604021 0.604021 0.700000 0.900000 0.552799 0.552799 0.552799 0.700000 1.000000 0.503415 0.503415 0.503415 0.800000 0.100000 0.966395 0.966395 0.966395 0.800000 0.200000 0.928202 0.928202 0.928202 0.800000 0.300000 0.886215 0.886215 0.886215 0.800000 0.400000 0.841245 0.841245 0.841245 0.800000 0.500000 0.794097 0.794097 0.794097 0.800000 0.600000 0.745541 0.745541 0.745541 0.800000 0.700000 0.696301 0.696301 0.696301 0.800000 0.800000 0.647032 0.647032 0.647032 0.800000 0.900000 0.598320 0.598320 0.598320 0.800000 1.000000 0.550671 0.550671 0.550671 0.900000 0.100000 0.971607 0.971607 0.971607 0.900000 0.200000 0.938827 0.938827 0.938827 0.900000 0.300000 0.902253 0.902253 0.902253 0.900000 0.400000 0.862521 0.862521 0.862521 0.900000 0.500000 0.820288 0.820288 0.820288 0.900000 0.600000 0.776205 0.776205 0.776205 0.900000 0.700000 0.730906 0.730906 0.730906 0.900000 0.800000 0.684986 0.684986 0.684986 0.900000 0.900000 0.638996 0.638996 0.638996 0.900000 1.000000 0.593430 0.593430 0.593430 1.000000 0.100000 0.975873 0.975873 0.975873 1.000000 0.200000 0.947620 0.947620 0.947620 1.000000 0.300000 0.915674 0.915674 0.915674 1.000000 0.400000 0.880526 0.880526 0.880526 1.000000 0.500000 0.842701 0.842701 0.842701 1.000000 0.600000 0.802740 0.802740 0.802740 1.000000 0.700000 0.761188 0.761188 0.761188 1.000000 0.800000 0.718571 0.718571 0.718571 1.000000 0.900000 0.675392 0.675392 0.675392 1.000000 1.000000 0.632121 0.632121 0.632121 TEST07 PPCHI2 computes the percentage points of the chi squared distribution. CDF, PPCHI2(CDF) For Chi^2 parameter value 1.000000 0.100000 0.015791 0.200000 0.064185 0.300000 0.148472 0.400000 0.274996 0.500000 0.454936 0.600000 0.708326 0.700000 1.074194 0.800000 1.642374 0.900000 2.705543 For Chi^2 parameter value 2.000000 0.100000 0.210721 0.200000 0.446287 0.300000 0.713350 0.400000 1.021651 0.500000 1.386294 0.600000 1.832581 0.700000 2.407946 0.800000 3.218876 0.900000 4.605170 For Chi^2 parameter value 3.000000 0.100000 0.584374 0.200000 1.005174 0.300000 1.423652 0.400000 1.869168 0.500000 2.365974 0.600000 2.946166 0.700000 3.664871 0.800000 4.641628 0.900000 6.251389 For Chi^2 parameter value 4.000000 0.100000 1.063623 0.200000 1.648777 0.300000 2.194698 0.400000 2.752843 0.500000 3.356694 0.600000 4.044626 0.700000 4.878433 0.800000 5.988617 0.900000 7.779440 For Chi^2 parameter value 5.000000 0.100000 1.610308 0.200000 2.342534 0.300000 2.999908 0.400000 3.655500 0.500000 4.351460 0.600000 5.131867 0.700000 6.064430 0.800000 7.289276 0.900000 9.236357 For Chi^2 parameter value 6.000000 0.100000 2.204131 0.200000 3.070088 0.300000 3.827552 0.400000 4.570154 0.500000 5.348121 0.600000 6.210757 0.700000 7.231135 0.800000 8.558060 0.900000 10.644641 For Chi^2 parameter value 7.000000 0.100000 2.833107 0.200000 3.822322 0.300000 4.671330 0.400000 5.493235 0.500000 6.345811 0.600000 7.283208 0.700000 8.383431 0.800000 9.803250 0.900000 12.017037 For Chi^2 parameter value 8.000000 0.100000 3.489539 0.200000 4.593574 0.300000 5.527422 0.400000 6.422646 0.500000 7.344122 0.600000 8.350525 0.700000 9.524458 0.800000 11.030091 0.900000 13.361566 For Chi^2 parameter value 9.000000 0.100000 4.168159 0.200000 5.380053 0.300000 6.393306 0.400000 7.357035 0.500000 8.342833 0.600000 9.413640 0.700000 10.656372 0.800000 12.242145 0.900000 14.683657 TEST08 For samples of a Dirichlet PDF, DIRICHLET_ESTIMATE estimates the parameters. DIRICHLET_MEAN finds the means; DIRICHLET_VARIANCE finds the variances; Sampled data: 1 0.178000 0.346000 0.476000 2 0.162000 0.307000 0.531000 3 0.083000 0.448000 0.469000 4 0.087000 0.474000 0.439000 5 0.078000 0.503000 0.419000 6 0.040000 0.456000 0.504000 7 0.049000 0.363000 0.588000 8 0.100000 0.317000 0.583000 9 0.075000 0.394000 0.531000 10 0.084000 0.445000 0.471000 11 0.060000 0.435000 0.505000 12 0.089000 0.418000 0.493000 13 0.050000 0.485000 0.465000 14 0.073000 0.378000 0.549000 15 0.064000 0.562000 0.374000 16 0.085000 0.465000 0.450000 17 0.094000 0.388000 0.518000 18 0.014000 0.449000 0.537000 19 0.060000 0.544000 0.396000 20 0.031000 0.569000 0.400000 21 0.025000 0.491000 0.484000 22 0.045000 0.613000 0.342000 23 0.019500 0.526000 0.454500 Observed means, variances are: 1 0.071543 0.001578 2 0.451130 0.006562 3 0.477326 0.004058 Index, Estimate, Lower Limit, Upper Limit: 1 3.215425 1.890272 4.540579 2 20.382491 11.928183 28.836799 3 21.685248 12.692475 30.678022 Expected means, variances are: 1 0.071007 0.001425 2 0.450112 0.005348 3 0.478881 0.005392 Alpha sum is 45.283164 NORMALIZED VALUES: Index, Estimate, Lower Limit, Upper Limit: 1 0.071007 0.041743 0.100271 2 0.450112 0.263413 0.636811 3 0.478881 0.280291 0.677471 Log likelikhood function = 73.124994 TEST09 For a Dirichlet distribution, DIRICHLET_SAMPLE samples; DIRICHLET_MEAN finds the means; DIRICHLET_VARIANCE finds the variances; DIRICHLET_ESTIMATE estimates the parameters. Distribution parameters are: 1 3.220000 2 20.380000 3 21.680000 Distribution means, variances are: 1 0.071113 0.001427 2 0.450088 0.005348 3 0.478799 0.005392 Number of samples is 1000 First few samples: 1 0.150497 0.433174 0.416329 2 0.065559 0.344187 0.590254 3 0.128607 0.409041 0.462351 4 0.076789 0.356785 0.566426 5 0.055694 0.362771 0.581535 6 0.069982 0.489573 0.440444 7 0.039081 0.590835 0.370084 8 0.076848 0.547977 0.375175 9 0.033772 0.397716 0.568512 10 0.048547 0.571179 0.380274 Observed means, variances are: 1 0.069176 0.001399 2 0.449166 0.005285 3 0.481658 0.005252 Index, Estimate, Lower Limit, Upper Limit: 1 3.123217 2.927547 3.318887 2 20.351846 19.067796 21.635896 3 21.821465 20.444595 23.198335 Alpha sum is 45.296529 NORMALIZED VALUES: Index, Estimate, Lower Limit, Upper Limit: 1 0.068950 0.064631 0.073270 2 0.449303 0.420955 0.477650 3 0.481747 0.451350 0.512144 Log likelikhood function = 3195.746139 TEST10 For a Dirichlet mixture distribution, DIRICHLET_MIX_SAMPLE samples; DIRICHLET_MIX_MEAN computes means; DIRICHLET_MIX_VARIANCE computes variances. Component Weight 1 3.000000 2 2.000000 3 1.000000 Component Parameters Means Variances 1 1 0.050000 0.050000 0.023750 2 0.200000 0.200000 0.080000 3 0.750000 0.750000 0.093750 2 1 0.850000 0.850000 0.063750 2 0.100000 0.100000 0.045000 3 0.050000 0.050000 0.023750 3 1 0.000000 0.000000 0.000000 2 0.500000 0.500000 0.125000 3 0.500000 0.500000 0.125000 Element Mean 1 0.308333 2 0.216667 3 0.475000 Number of samples is 200 First few samples: Sample Component X 1 1 0.834665 0.112933 0.052402 2 1 0.000000 0.000003 0.999997 3 2 0.953697 0.046303 0.000000 4 3 0.000000 0.839862 0.160138 5 2 0.984848 0.015151 0.000001 6 2 0.999168 0.000719 0.000113 7 2 0.854503 0.121128 0.024369 8 1 0.061657 0.130630 0.807713 9 1 0.000090 0.608623 0.391288 10 1 0.000000 0.000745 0.999255 Element Observed mean, variance 1 0.300954 0.176911 2 0.195088 0.078626 3 0.503958 0.166115 ASA266_TEST Normal end of execution. 27-Nov-2018 20:01:18