3 ms·
I remember thinking about something similar to this at university - I was uncomfortable with the use of biases to assign non-zero probabilities to events that f
by yarg 2y ago
I remember thinking about something similar to this at university - I was uncomfortable with the use of biases to assign non-zero probabilities to events that fail to occur after some number of trials.
If I flip a coin n times and it comes up heads everytime, what's my best estimate of the likelihood of tails?
It came out as 1/2^(1/(n + 1)); and the chance of heads = (1 - that).
The calculus for results in between seemed intractable to me - or at least well beyond my abilities...
So I threw it into a newton-raphson solver and was happy to see that it came out pretty much linear (the most asymmetrical result will be the one for three trials, and since that was basically linear all results for greater n will be as well).
But I never went quite this far - for that you'd also need to calculate the standard deviation of the probability estimate (I don't think that it would've been much harder than what I did, but it was outside of my requirements at the time, so it was something I never implemented).
- LegionMammal978 2y agoFor such a question to make sense, don't we have to first define some distribution over how the coin might be biased in the first place?
- ggm 2y agoInteresting question. I would say yes. But, there are subtle biases: * coin always favours H or T. simple bias * coin has some component of behaviour which can be on, off or reset. For example a liquid mercury component, which can bias the H or T outcome but the right kind of "flip" resets it to a known-safe mode so the coin has less to no bias. * coin has bias which only manifests in skilled hands. a particular kind of flip. The point I'm making is that probably, the bias is always assumed to be H or T favouring, but doesn't admit more complex coin bias where it could be 2 or more actors and 2 or more capable of biassing, and a pigeon who can't (or a dummy, and a pigeon: a good con generally has more people involved than you think)
- hervature 2y agoThis is the Bayesian vs. frequentist view point. What the OP is talking about is assigning a Beta(1,1) prior on the distribution and observing n heads in a row would yield a distribution of the bias of Beta(1, 1+n) and the mean of that distribution is 1/(n+2) which means the OP is off by one in the denominator but still good for memory. However, that is if you take the mean as your best estimate of the bias. If you take the mode, then the OP would be satisfied that even the Bayesian approach says that tails would be impossible. The frequentist view would say your best estimate is the average of the observations which would yield a completely unfair coin.
- yarg 2y agoIt was twenty years ago, but I think it was n + 1. I'll redo the maths and check.
- yarg 2y agoWith the simplified form of the binomial for n equal to k: ∫(0 -> x)(p^n)dp = ∫(x -> 1)(p^n)dp [p^(n+1)/(n+1)](0 -> x) = [p^(n+1)/(n+1)](x -> 1) x^(n+1) - 0^(n+1) = 1^(n+1) - x^(n+1) 2 * x^(n+1) = 1 x^(n+1) = 1/2 x = 1/(2^(1/(n+1))) Was I wrong? Have I been wrong for decades now?
- hervature 2y agoMath is more than symbolic manipulation. You need to explain where the equations come from. The best I can decipher is that you are calculating the median of a Binomial distribution given k=0. Your "error" comes from the fact that you are positing that all biases are equally likely. Thus, you should not be surprised that you are getting a non-zero probability because you yourself are saying they are non-zero.
- yarg 2y agoI'll write some code to test it tomorrow, but why the hell would it be zero? There are other probabilities that can lead to zero successes - every probability except for one. And yes, they diminish rapidly as the number of trials goes up (much in the same way as it does in my equation).
- yarg 2y agoI just treated it as a binomial distribution with a fixed but unknown probability. Take the case of zero successes, that can happen for every probability except for one. The graph peaks at zero, but if you calculate 'x' such that the integral from zero to x of the binomial function is equal to the integral from x to one, you get a nice centre point.