Hi everyone


The question is the following:


A certain event may or may not take place. So we say that if we focus on it one time, it has a probability p of being satisfied (0 <= p < 1)


If we observe it multiple times, and we find out that it occurred zero times among our n observation, what can we say about p? What is the most likely value for p? Or better, find a function k(x, n) that returns the probability that p = x


How does it all change if among our n observation the event occurred m times? I know that if n tens to infinity then p tends to m/n but that is only part of the question


Thank you



Probability and events
I'll interpret "most likely" as [Maximum Likelihood Estimation](http://en.wikipedia.org/wiki/Maximum_likelihood), that is, given some observations, what is the value of $p$ that makes the probability of those observations the largest. For example, if we observe something occurring $0$ out of $n$ times, the maximum likelihood estimate for $p$ is $0$, because that gives our observations a probability of $1$. This is only unreasonable if you have some prior information about $p$ (such as "it's probably around $0.5$, but maybe a little higher or lower" or "it's very close to either $1$ or $0$, but I don't know which").


Suppose we run $n$ trials, and find that the event occurred $n$ times, and we assume that each trial is independent with the same probability $p$ of success. Then the probability of our observation is
$$P(p) = {n \choose m} p^m (1-p)^{n-m},$$
since the probability of each of the $m$ successes is $p$, the probability of the $n-m$ failures is $1-p$, and there are ${n\choose m}$ ways for $m$ of the $n$ trials to be the successful trials. Assuming $m$ and $n-m$ are both nonzero, this probability vanishes when $p=0$ or $1$, so the maximizing value of $p$ will be somewhere in between. Then we can find this maximizing value of $p$ by taking the derivative of $P$ and setting the result equal to $0$. We can take the derivative:
$$P'(p) = {n\choose m} \left[mp^{m-1}(1-p)^{n-m} - (n-m)p^m(1-p)^{n-m-1}\right]$$
$$ = {n\choose m} \left[m(1-p) - (n-m)p\right]p^{m-1}(1-p)^{n-m-1}$$
This vanishes when $m(1-p)-(n-m)p=0$, i.e. when $m = np$ or $p = m/n$.


So if you have no prior information about what $p$ should be, but you observe $m$ successes in $n$ independent trials, the value of $p$ that best matches your observation is $p=m/n$.


