Probability of the next entry in a series of discrete trials.

Hi, all.

Suppose you have a series of events, all the same, which can result in X or ~X. The probability of each is unknown. As you watch the series go forward, every entry (to start) is X. So:

At any point, however, it is possible that the pattern will cease, and that we will get a ~X. But let's say it hasn't happened yet.

Let's also say that the number of X's we have observed so far is , such that the probability of this occurring is:

So, how do we determine P(X) ?

We could determine a confidence level, I think...

So, there's a 95% chance that , yes? But how do we actually find P(X)?

Thanks!