*(Sandipan Dey, **11 August 2016)*

- In this article, the Poisson-Gamma Conjugate Priors will be used to compute the Posterior Probabilities of the number of
*customer arrivals*in a retail shop every*10 minutes time window*(can be modeled by a*Poisson process*). - First, a Γ(α,β) prior is chosen with α=4,β=0.4 (consistent with our belief that the mean number of customers arrived in the store in a 10-min time window is 10, with a standard deviation of 5) to model the unknown mean customer arrival rate λ variable, so that λ∼Γ(4,0.4).
- Then a few trials of a random experiment simulating the customer arrival process are conducted to collect the data and update the prior belief about λ from the likelihood, which can be modeled as
*i.i.d. Poisson*random variables, Yi∼Pois(λ),λ∼Γ(α,β),∀i. - The posterior probability distribution is also a
*Gamma*distribution as shown in the figure below from the videos of professor Herbert Lee.

- Then the
*recursive Bayesian updates*and the*prior*and*posterior hyper-parameters*and the means are updated as and when a new datapoint is received. Also, the*frequentist’s MLE*and*95% confidence interval*are computed, along with the Bayesian*95% credible interval*. - The following animation shows the results of simulation of customer arrivals in 20 such time intervals (each of 10 mins), starting with the prior Γ(4,0.4).
- The left bottom barplot visualizes simulated # customers arrived in every 10 mins window.
- Every time a new datapoint is received (# customers arrived at the shop in the next 10 mins window), the prior belief is updated.
- The right bottom table represents the summary statistics. Prior and Posterior means respectively correspond to the previous and updated beliefs about the #customers arrived at the shop in a 10 mins time window.
- The next animation shows the same results starting with a
*vague prior*Γ(ϵ,ϵ).

Advertisements
(function(){var c=function(){var a=document.getElementById("crt-1351423392");window.Criteo?(a.parentNode.style.setProperty("display","inline-block","important"),a.style.setProperty("display","block","important"),window.Criteo.DisplayAcceptableAdIfAdblocked({zoneid:388248,containerid:"crt-1351423392",collapseContainerIfNotAdblocked:!0,callifnotadblocked:function(){a.style.setProperty("display","none","important");a.style.setProperty("visbility","hidden","important")}})):(a.style.setProperty("display","none","important"),a.style.setProperty("visibility","hidden","important"))};if(window.Criteo)c();else{if(!__ATA.criteo.script){var b=document.createElement("script");b.src="//static.criteo.net/js/ld/publishertag.js";b.onload=function(){for(var a=0;a<__ATA.criteo.cmd.length;a++){var b=__ATA.criteo.cmd[a];"function"===typeof b&&b()}};(document.head||document.getElementsByTagName("head")[0]).appendChild(b);__ATA.criteo.script=b}__ATA.criteo.cmd.push(c)}})();
(function(){var c=function(){var a=document.getElementById("crt-1636692364");window.Criteo?(a.parentNode.style.setProperty("display","inline-block","important"),a.style.setProperty("display","block","important"),window.Criteo.DisplayAcceptableAdIfAdblocked({zoneid:837497,containerid:"crt-1636692364",collapseContainerIfNotAdblocked:!0,callifnotadblocked:function(){a.style.setProperty("display","none","important");a.style.setProperty("visbility","hidden","important")}})):(a.style.setProperty("display","none","important"),a.style.setProperty("visibility","hidden","important"))};if(window.Criteo)c();else{if(!__ATA.criteo.script){var b=document.createElement("script");b.src="//static.criteo.net/js/ld/publishertag.js";b.onload=function(){for(var a=0;a<__ATA.criteo.cmd.length;a++){var b=__ATA.criteo.cmd[a];"function"===typeof b&&b()}};(document.head||document.getElementsByTagName("head")[0]).appendChild(b);__ATA.criteo.script=b}__ATA.criteo.cmd.push(c)}})();