5
$\begingroup$

I have a historical dataset of about 1500 events representing structure fires in the Bay Area over the last few years. I'm building a small dashboard that displays these events by month, and would like to build in a prediction that shows the number of events expected to occur for the rest of the month for comparison's sake (does this look like a busier or slower month). The data is somewhat cyclical by season: higher in December/January and May/June, and lower in the Spring and Fall.

Naturally this seems like a Poisson process. Currently I'm doing a simple estimation by determining the average number of events in the historical data during the current month, and then multiplying it by the fraction of the month remaining (so if historical average is 30 events in December and it's the 15th, predict $30\times\frac{16}{31}$ as the number of events for the rest of the month.

This is probably good enough, but academic curiosity has taken hold and I'd like to go further. Ideally, I'd like to take in to account recent trends, so that if the recent history is noticeably busier than historically, the projection takes that into account. It seems like using Bayes' rule would be useful here, where the prior is based on the historical average, evidence is the recently observed data (say 30-60 days worth), and then solve or analyze for the more likely λ. Is this the right, or a good, way to go? If so, can you point me towards setting up the equation, or what other information do I need to figure out first?

$\endgroup$
1
$\begingroup$

Taking advantage of conjugacy with a Poisson likelihood, a Gamma prior concerning structure fires occurred in the past is recommended. The model will end up with a Gamma posterior that avoids numerical integration. For more details, I would take a look at Carlin BP, Louis TA. Bayesian Methods for Data Analysis. Third Edition. Chapman & Hall/CRC, 2009. WinBugs and R can support this kind of analysis.

$\endgroup$
1
  • $\begingroup$ For implementing this in R, Jim Albert's book "Bayesian computation with R" is also useful. $\endgroup$
    – a11msp
    May 8 '14 at 10:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.