(10 pts)
I’ve got a program on my web space that generates a random sequence of coin flips and returns the result as a CSV file. You can access it here:
https://marksmath.org/cgi-bin/coin_flips.csv
Again, it looks like a CSV file. In fact, it is a CSV file by the time you get it. On my web server, though, it’s a computer program that generates a CSV file. If you load it again, you should get a different sequence of flips. You can even specify some query parameters. For example, you can ask for more flips:
https://marksmath.org/cgi-bin/coin_flips.csv?n=100
Here’s the thing: The coin is not necessarily fair. The first thing the program does is pick a number p with probability distribution
- P(0.4<p<0.5)=1/3
- P(p=0.5)=1/3
- P(0.5<p<0.6)=1/3
The program then generates a sequence of Heads and Tails with distribution
- P(X=H)=p
- P(X=T)=1-p
Thus, the coin is fair one-third of the time but it might be biased in one direction or the other.
The program does accept a seed
parameter that allows you to seed the random number generator for the choice of p. For example, I could seed the random number generator with my name like so:
https://marksmath.org/cgi-bin/coin_flips.csv?n=100&seed=mark
Note that the sequence of coin flips still varies. Thus, if I reload that page, I get a different sequence of coin flips but that sequence will be generated from the same distribution - i.e. with the same choice of p.
Your mission
Seed the program above with your forum login name and run a hypothesis test to determine if the resulting coin is fair.