Example 1.2 (Coin Tossing) As we have noted, our intuition suggests that the probability of obtaining a head on a single toss of a coin is 1/2. To have the computer toss a coin, we can ask it to pick a random real number in the interval [0, 1] and test to see if this number is less than 1/2. If so, we shall call the outcome heads; if not we call it tails. Another way to proceed would be to ask the computer to pick a random integer from the set {0, 1}. The program CoinTosses carries out the experiment of tossing a coin n times. Running this program, with n = 20, resulted in:
1 Modify the program CoinTosses to toss a coin n times and print out after every 100 tosses the proportion of heads minus 1/2. Do these numbers appear to approach 0 as n increases? Modify the program again to print out, every 100 times, both of the following quantities: the proportion of heads minus 1/2, and the number of heads minus half the number of tosses. Do these numbers appear to approach 0 as n increases?
The numbers bounce around a bit but definitely appeart to be getting closer to 0 as n increases.
coinTosses <- function(p,n){
heads = 0
tails = 0
tosses = 0
while (n > tosses){
random_number <- runif(1)
if (random_number < p){
heads = heads + 1
}
else{
tails = tails + 1
}
if ((n %% 100) == 0){
proportion_heads = (heads/tosses) - 0.5
note1 = paste("The proportion of heads is",proportion_heads," with ",tosses," tosses.")
print(note1)
heads_to_tosses = heads - (0.5*tosses)
note2 = paste("The rate of heads to half of the tosses is ",heads_to_tosses," with ",tosses," tosses and ", heads, " heads.")
print(note2)
}
n = n - 1
tosses = tosses + 1
}
}
coinTosses(0.5,30000)
## [1] "The proportion of heads is Inf with 0 tosses."
## [1] "The rate of heads to half of the tosses is 1 with 0 tosses and 1 heads."
## [1] "The proportion of heads is 0.13 with 100 tosses."
## [1] "The rate of heads to half of the tosses is 13 with 100 tosses and 63 heads."
## [1] "The proportion of heads is 0.085 with 200 tosses."
## [1] "The rate of heads to half of the tosses is 17 with 200 tosses and 117 heads."
## [1] "The proportion of heads is 0.0266666666666666 with 300 tosses."
## [1] "The rate of heads to half of the tosses is 8 with 300 tosses and 158 heads."
## [1] "The proportion of heads is 0.02 with 400 tosses."
## [1] "The rate of heads to half of the tosses is 8 with 400 tosses and 208 heads."
## [1] "The proportion of heads is 0.012 with 500 tosses."
## [1] "The rate of heads to half of the tosses is 6 with 500 tosses and 256 heads."
## [1] "The proportion of heads is 0.0116666666666667 with 600 tosses."
## [1] "The rate of heads to half of the tosses is 7 with 600 tosses and 307 heads."
## [1] "The proportion of heads is 0.01 with 700 tosses."
## [1] "The rate of heads to half of the tosses is 7 with 700 tosses and 357 heads."
## [1] "The proportion of heads is 0.00624999999999998 with 800 tosses."
## [1] "The rate of heads to half of the tosses is 5 with 800 tosses and 405 heads."
## [1] "The proportion of heads is 0.0177777777777778 with 900 tosses."
## [1] "The rate of heads to half of the tosses is 16 with 900 tosses and 466 heads."
## [1] "The proportion of heads is 0.015 with 1000 tosses."
## [1] "The rate of heads to half of the tosses is 15 with 1000 tosses and 515 heads."
## [1] "The proportion of heads is 0.0109090909090909 with 1100 tosses."
## [1] "The rate of heads to half of the tosses is 12 with 1100 tosses and 562 heads."
## [1] "The proportion of heads is -0.000833333333333353 with 1200 tosses."
## [1] "The rate of heads to half of the tosses is -1 with 1200 tosses and 599 heads."
## [1] "The proportion of heads is 0.00461538461538458 with 1300 tosses."
## [1] "The rate of heads to half of the tosses is 6 with 1300 tosses and 656 heads."
## [1] "The proportion of heads is 0.00714285714285712 with 1400 tosses."
## [1] "The rate of heads to half of the tosses is 10 with 1400 tosses and 710 heads."
## [1] "The proportion of heads is 0.012 with 1500 tosses."
## [1] "The rate of heads to half of the tosses is 18 with 1500 tosses and 768 heads."
## [1] "The proportion of heads is 0.014375 with 1600 tosses."
## [1] "The rate of heads to half of the tosses is 23 with 1600 tosses and 823 heads."
## [1] "The proportion of heads is 0.0129411764705882 with 1700 tosses."
## [1] "The rate of heads to half of the tosses is 22 with 1700 tosses and 872 heads."
## [1] "The proportion of heads is 0.0111111111111111 with 1800 tosses."
## [1] "The rate of heads to half of the tosses is 20 with 1800 tosses and 920 heads."
## [1] "The proportion of heads is 0.0110526315789473 with 1900 tosses."
## [1] "The rate of heads to half of the tosses is 21 with 1900 tosses and 971 heads."
## [1] "The proportion of heads is 0.01 with 2000 tosses."
## [1] "The rate of heads to half of the tosses is 20 with 2000 tosses and 1020 heads."
## [1] "The proportion of heads is 0.0142857142857142 with 2100 tosses."
## [1] "The rate of heads to half of the tosses is 30 with 2100 tosses and 1080 heads."
## [1] "The proportion of heads is 0.0154545454545455 with 2200 tosses."
## [1] "The rate of heads to half of the tosses is 34 with 2200 tosses and 1134 heads."
## [1] "The proportion of heads is 0.0130434782608696 with 2300 tosses."
## [1] "The rate of heads to half of the tosses is 30 with 2300 tosses and 1180 heads."
## [1] "The proportion of heads is 0.0154166666666666 with 2400 tosses."
## [1] "The rate of heads to half of the tosses is 37 with 2400 tosses and 1237 heads."
## [1] "The proportion of heads is 0.0135999999999999 with 2500 tosses."
## [1] "The rate of heads to half of the tosses is 34 with 2500 tosses and 1284 heads."
## [1] "The proportion of heads is 0.0146153846153846 with 2600 tosses."
## [1] "The rate of heads to half of the tosses is 38 with 2600 tosses and 1338 heads."
## [1] "The proportion of heads is 0.0137037037037037 with 2700 tosses."
## [1] "The rate of heads to half of the tosses is 37 with 2700 tosses and 1387 heads."
## [1] "The proportion of heads is 0.0125 with 2800 tosses."
## [1] "The rate of heads to half of the tosses is 35 with 2800 tosses and 1435 heads."
## [1] "The proportion of heads is 0.0117241379310344 with 2900 tosses."
## [1] "The rate of heads to half of the tosses is 34 with 2900 tosses and 1484 heads."
## [1] "The proportion of heads is 0.0106666666666667 with 3000 tosses."
## [1] "The rate of heads to half of the tosses is 32 with 3000 tosses and 1532 heads."
## [1] "The proportion of heads is 0.00935483870967746 with 3100 tosses."
## [1] "The rate of heads to half of the tosses is 29 with 3100 tosses and 1579 heads."
## [1] "The proportion of heads is 0.00968749999999996 with 3200 tosses."
## [1] "The rate of heads to half of the tosses is 31 with 3200 tosses and 1631 heads."
## [1] "The proportion of heads is 0.00878787878787879 with 3300 tosses."
## [1] "The rate of heads to half of the tosses is 29 with 3300 tosses and 1679 heads."
## [1] "The proportion of heads is 0.0105882352941177 with 3400 tosses."
## [1] "The rate of heads to half of the tosses is 36 with 3400 tosses and 1736 heads."
## [1] "The proportion of heads is 0.00828571428571434 with 3500 tosses."
## [1] "The rate of heads to half of the tosses is 29 with 3500 tosses and 1779 heads."
## [1] "The proportion of heads is 0.00861111111111112 with 3600 tosses."
## [1] "The rate of heads to half of the tosses is 31 with 3600 tosses and 1831 heads."
## [1] "The proportion of heads is 0.01 with 3700 tosses."
## [1] "The rate of heads to half of the tosses is 37 with 3700 tosses and 1887 heads."
## [1] "The proportion of heads is 0.0107894736842106 with 3800 tosses."
## [1] "The rate of heads to half of the tosses is 41 with 3800 tosses and 1941 heads."
## [1] "The proportion of heads is 0.0102564102564102 with 3900 tosses."
## [1] "The rate of heads to half of the tosses is 40 with 3900 tosses and 1990 heads."
## [1] "The proportion of heads is 0.01025 with 4000 tosses."
## [1] "The rate of heads to half of the tosses is 41 with 4000 tosses and 2041 heads."
## [1] "The proportion of heads is 0.0102439024390244 with 4100 tosses."
## [1] "The rate of heads to half of the tosses is 42 with 4100 tosses and 2092 heads."
## [1] "The proportion of heads is 0.0102380952380953 with 4200 tosses."
## [1] "The rate of heads to half of the tosses is 43 with 4200 tosses and 2143 heads."
## [1] "The proportion of heads is 0.00953488372093025 with 4300 tosses."
## [1] "The rate of heads to half of the tosses is 41 with 4300 tosses and 2191 heads."
## [1] "The proportion of heads is 0.00931818181818178 with 4400 tosses."
## [1] "The rate of heads to half of the tosses is 41 with 4400 tosses and 2241 heads."
## [1] "The proportion of heads is 0.00800000000000001 with 4500 tosses."
## [1] "The rate of heads to half of the tosses is 36 with 4500 tosses and 2286 heads."
## [1] "The proportion of heads is 0.00978260869565217 with 4600 tosses."
## [1] "The rate of heads to half of the tosses is 45 with 4600 tosses and 2345 heads."
## [1] "The proportion of heads is 0.00829787234042556 with 4700 tosses."
## [1] "The rate of heads to half of the tosses is 39 with 4700 tosses and 2389 heads."
## [1] "The proportion of heads is 0.00895833333333329 with 4800 tosses."
## [1] "The rate of heads to half of the tosses is 43 with 4800 tosses and 2443 heads."
## [1] "The proportion of heads is 0.00959183673469388 with 4900 tosses."
## [1] "The rate of heads to half of the tosses is 47 with 4900 tosses and 2497 heads."
## [1] "The proportion of heads is 0.00880000000000003 with 5000 tosses."
## [1] "The rate of heads to half of the tosses is 44 with 5000 tosses and 2544 heads."
## [1] "The proportion of heads is 0.00764705882352945 with 5100 tosses."
## [1] "The rate of heads to half of the tosses is 39 with 5100 tosses and 2589 heads."
## [1] "The proportion of heads is 0.00826923076923081 with 5200 tosses."
## [1] "The rate of heads to half of the tosses is 43 with 5200 tosses and 2643 heads."
## [1] "The proportion of heads is 0.00886792452830187 with 5300 tosses."
## [1] "The rate of heads to half of the tosses is 47 with 5300 tosses and 2697 heads."
## [1] "The proportion of heads is 0.0101851851851852 with 5400 tosses."
## [1] "The rate of heads to half of the tosses is 55 with 5400 tosses and 2755 heads."
## [1] "The proportion of heads is 0.00981818181818184 with 5500 tosses."
## [1] "The rate of heads to half of the tosses is 54 with 5500 tosses and 2804 heads."
## [1] "The proportion of heads is 0.0107142857142857 with 5600 tosses."
## [1] "The rate of heads to half of the tosses is 60 with 5600 tosses and 2860 heads."
## [1] "The proportion of heads is 0.0110526315789473 with 5700 tosses."
## [1] "The rate of heads to half of the tosses is 63 with 5700 tosses and 2913 heads."
## [1] "The proportion of heads is 0.0103448275862069 with 5800 tosses."
## [1] "The rate of heads to half of the tosses is 60 with 5800 tosses and 2960 heads."
## [1] "The proportion of heads is 0.0086440677966102 with 5900 tosses."
## [1] "The rate of heads to half of the tosses is 51 with 5900 tosses and 3001 heads."
## [1] "The proportion of heads is 0.00849999999999995 with 6000 tosses."
## [1] "The rate of heads to half of the tosses is 51 with 6000 tosses and 3051 heads."
## [1] "The proportion of heads is 0.00721311475409836 with 6100 tosses."
## [1] "The rate of heads to half of the tosses is 44 with 6100 tosses and 3094 heads."
## [1] "The proportion of heads is 0.00854838709677419 with 6200 tosses."
## [1] "The rate of heads to half of the tosses is 53 with 6200 tosses and 3153 heads."
## [1] "The proportion of heads is 0.00809523809523804 with 6300 tosses."
## [1] "The rate of heads to half of the tosses is 51 with 6300 tosses and 3201 heads."
## [1] "The proportion of heads is 0.00765625000000003 with 6400 tosses."
## [1] "The rate of heads to half of the tosses is 49 with 6400 tosses and 3249 heads."
## [1] "The proportion of heads is 0.00723076923076926 with 6500 tosses."
## [1] "The rate of heads to half of the tosses is 47 with 6500 tosses and 3297 heads."
## [1] "The proportion of heads is 0.00727272727272732 with 6600 tosses."
## [1] "The rate of heads to half of the tosses is 48 with 6600 tosses and 3348 heads."
## [1] "The proportion of heads is 0.00776119402985076 with 6700 tosses."
## [1] "The rate of heads to half of the tosses is 52 with 6700 tosses and 3402 heads."
## [1] "The proportion of heads is 0.00720588235294117 with 6800 tosses."
## [1] "The rate of heads to half of the tosses is 49 with 6800 tosses and 3449 heads."
## [1] "The proportion of heads is 0.00623188405797104 with 6900 tosses."
## [1] "The rate of heads to half of the tosses is 43 with 6900 tosses and 3493 heads."
## [1] "The proportion of heads is 0.00600000000000001 with 7000 tosses."
## [1] "The rate of heads to half of the tosses is 42 with 7000 tosses and 3542 heads."
## [1] "The proportion of heads is 0.00690140845070419 with 7100 tosses."
## [1] "The rate of heads to half of the tosses is 49 with 7100 tosses and 3599 heads."
## [1] "The proportion of heads is 0.00708333333333333 with 7200 tosses."
## [1] "The rate of heads to half of the tosses is 51 with 7200 tosses and 3651 heads."
## [1] "The proportion of heads is 0.00684931506849318 with 7300 tosses."
## [1] "The rate of heads to half of the tosses is 50 with 7300 tosses and 3700 heads."
## [1] "The proportion of heads is 0.0083783783783784 with 7400 tosses."
## [1] "The rate of heads to half of the tosses is 62 with 7400 tosses and 3762 heads."
## [1] "The proportion of heads is 0.00866666666666671 with 7500 tosses."
## [1] "The rate of heads to half of the tosses is 65 with 7500 tosses and 3815 heads."
## [1] "The proportion of heads is 0.00789473684210529 with 7600 tosses."
## [1] "The rate of heads to half of the tosses is 60 with 7600 tosses and 3860 heads."
## [1] "The proportion of heads is 0.00844155844155847 with 7700 tosses."
## [1] "The rate of heads to half of the tosses is 65 with 7700 tosses and 3915 heads."
## [1] "The proportion of heads is 0.00871794871794873 with 7800 tosses."
## [1] "The rate of heads to half of the tosses is 68 with 7800 tosses and 3968 heads."
## [1] "The proportion of heads is 0.00886075949367093 with 7900 tosses."
## [1] "The rate of heads to half of the tosses is 70 with 7900 tosses and 4020 heads."
## [1] "The proportion of heads is 0.00887499999999997 with 8000 tosses."
## [1] "The rate of heads to half of the tosses is 71 with 8000 tosses and 4071 heads."
## [1] "The proportion of heads is 0.0092592592592593 with 8100 tosses."
## [1] "The rate of heads to half of the tosses is 75 with 8100 tosses and 4125 heads."
## [1] "The proportion of heads is 0.00890243902439025 with 8200 tosses."
## [1] "The rate of heads to half of the tosses is 73 with 8200 tosses and 4173 heads."
## [1] "The proportion of heads is 0.00819277108433736 with 8300 tosses."
## [1] "The rate of heads to half of the tosses is 68 with 8300 tosses and 4218 heads."
## [1] "The proportion of heads is 0.00773809523809521 with 8400 tosses."
## [1] "The rate of heads to half of the tosses is 65 with 8400 tosses and 4265 heads."
## [1] "The proportion of heads is 0.00811764705882356 with 8500 tosses."
## [1] "The rate of heads to half of the tosses is 69 with 8500 tosses and 4319 heads."
## [1] "The proportion of heads is 0.00848837209302322 with 8600 tosses."
## [1] "The rate of heads to half of the tosses is 73 with 8600 tosses and 4373 heads."
## [1] "The proportion of heads is 0.00793103448275867 with 8700 tosses."
## [1] "The rate of heads to half of the tosses is 69 with 8700 tosses and 4419 heads."
## [1] "The proportion of heads is 0.00761363636363632 with 8800 tosses."
## [1] "The rate of heads to half of the tosses is 67 with 8800 tosses and 4467 heads."
## [1] "The proportion of heads is 0.0084269662921348 with 8900 tosses."
## [1] "The rate of heads to half of the tosses is 75 with 8900 tosses and 4525 heads."
## [1] "The proportion of heads is 0.00866666666666671 with 9000 tosses."
## [1] "The rate of heads to half of the tosses is 78 with 9000 tosses and 4578 heads."
## [1] "The proportion of heads is 0.00945054945054946 with 9100 tosses."
## [1] "The rate of heads to half of the tosses is 86 with 9100 tosses and 4636 heads."
## [1] "The proportion of heads is 0.00923913043478264 with 9200 tosses."
## [1] "The rate of heads to half of the tosses is 85 with 9200 tosses and 4685 heads."
## [1] "The proportion of heads is 0.01 with 9300 tosses."
## [1] "The rate of heads to half of the tosses is 93 with 9300 tosses and 4743 heads."
## [1] "The proportion of heads is 0.0102127659574468 with 9400 tosses."
## [1] "The rate of heads to half of the tosses is 96 with 9400 tosses and 4796 heads."
## [1] "The proportion of heads is 0.00915789473684214 with 9500 tosses."
## [1] "The rate of heads to half of the tosses is 87 with 9500 tosses and 4837 heads."
## [1] "The proportion of heads is 0.00989583333333333 with 9600 tosses."
## [1] "The rate of heads to half of the tosses is 95 with 9600 tosses and 4895 heads."
## [1] "The proportion of heads is 0.0103092783505154 with 9700 tosses."
## [1] "The rate of heads to half of the tosses is 100 with 9700 tosses and 4950 heads."
## [1] "The proportion of heads is 0.00969387755102036 with 9800 tosses."
## [1] "The rate of heads to half of the tosses is 95 with 9800 tosses and 4995 heads."
## [1] "The proportion of heads is 0.00929292929292924 with 9900 tosses."
## [1] "The rate of heads to half of the tosses is 92 with 9900 tosses and 5042 heads."
## [1] "The proportion of heads is 0.0105 with 10000 tosses."
## [1] "The rate of heads to half of the tosses is 105 with 10000 tosses and 5105 heads."
## [1] "The proportion of heads is 0.0100990099009901 with 10100 tosses."
## [1] "The rate of heads to half of the tosses is 102 with 10100 tosses and 5152 heads."
## [1] "The proportion of heads is 0.0101960784313726 with 10200 tosses."
## [1] "The rate of heads to half of the tosses is 104 with 10200 tosses and 5204 heads."
## [1] "The proportion of heads is 0.00961165048543688 with 10300 tosses."
## [1] "The rate of heads to half of the tosses is 99 with 10300 tosses and 5249 heads."
## [1] "The proportion of heads is 0.00846153846153841 with 10400 tosses."
## [1] "The rate of heads to half of the tosses is 88 with 10400 tosses and 5288 heads."
## [1] "The proportion of heads is 0.00809523809523804 with 10500 tosses."
## [1] "The rate of heads to half of the tosses is 85 with 10500 tosses and 5335 heads."
## [1] "The proportion of heads is 0.0084905660377359 with 10600 tosses."
## [1] "The rate of heads to half of the tosses is 90 with 10600 tosses and 5390 heads."
## [1] "The proportion of heads is 0.00822429906542055 with 10700 tosses."
## [1] "The rate of heads to half of the tosses is 88 with 10700 tosses and 5438 heads."
## [1] "The proportion of heads is 0.00731481481481477 with 10800 tosses."
## [1] "The rate of heads to half of the tosses is 79 with 10800 tosses and 5479 heads."
## [1] "The proportion of heads is 0.00743119266055048 with 10900 tosses."
## [1] "The rate of heads to half of the tosses is 81 with 10900 tosses and 5531 heads."
## [1] "The proportion of heads is 0.00718181818181818 with 11000 tosses."
## [1] "The rate of heads to half of the tosses is 79 with 11000 tosses and 5579 heads."
## [1] "The proportion of heads is 0.00684684684684689 with 11100 tosses."
## [1] "The rate of heads to half of the tosses is 76 with 11100 tosses and 5626 heads."
## [1] "The proportion of heads is 0.00758928571428574 with 11200 tosses."
## [1] "The rate of heads to half of the tosses is 85 with 11200 tosses and 5685 heads."
## [1] "The proportion of heads is 0.00672566371681416 with 11300 tosses."
## [1] "The rate of heads to half of the tosses is 76 with 11300 tosses and 5726 heads."
## [1] "The proportion of heads is 0.006140350877193 with 11400 tosses."
## [1] "The rate of heads to half of the tosses is 70 with 11400 tosses and 5770 heads."
## [1] "The proportion of heads is 0.00617391304347825 with 11500 tosses."
## [1] "The rate of heads to half of the tosses is 71 with 11500 tosses and 5821 heads."
## [1] "The proportion of heads is 0.00637931034482764 with 11600 tosses."
## [1] "The rate of heads to half of the tosses is 74 with 11600 tosses and 5874 heads."
## [1] "The proportion of heads is 0.00529914529914532 with 11700 tosses."
## [1] "The rate of heads to half of the tosses is 62 with 11700 tosses and 5912 heads."
## [1] "The proportion of heads is 0.00474576271186444 with 11800 tosses."
## [1] "The rate of heads to half of the tosses is 56 with 11800 tosses and 5956 heads."
## [1] "The proportion of heads is 0.00537815126050423 with 11900 tosses."
## [1] "The rate of heads to half of the tosses is 64 with 11900 tosses and 6014 heads."
## [1] "The proportion of heads is 0.0053333333333333 with 12000 tosses."
## [1] "The rate of heads to half of the tosses is 64 with 12000 tosses and 6064 heads."
## [1] "The proportion of heads is 0.00553719008264464 with 12100 tosses."
## [1] "The rate of heads to half of the tosses is 67 with 12100 tosses and 6117 heads."
## [1] "The proportion of heads is 0.0055737704918033 with 12200 tosses."
## [1] "The rate of heads to half of the tosses is 68 with 12200 tosses and 6168 heads."
## [1] "The proportion of heads is 0.00495934959349598 with 12300 tosses."
## [1] "The rate of heads to half of the tosses is 61 with 12300 tosses and 6211 heads."
## [1] "The proportion of heads is 0.00532258064516133 with 12400 tosses."
## [1] "The rate of heads to half of the tosses is 66 with 12400 tosses and 6266 heads."
## [1] "The proportion of heads is 0.00536000000000003 with 12500 tosses."
## [1] "The rate of heads to half of the tosses is 67 with 12500 tosses and 6317 heads."
## [1] "The proportion of heads is 0.00547619047619052 with 12600 tosses."
## [1] "The rate of heads to half of the tosses is 69 with 12600 tosses and 6369 heads."
## [1] "The proportion of heads is 0.0049606299212599 with 12700 tosses."
## [1] "The rate of heads to half of the tosses is 63 with 12700 tosses and 6413 heads."
## [1] "The proportion of heads is 0.00546875000000002 with 12800 tosses."
## [1] "The rate of heads to half of the tosses is 70 with 12800 tosses and 6470 heads."
## [1] "The proportion of heads is 0.00589147286821701 with 12900 tosses."
## [1] "The rate of heads to half of the tosses is 76 with 12900 tosses and 6526 heads."
## [1] "The proportion of heads is 0.00546153846153841 with 13000 tosses."
## [1] "The rate of heads to half of the tosses is 71 with 13000 tosses and 6571 heads."
## [1] "The proportion of heads is 0.00580152671755729 with 13100 tosses."
## [1] "The rate of heads to half of the tosses is 76 with 13100 tosses and 6626 heads."
## [1] "The proportion of heads is 0.00583333333333336 with 13200 tosses."
## [1] "The rate of heads to half of the tosses is 77 with 13200 tosses and 6677 heads."
## [1] "The proportion of heads is 0.00563909774436089 with 13300 tosses."
## [1] "The rate of heads to half of the tosses is 75 with 13300 tosses and 6725 heads."
## [1] "The proportion of heads is 0.00582089552238807 with 13400 tosses."
## [1] "The rate of heads to half of the tosses is 78 with 13400 tosses and 6778 heads."
## [1] "The proportion of heads is 0.00555555555555554 with 13500 tosses."
## [1] "The rate of heads to half of the tosses is 75 with 13500 tosses and 6825 heads."
## [1] "The proportion of heads is 0.00514705882352939 with 13600 tosses."
## [1] "The rate of heads to half of the tosses is 70 with 13600 tosses and 6870 heads."
## [1] "The proportion of heads is 0.00445255474452555 with 13700 tosses."
## [1] "The rate of heads to half of the tosses is 61 with 13700 tosses and 6911 heads."
## [1] "The proportion of heads is 0.00420289855072464 with 13800 tosses."
## [1] "The rate of heads to half of the tosses is 58 with 13800 tosses and 6958 heads."
## [1] "The proportion of heads is 0.00417266187050358 with 13900 tosses."
## [1] "The rate of heads to half of the tosses is 58 with 13900 tosses and 7008 heads."
## [1] "The proportion of heads is 0.00471428571428567 with 14000 tosses."
## [1] "The rate of heads to half of the tosses is 66 with 14000 tosses and 7066 heads."
## [1] "The proportion of heads is 0.00475177304964536 with 14100 tosses."
## [1] "The rate of heads to half of the tosses is 67 with 14100 tosses and 7117 heads."
## [1] "The proportion of heads is 0.00443661971830989 with 14200 tosses."
## [1] "The rate of heads to half of the tosses is 63 with 14200 tosses and 7163 heads."
## [1] "The proportion of heads is 0.00419580419580423 with 14300 tosses."
## [1] "The rate of heads to half of the tosses is 60 with 14300 tosses and 7210 heads."
## [1] "The proportion of heads is 0.00388888888888894 with 14400 tosses."
## [1] "The rate of heads to half of the tosses is 56 with 14400 tosses and 7256 heads."
## [1] "The proportion of heads is 0.00393103448275867 with 14500 tosses."
## [1] "The rate of heads to half of the tosses is 57 with 14500 tosses and 7307 heads."
## [1] "The proportion of heads is 0.00479452054794516 with 14600 tosses."
## [1] "The rate of heads to half of the tosses is 70 with 14600 tosses and 7370 heads."
## [1] "The proportion of heads is 0.00496598639455781 with 14700 tosses."
## [1] "The rate of heads to half of the tosses is 73 with 14700 tosses and 7423 heads."
## [1] "The proportion of heads is 0.00486486486486482 with 14800 tosses."
## [1] "The rate of heads to half of the tosses is 72 with 14800 tosses and 7472 heads."
## [1] "The proportion of heads is 0.00422818791946311 with 14900 tosses."
## [1] "The rate of heads to half of the tosses is 63 with 14900 tosses and 7513 heads."