Thai guy wrote:

So that is the formula for the probability for receiving n herbs from 1 patch (excluding juju and greenfingers)

I realised that this is a Negative binomial distribution with r=5 and p=chance of not losing a life, the only difference is that in farming when you "fail" and lose a life you still get a herb whereas the way a negative binomial distribution is defined when you "fail" you wouldn't get a herb. Because of this you get 5 free herbs, it is easy for adjust for this by just setting n equal to n+5 in any formulae for the negative binomial distribution. This could be helpful in future.

http://en.wikipedia.org/wiki/Negative_b ... stributionThe distribution of herbs yielded when using juju and an aura is difficult to model. This is because there are many degrees of freedom: number of yield attempts, number of juju activations, number of aura activations meaning that an expression for the probability of getting a set number of herbs will have 3 summations in it and they are hard to evaluate without specified values of number of herbs gained. The process of getting herbs with juju and greenfingers is a multinomial process. Modelling the number of herbs gained from 5 patches is even more confusing and it will have 19 degrees of freedom. But we needed to somehow find the distributions of herbs from a whole farm run in order to extract useful information from farming logs which keep track of total herbs from a farm run.

Firstly I wrote a script to create a table of the probability of getting n herbs from y yields with specified probabilities of juju and greenfingers activating.

The formula for the chance of getting n herbs from y yields is

Where x1, x2, x3 are the number of times you get 1, 2, 3 herbs from a yield attempt and k1, k2 k3 are the chance of getting 1, 2, 3 herbs from a yield attempt.

Having got that table I was then able to find the probability of getting n herbs without assuming the number of yield attempts. The number of yield attempts is given by the first formula in this post.

The probability of getting n herbs from 1 patch is then

Which I used my table to evaluate. (max is just some upper limit which it is extremely unlikely to get above)

The probability distribution is approximately a normal distribution so I will make the assumption that it is. I used the table to find the mean and standard deviation of the distribution. The number of herbs gained from 5 patches is the sum of 5 normal distributions and it will itself be a normal distibution with mean 5 times higher and standard deviation sqrt(5) times higher.

My table was set up so that I could enter the chance of losing a life and it would return the mean and standard deviation.

I call the number of herbs from 5 patches N

With the normal distribution approximation the best estimation of the probability of getting N herbs is

There is a function for this in all spreadsheet softwares. Phi(N) is the normal distribution function for the number of herbs from 5 patches. Phi(N) changes as I change the chance of losing a life figure.

I grouped Justin and Donald's farming log into specific herbs for different aura tiers. 5 groups were large enough to analyze. Torstol at T4, Snapdragons at T0, T3 and T4, and Dwarf weed at T4. Justin and Donald's farming log is dated, using runetracker Justin and I got the average level they were at in each group. I compared the observed frequency to the frequency predicted by the normal distribution approximation. With trial and error I found the value of "chance of losing a life" which minimised the weighted mean squared error of the predicted probability of getting N herbs.

With the 5 points from Junstin and Donalds log, and the 1 point from Zigzagpaul's log I got an approximate equation relating player farming level and the herb's farming requirement. It was:

Chance of losing a life= 1.2672-0.008516*(farming level)+0.003404*(farming requirement)

However, this was not accurate for my data on guams so the trend which Jagex used must be quite nonlinear. I do think though that we can get a reasonable estimation for herb yield in high level herbs at high farming levels.

The 6 figures for chance of losing a life are here

https://docs.google.com/spreadsheet/ccc ... xckE#gid=0

_________________

Witch King Obtaurian, Dark Lord of the Sith wrote:

I am better than Aero Dreamz