0% found this document useful (0 votes)
91 views8 pages

Calculating Pi Using Random Pairs

Uploaded by

tve21ie060
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views8 pages

Calculating Pi Using Random Pairs

Uploaded by

tve21ie060
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd

X Y F(X)

0.675156 0.480231 Err:522


0.201242 0.708539 1 CALCULATIONS
0.113504 0.734633 1
0.14279 0.642527 1 Number of random pairs generated= 100
0.37647 0.908024 1 (N)
0.228761 0.144162 1
0.774497 0.618649 1 Number of random pairs accepted = 77
0.56635 0.317598 1 (n)
0.130581 0.354713 1
0.24248 0.391987 1
0.630716 0.830153 0 Value of Pi = 4*n/N
0.330231 0.851404 1
0.18911 0.614553 1 = 4*79/100
0.80014 0.855395 0
0.252645 0.317558 1 = 3.16
0.777586 0.553443 1
0.611568 0.857485 0
0.155055 0.130605 1
0.469992 0.922918 0
0.295053 0.075959 1
0.879699 0.647689 0
0.304682 0.52837 1
0.683398 0.309623 1
0.31894 0.558427 1
0.248978 0.985699 0
0.277343 0.072155 1
0.372429 0.782143 1
0.301014 0.047534 1
0.626856 0.047537 1
0.709615 0.94375 0
0.336037 0.836298 1
0.465793 0.378157 1
0.807436 0.902226 0
0.799421 0.235384 1
0.730101 0.252416 1
0.372353 0.390967 1
0.503816 0.64584 1
0.15651 0.567167 1
0.10211 0.453366 1
0.730569 0.683096 0
0.794076 0.499004 1
0.532129 0.347568 1
0.275471 0.520434 1
0.322838 0.531803 1
0.126238 0.556238 1
0.495116 0.922459 0
0.916602 0.2313 1
0.652045 0.710473 1
0.615525 0.307107 1
0.338815 0.727955 1
0.080075 0.763544 1
0.590599 0.014628 1
0.55424 0.831536 1
0.768943 0.943387 0
0.900244 0.850076 0
0.475739 0.302023 1
0.426634 0.172369 1
0.602466 0.270901 1
0.558896 0.553024 1
0.915422 0.834926 0
0.890235 0.372633 1
0.455074 0.682155 1
0.101476 0.940676 1
0.93213 0.782857 0
0.33697 0.17284 1
0.703203 0.006903 1
0.955765 0.577116 0
0.012482 0.923961 1
0.035394 0.752278 1
0.752162 0.954286 0
0.450718 0.26914 1
0.633508 0.1064 1
0.12417 0.424486 1
0.704033 0.212645 1
0.874449 0.617996 0
0.650664 0.493432 1
0.526179 0.605854 1
0.660096 0.165587 1
0.875454 0.967467 0
0.073969 0.75489 1
0.478162 0.74215 1
0.710887 0.487995 1
0.75933 0.809684 0
0.277882 0.833789 1
0.86791 0.165112 1
0.424502 0.11945 1
0.666054 0.073389 1
0.806725 0.248703 1
0.614518 0.639346 1
0.641883 0.800828 0
0.74203 0.97841 0
0.241548 0.120402 1
0.535396 0.137111 1
0.091872 0.944411 1
0.122604 0.991061 1
0.716502 0.198194 1
0.756342 0.36267 1
0.998775 0.059266 0
0.848435 0.063719 1
0.595345 0.554127 1
R.N R.Nsorted i Ri(m=55) N D+ D-
45 5 1 0.090909 100 -0.08090909091 0.09090909
25 5 2 0.090909 100 -0.07090909091 0.08090909
20 5 3 0.090909 100 -0.06090909091 0.07090909
5 5 4 0.090909 100 -0.05090909091 0.06090909
15 5 5 0.090909 100 -0.04090909091 0.05090909 calculations
45 5 6 0.090909 100 -0.03090909091 0.04090909
25 5 7 0.090909 100 -0.02090909091 0.03090909 D+
20 5 8 0.090909 100 -0.01090909091 0.02090909 D-
5 5 9 0.090909 100 -0.00090909091 0.01090909 D
15 5 10 0.090909 100 0.009090909091 0.00090909
45 5 11 0.090909 100 0.019090909091 -0.0090909 D(0.05,100)
25 5 12 0.090909 100 0.029090909091 -0.0190909
20 5 13 0.090909 100 0.039090909091 -0.0290909 Since
5 5 14 0.090909 100 0.049090909091 -0.0390909
15 5 15 0.090909 100 0.059090909091 -0.0490909 The generated random
45 5 16 0.090909 100 0.069090909091 -0.0590909
25 5 17 0.090909 100 0.079090909091 -0.0690909
20 5 18 0.090909 100 0.089090909091 -0.0790909
5 5 19 0.090909 100 0.099090909091 -0.0890909
15 5 20 0.090909 100 0.109090909091 -0.0990909
45 5 21 0.090909 100 0.119090909091 -0.1090909
25 15 22 0.272727 100 -0.05272727273 0.06272727
20 15 23 0.272727 100 -0.04272727273 0.05272727
5 15 24 0.272727 100 -0.03272727273 0.04272727
15 15 25 0.272727 100 -0.02272727273 0.03272727
45 15 26 0.272727 100 -0.01272727273 0.02272727
25 15 27 0.272727 100 -0.00272727273 0.01272727
20 15 28 0.272727 100 0.007272727273 0.00272727
5 15 29 0.272727 100 0.017272727273 -0.0072727
15 15 30 0.272727 100 0.027272727273 -0.0172727
45 15 31 0.272727 100 0.037272727273 -0.0272727
25 15 32 0.272727 100 0.047272727273 -0.0372727
20 15 33 0.272727 100 0.057272727273 -0.0472727
5 15 34 0.272727 100 0.067272727273 -0.0572727
15 15 35 0.272727 100 0.077272727273 -0.0672727
45 15 36 0.272727 100 0.087272727273 -0.0772727
25 15 37 0.272727 100 0.097272727273 -0.0872727
20 15 38 0.272727 100 0.107272727273 -0.0972727
5 15 39 0.272727 100 0.117272727273 -0.1072727
15 15 40 0.272727 100 0.127272727273 -0.1172727
45 15 41 0.272727 100 0.137272727273 -0.1272727
25 20 42 0.363636 100 0.056363636364 -0.0463636
20 20 43 0.363636 100 0.066363636364 -0.0563636
5 20 44 0.363636 100 0.076363636364 -0.0663636
15 20 45 0.363636 100 0.086363636364 -0.0763636
45 20 46 0.363636 100 0.096363636364 -0.0863636
25 20 47 0.363636 100 0.106363636364 -0.0963636
20 20 48 0.363636 100 0.116363636364 -0.1063636
5 20 49 0.363636 100 0.126363636364 -0.1163636
15 20 50 0.363636 100 0.136363636364 -0.1263636
45 20 51 0.363636 100 0.146363636364 -0.1363636
25 20 52 0.363636 100 0.156363636364 -0.1463636
20 20 53 0.363636 100 0.166363636364 -0.1563636
5 20 54 0.363636 100 0.176363636364 -0.1663636
15 20 55 0.363636 100 0.186363636364 -0.1763636
45 20 56 0.363636 100 0.196363636364 -0.1863636
25 20 57 0.363636 100 0.206363636364 -0.1963636
20 20 58 0.363636 100 0.216363636364 -0.2063636
5 20 59 0.363636 100 0.226363636364 -0.2163636
15 20 60 0.363636 100 0.236363636364 -0.2263636
45 20 61 0.363636 100 0.246363636364 -0.2363636
25 25 62 0.454545 100 0.165454545455 -0.1554545
20 25 63 0.454545 100 0.175454545455 -0.1654545
5 25 64 0.454545 100 0.185454545455 -0.1754545
15 25 65 0.454545 100 0.195454545455 -0.1854545
45 25 66 0.454545 100 0.205454545455 -0.1954545
25 25 67 0.454545 100 0.215454545455 -0.2054545
20 25 68 0.454545 100 0.225454545455 -0.2154545
5 25 69 0.454545 100 0.235454545455 -0.2254545
15 25 70 0.454545 100 0.245454545455 -0.2354545
45 25 71 0.454545 100 0.255454545455 -0.2454545
25 25 72 0.454545 100 0.265454545455 -0.2554545
20 25 73 0.454545 100 0.275454545455 -0.2654545
5 25 74 0.454545 100 0.285454545455 -0.2754545
15 25 75 0.454545 100 0.295454545455 -0.2854545
45 25 76 0.454545 100 0.305454545455 -0.2954545
25 25 77 0.454545 100 0.315454545455 -0.3054545
20 25 78 0.454545 100 0.325454545455 -0.3154545
5 25 79 0.454545 100 0.335454545455 -0.3254545
15 25 80 0.454545 100 0.345454545455 -0.3354545
45 25 81 0.454545 100 0.355454545455 -0.3454545
25 45 82 0.818182 100 0.001818181818 0.00818182
20 45 83 0.818182 100 0.011818181818 -0.0018182
5 45 84 0.818182 100 0.021818181818 -0.0118182
15 45 85 0.818182 100 0.031818181818 -0.0218182
45 45 86 0.818182 100 0.041818181818 -0.0318182
25 45 87 0.818182 100 0.051818181818 -0.0418182
20 45 88 0.818182 100 0.061818181818 -0.0518182
5 45 89 0.818182 100 0.071818181818 -0.0618182
15 45 90 0.818182 100 0.081818181818 -0.0718182
45 45 91 0.818182 100 0.091818181818 -0.0818182
25 45 92 0.818182 100 0.101818181818 -0.0918182
20 45 93 0.818182 100 0.111818181818 -0.1018182
5 45 94 0.818182 100 0.121818181818 -0.1118182
15 45 95 0.818182 100 0.131818181818 -0.1218182
45 45 96 0.818182 100 0.141818181818 -0.1318182
25 45 97 0.818182 100 0.151818181818 -0.1418182
20 45 98 0.818182 100 0.161818181818 -0.1518182
5 45 99 0.818182 100 0.171818181818 -0.1618182
15 45 100 0.818182 100 0.181818181818 -0.1718182
calculations MAX

0.35545
0.09091
0.35546

D(0.05,100) 0.13581

calculated<critical

The generated random numbers are UNIFORM

You might also like