Poisson process with different rates

306 Views Asked by At

I want to simulate the heart attacks happening in a year, and after research, I figured it can be generated using the Poisson process, where the time difference between two heart attacks is exponentially distributed, with the assumption that it is only related to the time of the day rather than months or day of the week.

The problem is that heart attacks (according to my data) happen more often in the afternoon. My question is how to do the Poisson process with a different rate for each time segment? I am not a mathematician and unfamiliar with many terms or (the right way), therefore I thought of doing Poisson for each hour and append them in the final code, or is there a formula or method for my problem?