Sunday 16 September 2012

Distribution of Solution Times

We can use the results from my previous article A Simpler Server Rating Method to calculate the probability distribution for a user's solution times on the assumption that he always checks his solutions perfectly.  With the notation of the previous article, the user's expected score is given by:

sU = 1 / (1 + 10^[(RP - RU - K*log2(t/T))/400])

Let xP = 10^(RP/400) and xU = 10^(RU/400).

sU = 1 / (1 + (xP / xU) / 10^[K*log2(t/T))/400])

As before:

10^[K*log2(t/T))/400] = [10^log2]^(K/400) = [10^[log(t/T)/log(2)]/400]^(K/400) = (t/T)k

where k = K/(400*log(2)).

sU = 1 / (1 + (xP / xU) * (t/T)-k) = xU / [xU + xP * (t/T)-k]

The expression for sU is the cumulative probability distribution of the user's correct solution times.  The probability distribution itself is the derivative of sU with respect to t:

dsU/dt = -xU * xP * -k * (t/T)-k-1) * (1/T) / [xU + xP * (t/T)-k)]2

= xU * xP * (k/t) * (t/T)-k / [xU + xP * (t/T)-k)]2

= (k/t) * {xU / [xU + xP * (t/T)-k)]} * {xP (t/T)-k / [xU + xP * (t/T)-k)]}

= sU * (1 - sU) * k / t

Equally Rated User and Problem

The graph below shows the distribution of solution times with perfect checking for a user and problem that are equally rated at a target time of 100 seconds:
















For this graph, K = 150.  The most likely solution time for this example is 17 seconds, i.e. just over a sixth of the target time.  I worked out values for the average time using the trapezium rule, with intervals of 1 second.  The average solution time exceeds the target time after about 343 seconds, and is about 227 seconds after an hour.  It is still rising steadily on a log scale, but most users would have given up before that!  This is a very curious result.

User 400 Points Stronger

The graph below shows what happens when the user's rating is increased to 400 points more than the problem rating:
















The user is nearly three times faster here, so the graph is squashed to the left.

4 comments:

  1. This all is very interesting. I just can't think of anything usefull to say about it.

    ReplyDelete
  2. Thank you very much for expressing an interest. It is easy to assume that if nobody comments, nobody is interested. Nonetheless, I keep telling myself that most of my readers are in the future. I have been beavering away at the mathematics, and have more to tell at the end of the week. It is amazing how much you can get from one little equation.

    ReplyDelete
  3. I know what you mean. Lately someone put a post of mine up at reddit.com and I got over 950 visitors in 3 days. And no one commented! That is pretty frustrating. But we don't must underestimate the threshold people have to overcome to comment. Sometimes people are scared away by highbrowed language (in my case) or mathematics (in your case) :)
    I look forward to your next post.

    ReplyDelete
  4. Honestly - most of the stuff you post goes flying over my head - probably because I've not done any serious math problems since I was in MBA school and I just don't have the taste to read or understand it.

    But - I wanted to leave a comment in light of what you and Tempo just said :-)

    ReplyDelete