{"id":606,"date":"2018-11-08T08:37:03","date_gmt":"2018-11-08T07:37:03","guid":{"rendered":"http:\/\/35.180.88.53\/?p=606"},"modified":"2018-11-08T08:40:12","modified_gmt":"2018-11-08T07:40:12","slug":"poisson-distribution-in-day-to-day-life-wily-27","status":"publish","type":"post","link":"https:\/\/www.sergilehkyi.com\/uk\/2018\/11\/poisson-distribution-in-day-to-day-life-wily-27\/","title":{"rendered":"Poisson distribution in day-to-day life &#8211; WILY #27"},"content":{"rendered":"\n<p>I really\nlove statistics. It doesn&#8217;t lie, it shows you the real picture, it removes\nbiases\u2026 when applied properly. So I&#8217;m deepening my knowledge in statistics and\ntoday I would like to share with you recent discoveries I&#8217;ve made.<\/p>\n\n\n\n<p>A lot of\nprocesses can be modeled using mathematical and statistical methods and by\nmodeling we can find very interesting insights. Also we can calculate the\nprobability of occurrence of certain event. <\/p>\n\n\n\n<p>In\nstatistics and probability theory there is a term &#8211; Poisson distribution, it is\na discrete probability distribution that expresses the probability of a given\nnumber of events occurring in a fixed interval of time or space if these events\noccur with a known constant rate and independently of the time since the last\nevent. <\/p>\n\n\n\n<p>Yes, I understand, those words above are little bit complicated, so I&#8217;ll show an example.For instance, an individual keeping track of the amount of mail they receive each day may notice that they receive an average number of 4 letters per day. If receiving any particular piece of mail does not affect the arrival times of future pieces of mail, i.e., if pieces of mail from a wide range of sources arrive independently of one another, then a reasonable assumption is that the number of pieces of mail received in a day obeys a Poisson distribution. Other examples that may follow a Poisson include the number of phone calls received by a call center per hour and the number of decay events per second from a radioactive source, goals scored during World Cup, the number of meteorites greater than 1 meter diameter that strike Earth in a year, the number of patients arriving in an emergency room between 10 and 11 pm and so on (Wikipedia).<\/p>\n\n\n\n<p>There are few rules to check before assuming the Poisson distribution an appropriate model, but I won&#8217;t go into detail here, you can read it all in <a href=\"https:\/\/en.wikipedia.org\/wiki\/Poisson_distribution\">Wiki<\/a>. Instead, I will show you how to calculate the probability of some event based on Poisson distribution.<\/p>\n\n\n\n<p>Let&#8217;s assume we have the following information &#8211; average amount of goals scored in one game in La Liga is near 3. We can create a model using Poisson distribution and calculate the probability of 9 or more goals in one La Liga game. The code below will perform all the calculations:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import numpy as np<br><br>s = np.random.poisson(3, 1000000)<br>n = np.sum(s &gt;= 9)<br>p = n \/ 1000000<br><br>print(p*100)<\/pre>\n\n\n\n<p>Result:\n0.3832. Less than 0.4% chance that in one game teams will score 9 or more\ngoals. Quite cool, isn&#8217;t it?<\/p>\n\n\n\n<p>That&#8217;s it\nfor today, hopefully you enjoyed learning about Poisson distribution and how we\ncan use it as much as I did. Tomorrow will prepare something new about\ndistributions and probabilities. (Currently doing courses about statistical\nthinking and I really enjoy it).<\/p>\n\n\n\n<p>Have a\nnice day and smile more, because:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u201cAll the statistics in the world can&#8217;t measure the warmth of a smile.\u201d&nbsp;<\/p><cite><br>\u2015&nbsp;<strong>Chris Hart<\/strong><\/cite><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>I really love statistics. It doesn&#8217;t lie, it shows you the real picture, it removes biases\u2026 when applied properly. So&hellip;<\/p>\n","protected":false},"author":1,"featured_media":607,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"translation":{"provider":"WPGlobus","version":"3.0.0","language":"uk","enabled_languages":["gb","es","uk"],"languages":{"gb":{"title":true,"content":true,"excerpt":false},"es":{"title":false,"content":false,"excerpt":false},"uk":{"title":false,"content":false,"excerpt":false}}},"_links":{"self":[{"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/posts\/606"}],"collection":[{"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/comments?post=606"}],"version-history":[{"count":3,"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/posts\/606\/revisions"}],"predecessor-version":[{"id":610,"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/posts\/606\/revisions\/610"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/media\/607"}],"wp:attachment":[{"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/media?parent=606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/categories?post=606"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/tags?post=606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}