02 March 2022 09:28:57 PM TRUNCATED_NORMAL_TEST C++ version. Test the TRUNCATED_NORMAL library. I4_UNIFORM_AB_TEST I4_UNIFORM_AB computes pseudorandom values in an interval [A,B]. The lower endpoint A = -100 The upper endpoint B = 200 The initial seed is 123456789 1 -35 2 187 3 149 4 69 5 25 6 -81 7 -23 8 -67 9 -87 10 90 11 -82 12 35 13 20 14 127 15 139 16 -100 17 170 18 5 19 -72 20 -96 R8_CHOOSE_TEST R8_CHOOSE evaluates C(N,K). N K CNK 0 0 1 1 0 1 1 1 1 2 0 1 2 1 2 2 2 1 3 0 1 3 1 3 3 2 3 3 3 1 4 0 1 4 1 4 4 2 6 4 3 4 4 4 1 5 0 1 5 1 5 5 2 10 5 3 10 5 4 5 5 5 1 R8_FACTORIAL2_TEST R8_FACTORIAL2 evaluates the double factorial function. N Exact Computed 0 1 1 1 1 1 2 2 2 3 3 3 4 8 8 5 15 15 6 48 48 7 105 105 8 384 384 9 945 945 10 3840 3840 11 10395 10395 12 46080 46080 13 135135 135135 14 645120 645120 15 2027025 2027025 R8_MOP_TEST R8_MOP evaluates (-1.0)^I4 as an R8. I4 R8_MOP(I4) -57 -1 92 1 66 1 12 1 -17 -1 -87 -1 -49 -1 -78 1 -92 1 27 -1 R8_UNIFORM_01_TEST R8_UNIFORM_01 samples a uniform random distribution in [0,1]. distributed random numbers. Using initial random number seed = 123456789 First few values: 0 0.218418 1 0.956318 2 0.829509 3 0.561695 4 0.415307 5 0.0661187 6 0.257578 7 0.109957 8 0.043829 9 0.633966 Number of samples was 1000 Minimum value was 0.00183837 Maximum value was 0.997908 Average value was 0.50304 Variance was 0.082332 R8POLY_PRINT_TEST R8POLY_PRINT prints an R8POLY. The R8POLY: p(x) = 9 * x ^ 5 + 0.78 * x ^ 4 + 56 * x ^ 2 - 3.4 * x + 2 R8POLY_VALUE_HORNER_TEST R8POLY_VALUE_HORNER evaluates a polynomial at one point, using Horner's method. The polynomial coefficients: p(x) = 1 * x ^ 4 - 10 * x ^ 3 + 35 * x ^ 2 - 50 * x + 24 I X P(X) 0 0 24 1 0.333333 10.8642 2 0.666667 3.45679 3 1 0 4 1.33333 -0.987654 5 1.66667 -0.691358 6 2 0 7 2.33333 0.493827 8 2.66667 0.493827 9 3 0 10 3.33333 -0.691358 11 3.66667 -0.987654 12 4 0 13 4.33333 3.45679 14 4.66667 10.8642 15 5 24 R8VEC_LINSPACE_NEW_TEST For a R8VEC: R8VEC_LINSPACE_NEW: evenly spaced points between A and B; r8vec_linspace ( 5, 10, 20 ) 0: 10 1: 12.5 2: 15 3: 17.5 4: 20 TEST1335 R8VEC_PRINT prints an R8VEC. The R8VEC: 0: 123.456 1: 5e-06 2: -1e+06 3: 3.14159 NORMAL_01_CDF_TEST NORMAL_01_CDF evaluates the Normal 01 CDF; X CDF CDF (exact) (computed) 0 0.5 0.5 0.1 0.539828 0.539828 0.2 0.57926 0.57926 0.3 0.617911 0.617911 0.4 0.655422 0.655422 0.5 0.691462 0.691462 0.6 0.725747 0.725747 0.7 0.758036 0.758036 0.8 0.788145 0.788145 0.9 0.81594 0.81594 1 0.841345 0.841345 1.5 0.933193 0.933193 2 0.97725 0.97725 2.5 0.99379 0.99379 3 0.99865 0.99865 3.5 0.999767 0.999767 4 0.999968 0.999968 NORMAL_01_CDF_INV_TEST NORMAL_01_CDF_INV inverts the Normal 01 CDF; CDF X X (exact) (computed) 0.5 0 0 0.539828 0.1 0.1 0.57926 0.2 0.2 0.617911 0.3 0.3 0.655422 0.4 0.4 0.691462 0.5 0.5 0.725747 0.6 0.6 0.758036 0.7 0.7 0.788145 0.8 0.8 0.81594 0.9 0.9 0.841345 1 1 0.933193 1.5 1.5 0.97725 2 2 0.99379 2.5 2.5 0.99865 3 3 0.999767 3.5 3.5 0.999968 4 4 NORMAL_01_MEAN_TEST NORMAL_01_MEAN computes the Normal 01 mean; PDF mean = 0 Sample size = 1000 Sample mean = 0.00581875 Sample maximum = 3.32858 Sample minimum = -3.02975 NORMAL_01_MOMENT_TEST NORMAL_01_MOMENT evaluates Normal 01 moments; Order Moment 0 1 1 0 2 1 3 0 4 3 5 0 6 15 7 0 8 105 9 0 10 945 NORMAL_01_PDF_TEST NORMAL_01_PDF evaluates the Normal 01 PDF; X PDF -2 0.053991 -1.9 0.0656158 -1.8 0.0789502 -1.7 0.0940491 -1.6 0.110921 -1.5 0.129518 -1.4 0.149727 -1.3 0.171369 -1.2 0.194186 -1.1 0.217852 -1 0.241971 -0.9 0.266085 -0.8 0.289692 -0.7 0.312254 -0.6 0.333225 -0.5 0.352065 -0.4 0.36827 -0.3 0.381388 -0.2 0.391043 -0.1 0.396953 0 0.398942 0.1 0.396953 0.2 0.391043 0.3 0.381388 0.4 0.36827 0.5 0.352065 0.6 0.333225 0.7 0.312254 0.8 0.289692 0.9 0.266085 1 0.241971 1.1 0.217852 1.2 0.194186 1.3 0.171369 1.4 0.149727 1.5 0.129518 1.6 0.110921 1.7 0.0940491 1.8 0.0789502 1.9 0.0656158 2 0.053991 NORMAL_01_SAMPLE_TEST NORMAL_01_SAMPLE returns samples from the normal distribution with mean 0 and standard deviation 1. 1 1.67904 2 -0.56606 3 1.21293 4 1.26938 5 -1.66609 6 -2.24246 7 0.0396749 8 0.673068 9 -0.275127 10 2.164 NORMAL_01_VARIANCE_TEST NORMAL_01_VARIANCE computes the Normal 01 variance; PDF variance = 1 Sample size = 1000 Sample variance = 0.998375 NORMAL_MS_CDF_TEST NORMAL_MS_CDF evaluates the Normal MS CDF; Parameter MU = 100 Parameteter SIGMA = 15 X CDF 70 0.0227501 71.5 0.0287166 73 0.0359303 74.5 0.0445655 76 0.0547993 77.5 0.0668072 79 0.0807567 80.5 0.0968005 82 0.11507 83.5 0.135666 85 0.158655 86.5 0.18406 88 0.211855 89.5 0.241964 91 0.274253 92.5 0.308538 94 0.344578 95.5 0.382089 97 0.42074 98.5 0.460172 100 0.5 101.5 0.539828 103 0.57926 104.5 0.617911 106 0.655422 107.5 0.691462 109 0.725747 110.5 0.758036 112 0.788145 113.5 0.81594 115 0.841345 116.5 0.864334 118 0.88493 119.5 0.9032 121 0.919243 122.5 0.933193 124 0.945201 125.5 0.955435 127 0.96407 128.5 0.971283 130 0.97725 NORMAL_MS_CDF_INV_TEST NORMAL_MS_CDF_INV inverts the Normal MS CDF; Parameter MU = 100 Parameteter SIGMA = 15 X CDF CDF_INV 70 0.0227501 70 71.5 0.0287166 71.5 73 0.0359303 73 74.5 0.0445655 74.5 76 0.0547993 76 77.5 0.0668072 77.5 79 0.0807567 79 80.5 0.0968005 80.5 82 0.11507 82 83.5 0.135666 83.5 85 0.158655 85 86.5 0.18406 86.5 88 0.211855 88 89.5 0.241964 89.5 91 0.274253 91 92.5 0.308538 92.5 94 0.344578 94 95.5 0.382089 95.5 97 0.42074 97 98.5 0.460172 98.5 100 0.5 100 101.5 0.539828 101.5 103 0.57926 103 104.5 0.617911 104.5 106 0.655422 106 107.5 0.691462 107.5 109 0.725747 109 110.5 0.758036 110.5 112 0.788145 112 113.5 0.81594 113.5 115 0.841345 115 116.5 0.864334 116.5 118 0.88493 118 119.5 0.9032 119.5 121 0.919243 121 122.5 0.933193 122.5 124 0.945201 124 125.5 0.955435 125.5 127 0.96407 127 128.5 0.971283 128.5 130 0.97725 130 NORMAL_MS_MEAN_TEST NORMAL_MS_MEAN computes the Normal MS mean. Parameter MU = 100 Parameteter SIGMA = 15 PDF mean = 100 Sample size = 1000 Sample mean = 100.087 Sample maximum = 149.929 Sample minimum = 54.5537 NORMAL_MOMENT_MS_TEST NORMAL_MS_MOMENT evaluates the moments of the Normal MS distribution. Mu = 0 Sigma = 1 Order Moment 0 1 1 1 0 0 2 1 1 3 0 0 4 3 3 5 0 0 6 15 15 7 0 0 8 105 105 Mu = 2 Sigma = 1 Order Moment 0 1 1 1 2 2 2 5 5 3 14 14 4 43 43 5 142 142 6 499 499 7 1850 1850 8 7193 7193 Mu = 10 Sigma = 2 Order Moment 0 1 1 1 10 10 2 104 104 3 1120 1120 4 12448 12448 5 142400 142400 6 1.67296e+06 1.67296e+06 7 2.01472e+07 2.01472e+07 8 2.48315e+08 2.48315e+08 Mu = 0 Sigma = 2 Order Moment 0 1 1 1 0 0 2 4 4 3 0 0 4 48 48 5 0 0 6 960 960 7 0 0 8 26880 26880 NORMAL_MS_MOMENT_CENTRAL_TEST NORMAL_MS_MOMENT_CENTRAL evaluates the central moments of the Normal MS distribution. Mu = 0 Sigma = 1 Order Moment 0 1 1 1 0 0 2 1 1 3 0 0 4 3 3 5 0 0 6 15 15 7 0 0 8 105 105 Mu = 2 Sigma = 1 Order Moment 0 1 1 1 0 0 2 1 1 3 0 0 4 3 3 5 0 0 6 15 15 7 0 0 8 105 105 Mu = 10 Sigma = 2 Order Moment 0 1 1 1 0 0 2 4 4 3 0 0 4 48 48 5 0 0 6 960 960 7 0 0 8 26880 26880 Mu = 0 Sigma = 2 Order Moment 0 1 1 1 0 0 2 4 4 3 0 0 4 48 48 5 0 0 6 960 960 7 0 0 8 26880 26880 NORMAL_MS_PDF_TEST NORMAL_MS_PDF evaluates the Normal MS PDF; Parameter MU = 100 Parameteter SIGMA = 15 X PDF 70 0.00272666 71.5 0.00275243 73 0.00277448 74.5 0.00279308 76 0.0028085 77.5 0.00282097 79 0.00283073 80.5 0.00283799 82 0.00284295 83.5 0.0028458 85 0.00284671 86.5 0.00284585 88 0.00284337 89.5 0.0028394 91 0.00283408 92.5 0.00282753 94 0.00281985 95.5 0.00281115 97 0.00280153 98.5 0.00279107 100 0.00277985 101.5 0.00276795 103 0.00275543 104.5 0.00274237 106 0.00272881 107.5 0.00271482 109 0.00270043 110.5 0.0026857 112 0.00267068 113.5 0.00265538 115 0.00263986 116.5 0.00262415 118 0.00260827 119.5 0.00259226 121 0.00257613 122.5 0.00255991 124 0.00254363 125.5 0.00252729 127 0.00251093 128.5 0.00249456 130 0.00247818 NORMAL_MS_SAMPLE_TEST NORMAL_MS_SAMPLE returns samples from the Normal MS PDF. Parameter MU = 100 Parameteter SIGMA = 15 1 125.186 2 91.5091 3 118.194 4 119.041 5 75.0087 6 66.363 7 100.595 8 110.096 9 95.8731 10 132.46 NORMAL_MS_VARIANCE_TEST NORMAL_MS_VARIANCE computes the Normal MS variance; Parameter MU = 100 Parameteter SIGMA = 15 PDF variance = 225 Sample size = 1000 Sample variance = 224.634 TRUNCATED_NORMAL_A_CDF_TEST: TRUNCATED_NORMAL_A_CDF evaluates the lower Truncated Normal Cumulative Density Function. MU S A X CDF1 CDF2 100 25 50 90 0.3293202045481688 0.3293202045495739 100 25 50 92 0.3599223134505957 0.3599223134504884 100 25 50 94 0.3913175216041539 0.3913175216012952 100 25 50 96 0.4233210140873113 0.4233210140828035 100 25 50 98 0.4557365629792204 0.4557365629756831 100 25 50 100 0.4883601253415709 0.4883601253411278 100 25 50 102 0.5209836877039214 0.5209836877065723 100 25 50 104 0.5533992365958303 0.5533992365994519 100 25 50 106 0.5854027290789878 0.5854027290809604 100 25 50 108 0.6167979372325459 0.6167979372317671 100 25 50 110 0.6474000461349729 0.6474000461326815 TRUNCATED_NORMAL_A_CDF_INV_TEST: TRUNCATED_NORMAL_A_CDF_INV inverts the CDF of the lower Truncated Normal Distribution. The parent normal distribution has mean = 100 standard deviation = 25 The parent distribution is truncated to the interval [50,+oo) X CDF CDF_INV 0 82.03546056392796 0.2184182969792162 82.03546056367747 1 143.0075878300667 0.9563175765092733 143.0075878301592 2 124.1910017889437 0.829509233935064 124.1910017891749 3 104.5154909202534 0.5616954427706908 104.5154909204897 4 95.50207869815179 0.4153070814721543 95.50207869791485 5 66.07091630620891 0.06611873491948256 66.07091630673978 6 85.01611797809308 0.2575777923792841 85.01611797789074 7 71.86448157864034 0.1099567935296942 71.86448157832004 8 62.26181205048496 0.04382899777702298 62.26181205008615 9 109.114869274367 0.6339657123008282 109.1148692742633 TRUNCATED_NORMAL_A_MEAN_TEST TRUNCATED_NORMAL_A_MEAN computes the mean of the lower Truncated Normal Distribution. The parent normal distribution has mean = 100 standard deviation = 25 The parent distribution is truncated to the interval [50,+oo) PDF mean = 101.3811965669759 Sample size = 1000 Sample mean = 101.503886001702 Sample maximum = 171.7819108493603 Sample minimum = 50.80550075949013 TRUNCATED_NORMAL_A_MOMENT_TEST TRUNCATED_NORMAL_A_MOMENT evaluates the moments of the Lower Truncated Normal Distribution. Test = 0, Mu = 0, Sigma = 1, A = 0 Order Moment 0 1 1 0.7978845608028654 2 1 3 1.595769121605731 4 3 5 6.383076486422923 6 15 7 38.29845891853754 8 105 Test = 1, Mu = 0, Sigma = 1, A = -10 Order Moment 0 1 1 7.69459862670642e-23 2 1 3 7.848490599240547e-21 4 3 5 8.008538250676043e-19 6 15 7 8.175110921746982e-17 8 105 Test = 2, Mu = 0, Sigma = 1, A = 10 Order Moment 0 1 1 10.09809323416386 2 101.9809323416386 3 1030.005509884714 4 10404.03603118877 5 105100.9543811774 6 1061829.50357233 7 10728698.96045092 8 108413738.8666449 Test = 3, Mu = 0, Sigma = 2, A = -10 Order Moment 0 1 1 2.973439881809812e-06 2 3.999970265601182 3 0.0003211315072354596 4 47.99666974733238 5 0.03487250293386547 6 959.6360509584665 7 3.810379952222583 8 26840.07502801896 Test = 4, Mu = 0, Sigma = 2, A = 10 Order Moment 0 1 1 10.37300793467855 2 107.7300793467855 3 1120.284856945284 4 11665.76888683998 5 121654.6370579101 6 1270616.171204655 7 13292719.2240684 8 139307332.1405159 Test = 5, Mu = -5, Sigma = 1, A = -10 Order Moment 0 1 1 -4.999998513280059 2 25.99997769920089 3 -139.9997368505705 4 777.997130630514 5 -4449.969733355443 6 26139.68564793569 7 -157396.7599198702 8 969946.7319354919 TRUNCATED_NORMAL_A_PDF_TEST: TRUNCATED_NORMAL_A_PDF evaluates the PDF of the lower Truncated Normal Distribution. MU S A X PDF1 PDF2 100 25 50 90 0.01507373507401876 0.01507373507403181 100 25 50 92 0.01551417047139894 0.01551417047141238 100 25 50 94 0.01586560931024694 0.01586560931026069 100 25 50 96 0.01612150073158793 0.01612150073160189 100 25 50 98 0.01627701240029317 0.01627701240030727 100 25 50 100 0.01632918226724295 0.0163291822672571 100 25 50 102 0.01627701240029317 0.01627701240030727 100 25 50 104 0.01612150073158793 0.01612150073160189 100 25 50 106 0.01586560931024694 0.01586560931026069 100 25 50 108 0.01551417047139894 0.01551417047141238 100 25 50 110 0.01507373507401876 0.01507373507403181 TRUNCATED_NORMAL_A_SAMPLE_TEST: TRUNCATED_NORMAL_A_SAMPLE samples the lower Truncated Normal Distribution. The parent normal distribution has mean = 100 standard deviation = 25 The parent distribution is truncated to the interval [50,+oo) 0 82.03546056392796 1 143.0075878300667 2 124.1910017889437 3 104.5154909202534 4 95.50207869815179 5 66.07091630620891 6 85.01611797809308 7 71.86448157864034 8 62.26181205048496 9 109.114869274367 TRUNCATED_NORMAL_A_VARIANCE_TEST TRUNCATED_NORMAL_A_VARIANCE computes the variance of the lower Truncated Normal Distribution. The parent normal distribution has mean = 100 standard deviation = 25 The parent distribution is truncated to the interval [50,+oo) PDF variance = 554.0324676945766 Sample size = 1000 Sample variance = 555.6650626460602 TRUNCATED_NORMAL_AB_CDF_TEST: TRUNCATED_NORMAL_AB_CDF evaluates the Truncated Normal Cumulative Density Function. MU S A B X CDF1 CDF2 100 25 50 150 90 0.3371694242213513 0.3371694242230959 100 25 50 150 92 0.3685009225506048 0.3685009225508293 100 25 50 150 94 0.4006444233448185 0.4006444233422553 100 25 50 150 96 0.433410706690304 0.433410706686082 100 25 50 150 98 0.4665988676496338 0.4665988676464356 100 25 50 150 100 0.5 0.5000000000000001 100 25 50 150 102 0.5334011323503662 0.5334011323535645 100 25 50 150 104 0.566589293309696 0.5665892933139179 100 25 50 150 106 0.5993555766551815 0.5993555766577449 100 25 50 150 108 0.6314990774493952 0.6314990774491708 100 25 50 150 110 0.6628305757786487 0.6628305757769042 TRUNCATED_NORMAL_AB_CDF_INV_TEST: TRUNCATED_NORMAL_AB_CDF_INV inverts the CDF of the Truncated Normal Distribution. The parent normal distribution has mean = 100 standard deviation = 25 The parent distribution is truncated to the interval [50,150] X CDF CDF_INV 0 81.62997416083324 0.2184182969794712 81.62997416060566 1 137.9623424219791 0.9563175765111896 137.9623424224073 2 122.3665851392898 0.8295092339333726 122.3665851393498 3 103.7037803533316 0.5616954427710373 103.7037803535821 4 94.89896872307021 0.4153070814725299 94.89896872286064 5 65.83262246613882 0.06611873491934137 65.8326224666426 6 84.57429531004072 0.2575777923788141 84.57429530980696 7 71.56719070938323 0.1099567935299048 71.5671907090902 8 62.06540360199795 0.04382899777686092 62.06540360157312 9 108.1554466200941 0.6339657123017586 108.1554466200528 TRUNCATED_NORMAL_AB_MEAN_TEST TRUNCATED_NORMAL_AB_MEAN computes the mean of the Truncated Normal Distribution. The parent normal distribution has mean = 100 standard deviation = 25 The parent distribution is truncated to the interval [50,150] PDF mean = 100 Sample size = 1000 Sample mean = 100.1234240569421 Sample maximum = 149.1079402806376 Sample minimum = 50.78732108028024 TRUNCATED_NORMAL_AB_MOMENT_TEST TRUNCATED_NORMAL_AB_MOMENT evaluates the moments of the Truncated Normal PDF: Test = 0, Mu = 0, Sigma = 1, A = -1, B = 1 Order Moment 0 1 1 0 2 0.2911250947793833 3 0 4 0.1645003791175332 5 0 6 0.1136269903670495 7 0 8 0.08651402734872971 Test = 1, Mu = 0, Sigma = 1, A = 0, B = 1 Order Moment 0 1 1 0.4598622292821514 2 0.2911250947793833 3 0.210849553343686 4 0.1645003791175332 5 0.1345233081541275 6 0.1136269903670495 7 0.09826494370414829 8 0.08651402734872971 Test = 2, Mu = 0, Sigma = 1, A = -1, B = 0 Order Moment 0 1 1 -0.4598622292821514 2 0.2911250947793833 3 -0.210849553343686 4 0.1645003791175332 5 -0.1345233081541275 6 0.1136269903670495 7 -0.09826494370414829 8 0.08651402734872971 Test = 3, Mu = 0, Sigma = 2, A = -1, B = 1 Order Moment 0 1 1 0 2 0.3223566183950748 3 0 4 0.1906360391359723 5 0 6 0.1350774011145202 7 0 8 0.1045238496016392 Test = 4, Mu = 1, Sigma = 1, A = 0, B = 2 Order Moment 0 1 1 1 2 1.291125094779383 3 1.87337528433815 4 2.911250947793833 5 4.733752843381499 6 7.948009098820798 7 13.66652919205006 8 23.93459894967617 Test = 5, Mu = 0, Sigma = 1, A = 0.5, B = 2 Order Moment 0 1 1 1.042993334143991 2 1.238116616554702 3 1.638284875530746 4 2.356978751216315 5 3.607413548760741 6 5.777949971123758 7 9.572847783532149 8 16.27350981024338 Test = 6, Mu = 0, Sigma = 1, A = -2, B = 2 Order Moment 0 1 1 0 2 0.773741303549522 3 0 4 1.416189124846654 5 0 6 3.46080648102562 7 0 8 9.745088794348742 Test = 7, Mu = 0, Sigma = 1, A = -4, B = 4 Order Moment 0 1 1 0 2 0.9989292903724738 3 0 4 2.979656517077002 5 0 6 14.62418092073831 7 0 8 97.98363981082095 Test = 8, Mu = 5, Sigma = 0.5, A = 4, B = 7 Order Moment 0 1 1 5.027556351520714 2 25.49780173838909 3 130.4414288137665 4 673.0749973172971 5 3502.723962301956 6 18382.10051962429 7 97269.68380447358 8 518913.3079025001 TRUNCATED_NORMAL_AB_PDF_TEST: TRUNCATED_NORMAL_AB_PDF evaluates the Truncated Normal Probability Density Function. MU S A B X PDF1 PDF2 100 25 50 150 90 0.01543301171801836 0.01543301171804573 100 25 50 150 92 0.01588394472270638 0.01588394472273455 100 25 50 150 94 0.01624375997031919 0.016243759970348 100 25 50 150 96 0.01650575046469259 0.01650575046472186 100 25 50 150 98 0.01666496869385951 0.01666496869388907 100 25 50 150 100 0.01671838200940538 0.01671838200943504 100 25 50 150 102 0.01666496869385951 0.01666496869388907 100 25 50 150 104 0.01650575046469259 0.01650575046472186 100 25 50 150 106 0.01624375997031919 0.016243759970348 100 25 50 150 108 0.01588394472270638 0.01588394472273455 100 25 50 150 110 0.01543301171801836 0.01543301171804573 TRUNCATED_NORMAL_AB_SAMPLE_TEST: TRUNCATED_NORMAL_AB_SAMPLE samples the Truncated Normal Distribution. The parent normal distribution has mean = 100 standard deviation = 25 The parent distribution is truncated to the interval [50,150] 0 81.62997416083324 1 137.9623424219791 2 122.3665851392898 3 103.7037803533316 4 94.89896872307021 5 65.83262246613882 6 84.57429531004072 7 71.56719070938323 8 62.06540360199795 9 108.1554466200941 TRUNCATED_NORMAL_AB_VARIANCE_TEST TRUNCATED_NORMAL_AB_VARIANCE computes the variance of the Truncated Normal Distribution. The parent normal distribution has mean = 100 standard deviation = 25 The parent distribution is truncated to the interval [50,150] PDF variance = 483.5883147184512 Sample size = 1000 Sample variance = 486.0644394612366 TRUNCATED_NORMAL_B_CDF_TEST: TRUNCATED_NORMAL_B_CDF evaluates the upper Truncated Normal Cumulative Density Function. MU S B X CDF1 CDF2 100 25 150 90 0.3525999538650271 0.3525999538673185 100 25 150 92 0.383202062767454 0.3832020627682329 100 25 150 94 0.4145972709210122 0.4145972709190397 100 25 150 96 0.4466007634041696 0.446600763400548 100 25 150 98 0.4790163122960786 0.4790163122934276 100 25 150 100 0.5116398746584291 0.5116398746588723 100 25 150 102 0.5442634370207796 0.5442634370243169 100 25 150 104 0.5766789859126887 0.5766789859171965 100 25 150 106 0.6086824783958461 0.6086824783987049 100 25 150 108 0.6400776865494043 0.6400776865495117 100 25 150 110 0.6706797954518312 0.6706797954504261 TRUNCATED_NORMAL_B_CDF_INV_TEST: TRUNCATED_NORMAL_B_CDF_INV inverts the CDF of the upper Truncated Normal Distribution. The parent normal distribution has mean = 100 standard deviation = 25 The parent distribution is truncated to the interval (-oo,150] X CDF CDF_INV 0 80.13724631066849 0.2184182969809693 80.13724631055038 1 137.7662596736219 0.956317576511031 137.7662596740247 2 122.006225594984 0.8295092339332231 122.0062255950311 3 103.0731276291453 0.5616954427708121 103.073127629387 4 94.04472935979294 0.4153070814735715 94.04472935964239 5 62.07127308919195 0.06611873491384032 62.07127308876782 6 83.2726582346192 0.257577792378394 83.27265823433953 7 68.99561491453773 0.1099567935284338 68.99561491400434 8 57.03177989276885 0.04382899777874047 57.03177989267051 9 107.607013071183 0.6339657123024837 107.6070130711876 TRUNCATED_NORMAL_B_MEAN_TEST TRUNCATED_NORMAL_B_MEAN computes the mean of the upper Truncated Normal Distribution. The parent normal distribution has mean = 100 standard deviation = 25 The parent distribution is truncated to the interval (-oo,150] PDF mean = 98.61880343302406 Sample size = 1000 Sample mean = 98.71007276926947 Sample maximum = 149.0874272316052 Sample minimum = 27.20406439929408 TRUNCATED_NORMAL_B_MOMENT_TEST For the Upper Truncated Normal PDF: TRUNCATED_NORMAL_B_MOMENT evaluates the moments. Test = 0, Mu = 0, Sigma = 1, B = 0 Order Moment 0 1 1 -0.7978845608028654 2 1 3 -1.595769121605731 4 3 5 -6.383076486422923 6 15 7 -38.29845891853754 8 105 Test = 1, Mu = 0, Sigma = 1, B = 10 Order Moment 0 1 1 -7.69459862670642e-23 2 1 3 -7.848490599240547e-21 4 3 5 -8.008538250676043e-19 6 15 7 -8.175110921746982e-17 8 105 Test = 2, Mu = 0, Sigma = 1, B = -10 Order Moment 0 1 1 -10.09809323416386 2 101.9809323416386 3 -1030.005509884714 4 10404.03603118877 5 -105100.9543811774 6 1061829.50357233 7 -10728698.96045092 8 108413738.8666449 Test = 3, Mu = 0, Sigma = 2, B = 10 Order Moment 0 1 1 -2.973439881809812e-06 2 3.999970265601182 3 -0.0003211315072354596 4 47.99666974733238 5 -0.03487250293386547 6 959.6360509584665 7 -3.810379952222583 8 26840.07502801896 Test = 4, Mu = 0, Sigma = 2, B = -10 Order Moment 0 1 1 -10.37300793467855 2 107.7300793467855 3 -1120.284856945284 4 11665.76888683998 5 -121654.6370579101 6 1270616.171204655 7 -13292719.2240684 8 139307332.1405159 Test = 5, Mu = 5, Sigma = 1, B = 10 Order Moment 0 1 1 4.999998513280059 2 25.99997769920089 3 139.9997368505705 4 777.997130630514 5 4449.969733355443 6 26139.68564793569 7 157396.7599198702 8 969946.7319354919 TRUNCATED_NORMAL_B_PDF_TEST: TRUNCATED_NORMAL_B_PDF evaluates the upper Truncated Normal Distribution. MU S B X PDF1 PDF2 100 25 150 90 0.01507373507401876 0.01507373507403181 100 25 150 92 0.01551417047139894 0.01551417047141238 100 25 150 94 0.01586560931024694 0.01586560931026069 100 25 150 96 0.01612150073158793 0.01612150073160189 100 25 150 98 0.01627701240029317 0.01627701240030727 100 25 150 100 0.01632918226724295 0.0163291822672571 100 25 150 102 0.01627701240029317 0.01627701240030727 100 25 150 104 0.01612150073158793 0.01612150073160189 100 25 150 106 0.01586560931024694 0.01586560931026069 100 25 150 108 0.01551417047139894 0.01551417047141238 100 25 150 110 0.01507373507401876 0.01507373507403181 TRUNCATED_NORMAL_B_SAMPLE_TEST: TRUNCATED_NORMAL_B_SAMPLE samples the upper Truncated Normal Distribution. The parent normal distribution has mean = 100 standard deviation = 25 The parent distribution is truncated to the interval (-oo,150] 0 80.13724631066849 1 137.7662596736219 2 122.006225594984 3 103.0731276291453 4 94.04472935979294 5 62.07127308919195 6 83.2726582346192 7 68.99561491453773 8 57.03177989276885 9 107.607013071183 TRUNCATED_NORMAL_B_VARIANCE_TEST TRUNCATED_NORMAL_B_VARIANCE computes the variance of the upper Truncated Normal Distribution. The parent normal distribution has mean = 100 standard deviation = 25 The parent distribution is truncated to the interval (-oo,150] PDF variance = 554.0324676945766 Sample size = 1000 Sample variance = 560.2814763974837 TRUNCATED_NORMAL_TEST Normal end of execution. 02 March 2022 09:28:57 PM