• Emily Zhang
  • Fiddler

Will You Top the Leaderboard?

2024 Oct 112024 October 11 Problem Back

This Week's Fiddler

We note that for each rider, there are two uniform distributions at play here: power (P=U(0,200)P=U(0,200)P=U(0,200), in Watts) and time (T=U(0,1800)T=U(0,1800)T=U(0,1800), in seconds). The product of these, W=PTW=PTW=PT, represents the work this rider has done, which is what the leaderboard ranks by.

If we're at the middle of the leaderboard, this means our work www rests at the median of WWW. Now we need to determine FW(w)F_W(w)FW​(w), the cumulative distribution function of WWW.

FW(w)=Pr⁡(W≤w)=1200∫0200Pr⁡(T≤wp) dp=1200(∫0w1800 dp+∫w1800200Pr⁡(T≤w1800⋅p) dp)=1200([p]0w1800+[w1800ln⁡(p)]w1800200)=1200(w1800+w1800⋅ln⁡(200)−w1800ln⁡(w1800))=w360000(1−log⁡(w360000))\begin{align*} F_W(w)&=\Pr(W\le w) \\[1em] &=\frac{1}{200}\int_0^{200}\Pr\Bigl(T\le\frac{w}{p}\Bigr)\textrm{ d}p \\[1em] &=\frac{1}{200}\Biggl(\int_0^{\frac{w}{1800}}\textrm{ d}p+\int_{\frac{w}{1800}}^{200}\Pr\Bigl(T\le\frac{w}{1800\cdot p}\Bigr)\textrm{ d}p\Biggr) \\[1em] &=\frac{1}{200}\Biggl(\biggl[p\biggr]_0^{\frac{w}{1800}}+\biggl[\frac{w}{1800}\ln(p)\biggr]_{\frac{w}{1800}}^{200}\Biggr) \\[1em] &=\frac{1}{200}\Biggl(\frac{w}{1800}+\frac{w}{1800}\cdot\ln(200)-\frac{w}{1800}\ln\Bigl(\frac{w}{1800}\Bigr)\Biggr) \\[1em] &=\frac{w}{360000}\biggl(1-\log\Bigl(\frac{w}{360000}\Bigr)\biggr) \end{align*}FW​(w)​=Pr(W≤w)=2001​∫0200​Pr(T≤pw​) dp=2001​(∫01800w​​ dp+∫1800w​200​Pr(T≤1800⋅pw​) dp)=2001​([p]01800w​​+[1800w​ln(p)]1800w​200​)=2001​(1800w​+1800w​⋅ln(200)−1800w​ln(1800w​))=360000w​(1−log(360000w​))​

Now to find the median work wmw_mwm​:

0.5=FW(wm)=wm360000(1−log⁡(wm360000))0.5=F_W(w_m)=\frac{w_m}{360000}\Bigl(1-\log(\frac{w_m}{360000})\Bigr)0.5=FW​(wm​)=360000wm​​(1−log(360000wm​​))

From this, we find that wm≈67205.6w_m\approx67205.6wm​≈67205.6.

This is our work in the middle of our workout. But what about the end? Well, assuming we keep pace, it should be double this at 134411.2 J134411.2\textrm{ J}134411.2 J. Now we want to find the rank of this work:

FW(134411.2)=134411.2360000(1−log⁡(134411.2360000))≈0.7412F_W(134411.2)=\frac{134411.2}{360000}\biggl(1-\log\Bigl(\frac{134411.2}{360000}\Bigr)\biggr)\approx0.7412FW​(134411.2)=360000134411.2​(1−log(360000134411.2​))≈0.7412

So we can expect to be 74.12%74.12\%74.12% up the leaderboard (top 25.88%25.88\%25.88%).

As for the bonus question, the highest work we can expect to be at the 15-minute mark of our workout is 200 W⋅900 s=180000 J200\textrm{ W}\cdot900\textrm{ s}=180000\textrm{ J}200 W⋅900 s=180000 J. Hence, we can find its rank:

FW(180000)=180000360000(1−log⁡(180000360000))≈0.8466F_W(180000)=\frac{180000}{360000}\biggl(1-\log\Bigl(\frac{180000}{360000}\Bigr)\biggr)\approx0.8466FW​(180000)=360000180000​(1−log(360000180000​))≈0.8466

That would be about 84.66%84.66\%84.66% up the leaderboard (top 15.34%15.34\%15.34%).

Answer: 74.12% up the leaderboard (bonus: 84.66% up the leaderboard)


Extra Credit

To find our expected rank up the leaderboard given a random power and random time, we can find weighted fWf_WfW​ over the integral from p=0p=0p=0 to p=200p=200p=200 and t=0t=0t=0 to t=1800t=1800t=1800.

fW(w)=−1360000log⁡(w360000)f_W(w)=-\frac{1}{360000}\log(\frac{w}{360000})fW​(w)=−3600001​log(360000w​)

The weighted rank at each point is FW(w)F_W(w)FW​(w). So our expectation is:

∫01800∫0200fW(p⋅t)⋅FW(p⋅t) dp dt∫01800∫0200(−log⁡(p⋅t360000)360000)(p⋅t360000)(1−log⁡(p⋅t360000)) dp dt\int_0^{1800} \int_0^{200} f_W(p\cdot t)\cdot F_W(p\cdot t)\textrm{ d}p\textrm{ d}t \\ \int_0^{1800} \int_0^{200} \biggl(\frac{-\log\bigl(\frac{p\cdot t}{360000}\bigr)}{360000}\biggr)\biggl(\frac{p\cdot t}{360000}\biggr)\biggl(1-\log\Bigl(\frac{p\cdot t}{360000}\Bigr)\biggr)\textrm{ d}p\textrm{ d}t∫01800​∫0200​fW​(p⋅t)⋅FW​(p⋅t) dp dt∫01800​∫0200​(360000−log(360000p⋅t​)​)(360000p⋅t​)(1−log(360000p⋅t​)) dp dt

A gnarly-looking integral, but it resolves cleanly to 58\frac{5}{8}85​, or 62.5%62.5\%62.5% up the leaderboard.

Answer: 62.5% up the leaderboard

Back to Fiddler list
© 2024 Emily Bradon Zhang·Support Gaza Recovery