In my ample free time, I’ve been studying to retake the MCAT in April.  But it is quite boring, and playing video games is a lot more appealing.

Speaking of video games, last week I started to play Legend of Zelda: Spirit Tracks again.  I’ve had the game for a few years, but never finished it.  In the game you travel by train, and you can trade various treasures for new train parts.  Before I beat the final boss, I wanted to collect all the train parts for the sake of OCD completion.  But collecting the necessary treasures often entail too many hours of repetitive searching and minigames that quickly lose its novelty.

I was playing a minigame that I got so good at that I didn’t need to pay attention to it anymore, and thus had lots of brainpower I could devote to thinking about why I was doing this to myself.  Collecting treasures in a Zelda game is so tedious, but I push myself to do it.  Wouldn’t it be nice to push yourself to study even when it gets tedious?

Then I observed 2 things:
1)  There is some reward for performing repetitive, tedious things.  Treasures → train parts.
2)  Since your reward (treasures) is to an extent based on chance, it makes it a bit of a gamble, which is known to be addictive.

So I came up with a reward system to provide incentives for studying.

If I achieve my daily goal of studying, I will pay myself my own money to spend on buying music (yes I know it’s my own money, but my non-rational side won’t care), based on the formula p = rand[0,2].

And at any time I can take the money I’ve collected and gamble it according to g(p,y) = \mu p^{\mu y+1}, where y=rand[0,1], and \mu is the gamble constant (I set it to 0.45).

In English, it means I earn anywhere from 0 to 2 dollars (each amount is equally likely to occur).  and g(p,y) means my gamble payoff varies depending on what y comes out as, which depends on chance.

I busted out my probabilities notes from college, and I did some math to figure out how this would work out.  To spare those who don’t share my excitement for math, I put the math as an appendix to this post.

In summary, the math shows that on a given day, I can expect to earn $1.  And if I choose to gamble my money p, I can expect to earn \frac{p^{1.45}-p}{ln{p}}, which approximately equals p at $24.  So if I’m smart, I need to gamble when I have saved up at least $24.

***

I had way too much fun coming up with this model, solving it mathematically, and writing a program in Python to generate the payoffs (click here to download my .py file).  In fact, this was so much fun that I spent like 3.5 hrs doing this instead of studying for the MCAT… oh the irony of life.

And of course, on the first day of achieving my study goals, my program “randomly” decides to reward me with $0.00.

Simeon Koh

 

***

< Mathematical Analysis of Simeon’s Study Incentive for Cool People Who Like Math>

If p~Unif[0,1] (p is uniformly distributed from 0 to 1), then density f(p) is 1 from 0≤p≤2 and 0 everywhere else.

So the expected (i.e. average) value for p is
E[p] =\int_{-\infty}^{\infty}p*f(p) \, dp
=\int_{0}^{2}p*1 \, dp
=\frac{1}{2}p^2 \bigg|_{0}^{2}
=\frac{1}{2}(4)-0
=1.

Similarly, since the density f(y) = 1 from 0≤y≤1 and 0 everywhere else, the expected value for g is
E_{g}[p] =\int_{-\infty}^{\infty}g(y)*f(y) \, dy
=\int_{0}^{1}\mu p^{\mu y+1} \, dy
=\int_{u=1}^{u=\mu+1} p^{u} \, du, \text{if } u=\mu y+1 \text{ and } du=\mu \, dy
=\frac{p^u}{\ln{p}} \bigg|_{1}^{\mu+1}
=\frac{p^{\mu+1}-p}{\ln{p}}.

 

 

Advertisements