Gauss型誤差曲線の下の面積の表
問題 矩形則を利用して、zの値を0.0から4.0まで0.01刻みで増加させ、Gauss型誤差曲線
(正規分布曲線)の下の面積を求め、表として印刷しなさい。
100 ' Program ztable
110 ' 標準z 曲線の下の面積の表を作成する
120 PRINT "標準正規分布曲線(z 曲線)の下の面積"
130 PRINT "積分範囲は0.0から4.0まで0.01きざみ.."
140 N = 10
150 D = 0.01/N
160 M = 1/SQR(2*3.14159)
170 FOR L= 1 TO 6
180 FOR K= 1 TO 5
190 FOR J= 1 TO 10
200 PRINT USING " .####"; P;
210 FOR I=1 TO N
220 P = P + M*(EXP(-Z*Z/2))*D
230 Z = Z+D
240 NEXT I
250 NEXT J
260 PRINT
270 NEXT K
280 PRINT
290 NEXT L
300 END
実行結果
標準正規分布曲線(z 曲線)の下の面積
積分範囲は0.0から4.0まで0.01きざみ.
.0000 .0040 .0080 .0120 .0160 .0199 .0239 .0279 .0319 .0359
.0398 .0438 .0478 .0517 .0557 .0596 .0636 .0675 .0714 .0753
.0793 .0832 .0871 .0910 .0948 .0987 .1026 .1064 .1103 .1141
.1179 .1217 .1255 .1293 .1331 .1368 .1406 .1443 .1480 .1517
.1554 .1591 .1628 .1664 .1700 .1737 .1773 .1808 .1844 .1880
.1915 .1950 .1985 .2020 .2054 .2089 .2123 .2157 .2191 .2224
.2258 .2291 .2324 .2357 .2390 .2422 .2454 .2486 .2518 .2549
.2581 .2612 .2643 .2674 .2704 .2734 .2764 .2794 .2824 .2853
.2882 .2911 .2939 .2968 .2996 .3024 .3052 .3079 .3106 .3133
.3160 .3187 .3213 .3239 .3265 .3290 .3315 .3341 .3365 .3390
.3414 .3438 .3462 .3486 .3509 .3532 .3555 .3578 .3600 .3622
.3644 .3666 .3687 .3709 .3730 .3750 .3771 .3791 .3811 .3831
.3850 .3870 .3889 .3908 .3926 .3945 .3963 .3981 .3998 .4016
.4033 .4050 .4067 .4084 .4100 .4116 .4132 .4148 .4163 .4179
.4194 .4209 .4223 .4238 .4252 .4266 .4280 .4294 .4307 .4320
.4333 .4346 .4359 .4371 .4384 .4396 .4408 .4419 .4431 .4442
.4453 .4464 .4475 .4486 .4496 .4507 .4517 .4527 .4537 .4546
.4556 .4565 .4574 .4583 .4592 .4601 .4610 .4618 .4626 .4634
.4642 .4650 .4658 .4665 .4673 .4680 .4687 .4694 .4701 .4708
.4715 .4721 .4727 .4734 .4740 .4746 .4752 .4758 .4763 .4769
.4774 .4780 .4785 .4790 .4795 .4800 .4805 .4810 .4814 .4819
.4823 .4827 .4832 .4836 .4840 .4844 .4848 .4852 .4856 .4859
.4863 .4866 .4870 .4873 .4876 .4880 .4883 .4886 .4889 .4892
.4895 .4897 .4900 .4903 .4905 .4908 .4910 .4913 .4915 .4918
.4920 .4922 .4924 .4926 .4928 .4930 .4932 .4934 .4936 .4938
.4940 .4942 .4943 .4945 .4946 .4948 .4950 .4951 .4953 .4954
.4955 .4957 .4958 .4959 .4960 .4962 .4963 .4964 .4965 .4966
.4967 .4968 .4969 .4970 .4971 .4972 .4973 .4974 .4975 .4976
.4976 .4977 .4978 .4979 .4979 .4980 .4981 .4981 .4982 .4983
.4983 .4984 .4984 .4985 .4986 .4986 .4987 .4987 .4988 .4988
ztable.bas