Mudanças entre as edições de "Bayes Theorem - Teorema de Bayes"
Calsaverini (disc | contribs) |
Calsaverini (disc | contribs) |
||
Linha 39: | Linha 39: | ||
<math> | <math> | ||
\int p^{n_1} (1-p)^{n_2} dp = \frac{n_1!n_2!}{(n_1+n_2+1)!} | \int p^{n_1} (1-p)^{n_2} dp = \frac{n_1!n_2!}{(n_1+n_2+1)!} | ||
− | </math | + | </math |
+ | |||
we finally get: | we finally get: | ||
Linha 45: | Linha 46: | ||
P(p | n_1,n_2) = \frac{p^{n_1} (1-p)^{n_2}}{ \int_0^1 p^{n_1} (1-p)^{n_2} dp} = \frac{(n_1+n_2+1)!}{n_1!n_2!}p^{n_1} (1-p)^{n_2} | P(p | n_1,n_2) = \frac{p^{n_1} (1-p)^{n_2}}{ \int_0^1 p^{n_1} (1-p)^{n_2} dp} = \frac{(n_1+n_2+1)!}{n_1!n_2!}p^{n_1} (1-p)^{n_2} | ||
</math> | </math> | ||
+ | |||
The mean probability of 1 happening is: | The mean probability of 1 happening is: | ||
Edição das 01h48min de 4 de agosto de 2007
The Bayes' theorem is a result of probability theory that states that:
where P(A|B) is the conditional probability of event A given event B, P(A) is the probability of event A, and so on.
Let's wonder about the following problem: given a histogram of the frequencies measured of some event, what is the probability that the real distribution is a given function?
Let's simplify by assuming an experiment with two possible outcomes (1 and 2). Let's assume that in a statistical survey, event 1 is find n1 times and event 2 n2 times. What is the probability that the real probability of event 1 is p?
By the Bayes' theorem we have:
As we do not now the (unconditional) probability of the distribution being p, let's make the assumption that any distribution is as good as any other, that is, let's assume that P(p) is a constant. As P(n1,n2) does not depend on p, and we must satisfy:
Then we have:
The probability that 1 happens n1 times and 2 happens n2 times given that the probability of 1 is p is given by the binomial distribution:
Noting that:
The mean probability of 1 happening is:
So:
The average quadratic probability is:
So:
And the variance is: