I need to combine the probability of occurrence of many thousands of events for millions of individuals (trees) in an agent-based/individual-based simulation model developed in NetLogo (agent-based simulation) and Go (to parallelize probability calculations). For those interested, the probabilities are for infection events that result from multiple other events, e.g., exposure, transmission, each with their own probabilities, for individual trees in a forested landscape.

Each individual can potentially be infected by thousands of other individuals in its surroundings. The full model includes millions of individuals, and so I am designing the model to calculate, modify, and update probabilities as quickly and efficiently as possible as conditions in the simulation change.

Based on the probability math that, if and are events that are independent and not mutually exclusive and occur with different probabilities and , with the overall probability calculated as:


In addition, each event probability is the product of two other probabilities and , where is constant across events but differs between events).

Therefore, the overall equation used in my model to calculate each individual tree's probability of infection by any other individual (i.e., combining probability of many such infection events) is as follows:



Over time in the simulation, the value of for a given individual tree will change (depending on changing state variables of the individual trees) while the values of remain constant. Therefore, as the value of changes between time steps, the value of will need to be modified to reflect this change.

However, given the amount of values involved in the calculation (thousands of calculations for each of millions of individual trees), it is not practical to store each value of for each individual (tree) once the (maybe not possible given the constraints of the software and computing resources I am using). In addition, I want to limit the amount of infomation that passes back and forth between NetLogo (which stores the states and probabilities for each individual) and Go (where probabilities are calculated but not stored) to avoid exceeding memory constraints?

Rather than recalculate the overall probability from scratch, which requires lots of time and computing resources, I want to be able to modify the overall probability for a given individual tree based on the change in the value of .


What is a generalized form for calculating the probability that at least one event occurs given N independent events with different probabilities given the criteria above?

How can I efficiently implement the modification of each individual's probability of infection without having to re-calculate from scratch?


Your Answer

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

Browse other questions tagged or ask your own question.