Rubbish Models

All models are rubbish....but some are slightly better than others!

Andy

3/12/20232 min read

Stochastic modelling

Stochastic modelling is often described in complicated terms or elevated to sound like it can only be used by experts with lots of computing power. However, it doesn’t need to be like this and with a little insight we can see that stochastic processes are all around us.

So…what is stochastic modelling?

Stochastic modelling starts off with a random process such as rolls of a dice or coin flips. We know that there is a 1 in 6 chance of getting a 6 on a dice or a 1 in 2 chance of getting a head on the coin flip. We can also predict the estimated number of times we get a 6 after 100 dice rolls (100*1/6 = 16.67 times) and also the likelihood of getting significantly more or less than that.

So, we have a random process, with some fairly predictable outcomes, assuming the dice and coin are fair! However, what if we introduce money into the equation? Let’s say we could get the following payout:

Our expected payout from each roll is 0 (sum the expectations). But….no individual roll will actually give us a nil payout! We always have to pay something or we get something. There is no zero payout. This is where the statistical expectation and reality don’t fit together. What if we started out with 100 and rolled the dice 100 times? We’ll assume that once you run out of money you can’t return. The expected outcome would be that we end with exactly 100. This would be the deterministic solution (100 * Expected outcome (0) = 0). But we know that is unlikely, so how do we see the range of outcomes so we can decide if we want to play or not? With stochastic modelling of course! But…instead of just rolling the dice 100 times we could ask 1,000 people to do this and report their results, but that would be expensive, time consuming and full of reporting errors (who wants to admit they are so unlucky they rolled 34 6’s and ran out of money?). So, instead we run the simulations in R – it’s cheaper, less time consuming and there will be no reporting errors (unless our code isn’t correct).

We can use stochastic modelling to also answer questions such as:

  • How many times do I run out of money if I start with 100?

  • How many times do I double my money after 100 rolls?

  • How many times do I have more than 120 after 50 rolls?

  • What is the range of outcomes for 50% of the time?

Note that all of these questions depend on the order of outcomes of each dice roll, so it’s not possible to calculate the results based on the probabilities of the dice roll.

How do we put this into R code?

Contact us

Whether you have a request, a query, or want to work with us, use the form below to get in touch with our team.