I made this new answer as it is fundamentally different.
This is based on Chris Bishop, “Machine Science” and “Pattern Recognition,” chapter 2 “Probability Distribution” p71 ++ and http://en.wikipedia.org/wiki/Beta_distribution .
First, we approach the beta distribution to a given average value and variance in order to construct a distribution over the parameters. Then we return the distribution mode, which is the expected parameter for the bernoulli variable.
def estimate(prior_mean, prior_variance, clicks, views): c = ((prior_mean * (1 - prior_mean)) / prior_variance - 1) a = prior_mean * c b = (1 - prior_mean) * c return ((a + clicks) - 1) / (a + b + views - 2)
However, I am quite sure that the previous average / variance will not work for you, since you throw out information about how many samples you have and how good your previous one is.
Instead: given the set of (web pages, link_clicked) pairs, you can calculate the number of pages that a specific link was clicked on. Let it be m. Let the number of times this link has not been clicked be l.
Now let a be the number of clicks on your new link, and the number of visits to the site will be b. Then your likelihood of your new link
def estimate(m, l, a, b): (m + a) / (m + l + a + b)
Which looks pretty trivial, but actually has a valid probabilistic foundation. In terms of implementation, you can store m and l all over the world.