{"id":219,"date":"2020-04-19T14:12:47","date_gmt":"2020-04-19T14:12:47","guid":{"rendered":"http:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/hamish-thorburn\/?p=219"},"modified":"2021-11-08T10:30:15","modified_gmt":"2021-11-08T10:30:15","slug":"60-second-stats-monte-carlo-simulation","status":"publish","type":"post","link":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/hamish-thorburn\/2020\/04\/19\/60-second-stats-monte-carlo-simulation\/","title":{"rendered":"60 second stats – Monte Carlo Simulation"},"content":{"rendered":"\n
So, the plan for this post was to look at a paper which details a method to make unbiased estimation from Monte Carlo Markov chains<\/a>. However, in doing that I realised that:<\/p>\n\n\n\n Therefore, I thought the best thing to do would be go back to basics, and try and give a quick explanation of Monte Carlo Estimation myself. And what better way to give a quick overview is there than another edition of 60 second stats?<\/p>\n\n\n\n So get out the stopwatch, and get ready. The 60 seconds begins…NOW!<\/p>\n\n\n\n Monte Carlo Estimation is a technique used to estimate quantities. It is based around simulating a bunch of random numbers, and then using these to make estimates.<\/p>\n\n\n\n It is named after the Monte Carlo Casino, in Monaco, which was frequented by the uncle of Stanislaw Ulam, one the methods founders. It is also a reference to the inherent randomness of the method (as all casino games are based on chance).<\/p>\n\n\n\n The overall idea is very simple. Say you have a random variable X<\/em>, and you want to estimate some value related to X<\/em> (e.g. it’s average). You can then simply simulate a large number of realisations<\/strong> (i.e. copies) of X<\/em>, and take the average of these. Then (because of the law of large numbers<\/a>) we know that the average of our copies will be a “good” estimation of X<\/em>.<\/p>\n\n\n\n What we mean by “good” is that as you take more and more realisations of X<\/em> to average, the average will get closer and closer to the true value, as shown in the gif below.<\/p>\n\n\n\n The gif clearly shows that the more copies, the closer to the true value we get.<\/p>\n\n\n\n It’s easy! All you need is:<\/p>\n\n\n\n …and that’s time! Thanks for participating in another edition of 60 second stats. If you want to know more, there are many further aspects to this, such as known results about the variance of your estimates<\/a>, or what to do if you can’t easily simulate copies of your random variable<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":" So, the plan for this post was to look at a paper which details a method to make unbiased estimation…<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[13,5],"class_list":["post-219","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-60-second-stats","tag-statistics"],"_links":{"self":[{"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/hamish-thorburn\/wp-json\/wp\/v2\/posts\/219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/hamish-thorburn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/hamish-thorburn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/hamish-thorburn\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/hamish-thorburn\/wp-json\/wp\/v2\/comments?post=219"}],"version-history":[{"count":18,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/hamish-thorburn\/wp-json\/wp\/v2\/posts\/219\/revisions"}],"predecessor-version":[{"id":290,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/hamish-thorburn\/wp-json\/wp\/v2\/posts\/219\/revisions\/290"}],"wp:attachment":[{"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/hamish-thorburn\/wp-json\/wp\/v2\/media?parent=219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/hamish-thorburn\/wp-json\/wp\/v2\/categories?post=219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/hamish-thorburn\/wp-json\/wp\/v2\/tags?post=219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}What is Monte Carlo Estimation?<\/h2>\n\n\n\n
Why is it called “Monte Carlo”?<\/h2>\n\n\n\n

Ok. So how does it work?<\/h2>\n\n\n\n
Wait, what do you mean by “good”?<\/h2>\n\n\n\n
<\/figure>\n\n\n\nAlright. So how do I do it myself?<\/h2>\n\n\n\n