Wikipedia:Reference desk/Archives/Mathematics/2012 February 1

Mathematics desk
< January 31 << Jan | February | Mar >> February 2 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


February 1 edit

Determining probability quickly edit

I've got a binomial distribution with unknown probability p (if it matters, it's somewhere around 0.01). If I estimate the value of p the obvious way by running a bunch of trials and dividing the number of successes by the number of trials, it takes a while: the quality of the estimate increases as the square of the number of trials. Is there a way to speed things up? --Carnildo (talk) 21:35, 1 February 2012 (UTC)[reply]

I don't think there's a general way. However, depending on what you are measuring the probability of, there may indeed be a short cut. Let's say you were finding the probability of tossing heads seven times in a row. You could figure that as 7 independent events each with a 0.5 probability, or P = (1/2)7 = 1/128. StuRat (talk) 21:55, 1 February 2012 (UTC)[reply]
... but that wouldn't change the number of trials needed to reach a given confidence in the conclusion unless there is some assumption you can reasonably make about the distribution that narrows down the possibilities. Dbfirs 23:14, 1 February 2012 (UTC)[reply]

See Bayesian inference#Posterior distribution of the binomial parameter. The mean value of p is not the number of successes i divided by the number of trials n, but rather μ=(i+1)/(n+2), and the standard deviation is σ=√(μ(1−μ)/(n+3)). So if n=7 and i=0 you get p ≈ μ±σ = 0.111111±0.0947559. This may also be written p=0.11(9), see concise notation#Measurements. Bo Jacoby (talk) 11:49, 2 February 2012 (UTC).[reply]

That...doesn't change my numbers very much. With the data I've got so far, it gives a p of 0.0106(26) rather than 0.0100(25), and better values are still O(n^2). --Carnildo (talk) 03:00, 3 February 2012 (UTC)[reply]

Yes, but why not use the correct formula? The case n=i=0 gives p=0.5000(2887), which makes sense, while your formula, p=i/n=0/0, does not make sense. Solving the equations   and   gives   and  . Neither 0.0106(26) nor 0.0100(25) give integer values of n and i. There is no way to speed things up. Bo Jacoby (talk) 15:05, 3 February 2012 (UTC).[reply]