Biased Coin
Biased Coin
Biased Coin
by Shubham Choudhary (Computer Science and Engineering, Indian Institute of Technology Ropar , Oct 2012)
Entry no 2010CS1011
ABSTRACT
This paper is all about how to detect whether a coin is fair or not and how many trials it
needs to convey this with maximum confidence level. Coin tossing is a simple and unbiased way of settling a dispute or deciding between two or more arbitrary options. It is used widely in sports and other games to decide arbitrary factors such as which side will take the decision of attacking or defending initially. In some jurisdictions, a coin is tossed to decide between two candidates who secured equal number of votes in the election or between two companies tendering for a project with equal price. But how can we say whether the coin is fair. A coin can be partially biased towards a part or can be totally biased also. So here we come up with a methd to find the biased value of the coin.
1. INTRODUCTION
A simple method to find the biased value of a coin is to toss it a number of time and note the number of heads and tails and then conclude the biased value of the coin. But how many times should we toss the coin, is the whole question? So here we come up with an algorithm to find the number of trials required to find the biased value of a coin.
2.METHOD
This detection method can be split into two parts. First finding the expected value of the biased value of the coin with the help of proterious probability density function when number of heads occured are given and second is to find the number of trials required to find the biased value of the coin with a specific tolerable margin of error.
Here we perform a test by tossing the coin, who's biased value is unknown, for N times and noting the observed numbers of heads and tails as h and t respectively. The symbols H and T represents more generalised variable expressing the numbers of heads h and tails t respectively that might have been observed in the experiment. Thus we have N = H + T = h + t. Let be the actual probability of obtaining heads in a single toss of the coin. We are investigating this property only of a coin. By Baye's theorem we have probability of an event W conditioned on event L as
Since is a contineous random variable hence its probability density is considered. We can derive the above density formula as follows.
And
because if total N trials are there and h heads and t tails then N = h + t. By using the Law Of Total Probability
We will assume that the prior distribution of [0, 1], hence g(r)= 1/(1-0) = 1 .
The probability of binomial distribution of obtaining h heads in N tosses of a coin with a probability of heads equal to r is
And by the definition of gamma function we have a relation between beta and gamma function
and
Hence with the help of the aboe two relations we get our formula for prosterior probability density as
We are able to calculate the probability of occurance of head between a particular range by integrating the above function between the particular range of limit.
Example:-
This expected value will only give us the biased value of the coin and show us whether our coin is baised or unbiased.
In statistics, the estimate of a proportion of sample (here p) has a standard error given by:
where N is the number of trials This a coin which following: standard error function of p has a maximum at p = (p-1) = 0.5. Further in case of is being tossed p will be close to 0.5, so it is appropriate to take p = 0.5 in the
3. ANALYSIS
Now we are in a position to determine the number of trials needed to find out the biasness of a coin. Suppose we are given a coin whose biasness is not known and the maximum acceptable error (E) given is 0.01, we now have to tell the number of trials required to find the biasness of the coin and the bias value also. So we start by finding the value of N
So now if we take the confidence interval Z as 1 i.e. with confidence level 68.27% then we get trials. And if Z=3.3 i.e. With 99.90% confidence level then we get trials. We see that as we increase the confidence level there is an increase in the number of trials. Taking trials we will toss the coin for so many times and note the number of heads and tails. And with the help of
formula we will calculate the biasing the of the coin. And if the value of (0.5 + E) then we will conclude that the coin is fair.
in between (0.5 - E) to
4. ACKNOWLEDGEMENT
I would like to thanks Dr. Sudarshan Iyengar our Algorithm and Design Course Instructor for assigning us such an interesting topic related to probability which taught me some very interesting aspects of probability. Thank you.
5. REFERENCES
1. 2. 3. 4. 5. 6. 7. 8. http://en.wikipedia.org/wiki/Checking_whether_a_coin_is_fair http://en.wikipedia.org/wiki/Posterior_distribution http://en.wikipedia.org/wiki/Bayesian_probability_theory http://en.wikipedia.org/wiki/Bayes%27_theorem http://en.wikipedia.org/wiki/Beta_distribution http://en.wikipedia.org/wiki/Probability_density_function http://en.wikipedia.org/wiki/Normal_distribution http://en.wikipedia.org/wiki/Confidence_interval