# Can a fair coin test be applied to a coin that often lands on its edge?

If you flip a coin and get 268 heads and 98 tails, you can calculate the probability that coin is fair several ways. A simple, heuristic observation would have most likely conclude that such a coin is unfair. I've calculated the p-value in R with:

> coin <- pbinom(98, 366, 0.5)
> coin*2
 2.214369e-19


This value is smaller than .05, ergo we reject the hypothesis that it's a fair coin.

But what if you where told that the same coin landed on its side 676 times during the trial. Heuristically you'll likely come to the same conclusion, but would the typical fair coin tests still be valid?

Here is a graph to illustrate the problem: What are valid methods to test the hypothesis that there is equal probability that an event occurs in the shaded areas?

NOTE: there are 629 positive moves (413 negative) in the graph illustration.

R code that generates the data:

require("quantmod")

ticker <- getSymbols("SLV")[,6]

change <- (ticker - lag(ticker, 24)) / lag(ticker, 24)
change <- na.locf(change, na.rm=TRUE)

# some other calculations

dens <- density(change)
plot(dens)

# some formatting stuff

• Clearly the data this graph is based on are not derived from tossing a coin and appear to be continuous, not binary. Could you tell us what the substantive question is you're trying to answer? Putting it in terms of an stereotypical example isn't helping here. Mar 26 '11 at 14:22
• The graph is derived from calculating the how much (in percentage terms) today's close is when compared to the close 24 days ago. Option pricing models assume that there is a 50% probability that a stock will be 10% higher or 10% lower in n days. This graph is a distribution of actual prices. Can we accept the hypothesis that there is equal probability that a stock's price will be 10% higher or 10% lower in n days. Mar 26 '11 at 14:41
• @Milktrader, first of all, option models do not assume that there is an equal probability of a 10% upward return versus an equal percentage downward return. Indeed, option models under a no-arbitrage framework do not even work with the actual distribution of returns. Furthermore, even the risk-neutral measure generally assumes that the prices have a higher probability of rising than falling. Finally, your comment makes two very different statements about the returns, even though you seem to be thinking about them as the same. Maybe you can reword and clarify your question. Mar 26 '11 at 16:16
• @cardinal I'm actually more interested in probability theory than option pricing models with this question, although the topic of option pricing models is interesting. You likely have a more robust option pricing model, but mine shows there is a 14.81% prob SLV closes > 40.04 and 14.52% prob it closes < 32.75 by APR expiry (20 days). I'm also happy to rephrase my question to clarify it, but I'm not sure how I've made two unique statements about returns. Mar 26 '11 at 18:13
• @Milktrader, I'm just trying to figure out what problem you are trying to solve. My reference to option-pricing models was actually meant to refer to even the most basic and "standard" ones. Currently they may appear to assume a symmetric distribution, but that would only be because interest rates are near zero. Mar 26 '11 at 20:34

I'm pretty sure the answer is yes, the standard binomial 'fair coin' test is still valid: if you wish to test whether two of the three probabilities of a multinomial distribution are the same but you're not interested in any hypotheses about the third probability, you can analyse the numbers of the corresponding two outcomes as if they were drawn from a binomial distribution.

In fact this seems to make quite a nice exercise about sufficient statistics and conditional likelihood:

You can think of this as a multinomial distribution with three possible outcomes and hence two estimable parameters (as the three probabilities must sum to 1). But you're not interested in the probability of the 'middle' outcome, so you can take this to be the nuisance parameter, and the difference between the number of 'top' and 'bottom' outcomes to be the parameter of interest.

It's straightforward to show (using the Fisher–Neyman factorization theorem) that the numbers of 'top' and 'bottom' outcomes together form a (two-dimensional) sufficient statistic for the parameter of interest, i.e. the number of 'middle' outcomes doesn't provide any additional information about the value of the parameter of interest. The number of 'middle' outcomes is clearly a sufficient statistic for the nuisance prameter. If we condition on the latter, I think (haven't checked properly) that the resulting conditional likelihood will end up the same as the likelihood for the binomial distribution, i.e. the coin-tossing problem.

• This is very off-the-cuff as I haven't done any calculation. All of what you've written sounds good. The only question that initially comes up to me is that it seems the estimate of variance might be different from if you "threw away" the samples corresponding to the third outcome. Mar 26 '11 at 22:33
• Yes, this is the formal description of my problem. Can a multinomial distribution be reduced to a binomial distribution? What concerns me is the size of the 'middle' outcome. Mar 27 '11 at 0:45
• I'm accepting this as "Yes, you can, provided that your conditional likelihood is the same as the binomial distribution likelihood". I'm not sure how you would set up that test, but that's reaching beyond the scope of my original question. Mar 28 '11 at 13:40
• Although the explanation of answer involved conditional likelihood, i intended my answer to your question "would the typical fair coin tests still be valid?" to be an unconditional yes! Mar 28 '11 at 19:08

If you frame this as a binomial problem (p, 1-p), not a multinomial problem, you'll only be able to describe the past. You won't be able to say anything about the future. Why? Your removal of the middle "edge flips" is implied in your regrouping of the data.

In other words, your "data described" probability "p" of a positive result and probability "1-p" of a negative result will not apply on the next "binomial flip of the coin", because in the future you really have probabilities "x", "y", and "(1-x-y)".

Edit (03/27/2011) =============================== 