Flip N coins using a random number generator, and count the observed number of heads. Repeat M times, and compute the average, max, min, and standard deviation for the observed numbers of heads. Tabulate results. Do this for at least N = {10, 100, 1000} but also higher if you can, and one value of M (at least 30 but 10^4 or more if you can). To flip a coin in Excel, for example, CEILING(RAND()-0.5,1) returns 0=tail and 1=head with equal probability.
The number of tosses and it's descriptive statistics are given below:
N=10 | N=100 | N=1000 |
4 | 54 | 487 |
5 | 47 | 491 |
6 | 48 | 494 |
5 | 62 | 495 |
4 | 50 | 509 |
6 | 51 | 490 |
3 | 47 | 524 |
5 | 60 | 519 |
8 | 46 | 485 |
7 | 55 | 501 |
4 | 48 | 495 |
5 | 54 | 491 |
6 | 53 | 469 |
5 | 48 | 513 |
4 | 51 | 497 |
5 | 44 | 481 |
6 | 51 | 515 |
5 | 46 | 468 |
6 | 57 | 516 |
4 | 53 | 487 |
5 | 59 | 514 |
8 | 51 | 472 |
6 | 45 | 483 |
7 | 49 | 505 |
7 | 49 | 504 |
3 | 51 | 523 |
7 | 42 | 502 |
7 | 49 | 508 |
6 | 51 | 481 |
4 | 60 | 539 |
7 | 51 | 547 |
6 | 44 | 499 |
6 | 50 | 509 |
2 | 56 | 506 |
4 | 62 | 505 |
2 | 51 | 509 |
6 | 55 | 487 |
6 | 59 | 506 |
5 | 54 | 499 |
6 | 50 | 491 |
5 | 44 | 512 |
5 | 55 | 492 |
N=10 | N=100 | N=1000 | |
Mean | 5.30952380952381 | 51.4761904761905 | 500.476190476191 |
Standard Error | 0.219512963268878 | 0.782531476242467 | 2.60019611858346 |
Mode | 6 | 51 | 487 |
Median | 5 | 51 | 500 |
First Quartile | 4.25 | 48 | 490.25 |
Third Quartile | 6 | 54.75 | 509 |
Variance | 2.02380952380952 | 25.718931475029 | 283.962833914053 |
Standard Deviation | 1.42260659488473 | 5.07138358586974 | 16.851196809546 |
Kurtosis | 0.035358777436587 | -0.423634004567769 | 0.655278968140574 |
Skewness | -0.367321369019064 | 0.354028902607459 | 0.426269788209806 |
Range | 6 | 20 | 79 |
Minimum | 2 | 42 | 468 |
Maximum | 8 | 62 | 547 |
Sum | 223 | 2162 | 21020 |
Count | 42 | 42 | 42 |
Flip N coins using a random number generator, and count the observed number of heads. Repeat...
Flip a coin 10 times and record the observed number of heads and tails. For example, with 10 flips one might get 6 heads and 4 tails. Now, flip the coin another 20 times (so 30 times in total) and again, record the observed number of heads and tails. Finally, flip the coin another 70 times (so 100 times in total) and record your results again. We would expect that the distribution of heads and tails to be 50/50. How...
A 10-yen coin is thrown $N$ times, where $N$ is the number of total heads of obtained by tossing three $100$-yen coins together. Calculate the expected value of the number of total heads obtained by tossing the $10$ yen coin. explain pls answer is 3/4
Suppose we want to make change for n cents, using the least number of coins of denominations 1, 10, and 25 cents. Consider the following greedy strategy: suppose the amount left to change is m; take the largest coin that is no more than m; subtract this coin's value from m, and repeat. Either give a counter example, to prove that this algorithm can output a non-optimal solution or prove that this algorithm always outputs an optimal solution.
Problem: Write a function named coinToss that simulates the tossing of a coin. When you call the function, it should generate a random number in the range of 1 through 2. If the random number is 1, the function should display “heads.” If the random number is 2, the function should display “tails.” Demonstrate the function in a program that asks the user how many times the coin should be tossed and then simulates the tossing of the coin that...
Suppose we flip a fair coin n times. We say that the sequence is balanced when there are equal number of heads and tails. For example, if we flip the coin 10 times and the results are HT HHT HT T HH, then this sequence balanced 2 times, i.e. at position 2 and position 8 (after the second and eighth flips). In terms of n, what is the expected number of times the sequence is balanced within n flips?
Flipping Coins For a fair coin, the chance of getting tails is 1/2. Counting the number of tails Let's experiment with the total number of tails in n trials. Total number of tails in a small number of coin flips ם Suppose we flip 10 coins (with 1 = Tails and 0 = Heads). Here are six samples of size 10. = 10 trials = 6 for (i in 1: trials) { print (sample(c(0, 1), 1, replace=TRUE)) مه ## [1]...
conducts an experiment in which they tip a coin 10 times and count of heads. Let the random represent varlable X represent the number of heads. Write the distribution of x In a class of 40 students, each student conducts an experiment in which they flip a coin 10 times and count the number of heads. Let the random variable&represent the mean number of heads found by the students Write the distribution of á 8) One student conducts an experiment...
Flipping Coins For a fair coin, the chance of getting tails is 1/2. Counting the number of tails Let's experiment with the total number of tails in n trials. Total number of tails in a small number of coin flips n Suppose we flip 10 coins (with 1 = Tails and 0 = Heads). Here are six samples of size 10. - 10 trials = 6 for (i in 1: trials) { print (sample(c(0, 1), n, replace=TRUE)) ## [1] 0...
Random Number Generation and Static Methods Write a program that simulates the flipping of a coin n-times to see how often it comes up heads or tails. Ask the user to type in the number of flips (n) and print out the number of times the coin lands on head and tail. Use the method ‘random()’ from the Math class to generate the random numbers, and assume that a number less than 0.5 represents a tail, and a number bigger...