I need some help understanding how to calculate the rate of occurrence per day or probability per day. If we know that almost 5% of the patients develop an infection in general, how can we use this information to estimate the rate of occurrence or probability per day?
Assuming I have
N number of patient per day and I want to randomly convert some of them to infected based on given probability
p. The way I am doing is that I am calling the below function per day and in this function, I am looping over all the patients and for every patient, I am doing a Bernoulli trial with the probability
p to see if patient got infected or not. I am using Python.
trial = self.get_bernoulli_trial(p) def get_bernoulli_trial(self, p): return np.random.binomial(1, p)
If trial returns 1, I make that patient infected otherwise do nothing.
So the question is, is this a right way of doing this and how to estimate
p per day for Bernoulli trial from the knowledge that 5% patients on average develop infection. If I use
p = 0.05, would that be correct?
Any help will be appreciated.