Stochastic modeling is a technique of predicting outcomes that takes into account a certain degree of randomness or unpredictability. In a stochastic modeling, a small amount of randomness is added at each time step of the simulation.
It is the probabilistic counterpart to a deterministic process.
Why
The deterministic model, who studies a population of bacteria, considers continuous concentrations of molecules. However, in a single bacteria, the quantity of the different proteins is of the order of 100, and the concentrations take thus discrete values. These values depend on events (production, degradation) which are hard to predict, and must therefore be approached in terms of probability of occurence (or preopensity).
How
A stochastic model incorporates random variations to predict future conditions and to see what they might be like.
To introduce that randomness we use a new function : propensities.
As an example, to illustrate this we consider 4 possible reactions. Each reaction has a probability to happen in the next time step.
We randomly chose the next reaction regarding the propensities.
When we run the script once, we get a graph. This graph represent the rando evolution of an element. Because of this randomness, if we run the script an other time we will get a different graph. That is why to be able to interpret the results we have to run the cripts hundreds or thousands of times.
Instead of describing a process which can only evolve in one way, in a stochastic or random process there is some indeterminacy : even if the initial condition is known, there are several directions in which the process may evolve.
To model that randomness we use a Gillepsie algorithm or Stoachastic Simulation Algorithm (SSA).
Gillespie _ Stochastic Simulation Algorithm
The Gillespie algorithm generates a statistically correct trajectory of a stochastic equation.
Traditional continuous and deterministic biochemical rate equations do not accurately predict cellular reactions since they rely on bulk reactions that require the interactions of millions of molecules.
In contrast, the Gillespie algorithm allows a discrete and stochastic simulation of a system with few reactants because every molecule is explicitly simulated. When simulated, a Gillespie realization represents a random walk of the entire system.
We assert :
Each reaction Rj is characterized mathematically by two quantities :
Once we have put the theory of the stochastic approach, we can determine the algorithm.
One iteration of Gillespie algorithm
The algorithm comprises 5 steps.
You can find our script for the stochastic modeling here.