Hello again. Welcome to our final set of lectures in the dynamical modeling class. Our last set of lectures, and we're gonna have three of these, are on approaches for mathematical models that are stochastic rather than deterministic. Deterministic models are what we've been covering so far in this class. Since this is our last set of lectures in this class, let's start by thinking about where we've been and where we're going. Overall outline of what we've covered in this course. What we've seen is that different approaches are useful for different levels of model analysis. First we started with some dynamical systems tools, things like nullclines, bifurcations. And these we found were very useful for understanding the general properties of a system. For instance, is this system going to show oscillations or is it going to show stable steady states? And the tools of dynamical systems help us to perform this type of analysis. Then we had a couple of examples, a cell cycle example and a model of an action potential that involves systems of ordinary differential equations. And these are appropriate when our variables change with respect to time, but things like concentrations were uniform. For instance, in our model of the cell cycle, we had a concentration of MPF activity, but we assumed that MPF activity was uniform throughout the cell. Then we discussed partial differential equations. These are models, for instance, of a propagating action potential that moves from location to location along the axon. And what we discussed in this section is that partial differential equations are appropriate when variables change with both location and time. Now, a term we didn't really use in these previous sections, but that's appropriate, is called deterministic. What that means, with these ordinary differential equations, or these partial differential equations, and even with these very simple models that we apply dynamical systems tools to look at, is that every time you run the equation, every time you run the system you get the same answer. That's what we mean by deterministic. What we're gonna introduce now are a set of models where this is not the case, which are called stochastic mathematical models. You don't necessarily get the same answer every time you run it. The reason you don't same answer every time you run it is with stochastic models, randomness is considered in these cases. That's what we are going to cover for these final three lectures in this class. Our outline for today. We're gonna emphasize that when we talk about stochastic, what we mean is randomness. In other words, stochasticity means random fluctuations. For instance, fluctuations and concentrations of molecules of interest. When do we need to consider stochasticity? Well, the short answer is that we need to consider stochasticity when numbers are small. Then what we want to cover today, how can we treat stochasticity? Well, the key concept here, and that's going to be the bulk of this first lecture today, is conversion of rate equations into probabilities. Rather than concentrations with respect to time. Previous lectures in this course have discussed the law of mass action, and we have used the law of mass action to derive some of the differential equations that are important in the mathematical models we've discussed. It's important to note, however, that the law of mass action is actually an approximation. What do we mean by this? Well, let's just remind ourselves what we mean with the law of mass action. If we have a reaction where A can get converted into B with a rate constant k1+, then the overall forward rate in units of concentration per time is k1+ times the concentration of A. What does this actually mean, however, in terms of the number of molecules involved? Let's assume that the concentration of A is one nanomolar, and remember by one nanomolar we mean ten to the minus ninth molar. If this reaction is occurring in a mammalian cell that has a radius of ten micrometers, then a radius of ten micrometers corresponds to a volume of about four picoliters, where a picoliter is ten to the minus twelfth liters. And we could do calculations that tells us that, what we mean in this case is somewhere in the neighborhood of 2,400 molecules. What if this reaction is not occurring in the cytoplasm, but the reaction is occurring in the nucleus of a cell? Well, the nucleus of the cell is going to be much smaller than the overall cell. So if the radius has, for the sake of argument, if the nucleus has a radius of about 5 micrometers, then the volume of that nucleus is going to be 0.8 picoliters rather than 4 picoliters like we had before. And in that case, we're talking about 300 molecules. However, what if this reaction is occurring in an even smaller volume? And an even smaller volume would be a single mitochondrion. If the single mitochondrion has a radius of one micrometer, then it has a volume of only four femtoliters, where if a picoliter is 10 to the minus 12th liters, a femtoliter is ten to the minus 15th liters. So this is a very, very small volume. In this case, our A, which is at a concentration of one nanomolar, we only have 2.4 molecules of A within our mitochondrion. And obviously that's nonsense, right? We cannot have 2.4 molecules. We only have to have either 2 molecules or 3 molecules, right? We can't have a fraction. So, computing the rate constant within a mitochondrion as k1+ times the concentration of A is somewhat nonsensical in this case. In other words, what this tells us is that the law of mass action is an approximation. When you're talking about an entire cell, or you're talking about an entire nucleus, it's probably a pretty good approximation. Because if you have on average 2400 molecules, it doesn't really matter so much whether you go up to 2410 molecules, or down to 2390 molecules. But in a mitochondrion, obviously small fluctuations can make a big difference. Whether you have 2 molecules or 3 molecules in the overall transition rate can change quite a bit depending on whether you have 2 or 3. So this is a case where maybe the law of mass action isn't going to work so well. In other words, maybe it's not going to be effective to just compute the overall forward rate like this. Maybe we need to consider the individual molecules and the individual transitions that occur, and that's what we're gonna talk about when we discuss stochastic models. What we saw on the last slide was that the law of mass action is an approximation that doesn't work that well when we only have a few molecules present. For instance, in that example we showed, our concentration of A in a mitochondrion corresponded to 2.4 molecules, which is nonsense. It either has to be 2 or 3. Then we should ask, in what other situations in biology do we encounter low copy numbers? Well, let's consider the so-called central dogma of biology. DNA gets transcribed into RNA, and then RNA gets translated into protein. How many copies of DNA do we have in a mammalian cell? Well, we either have two copies at the most, or one if only one of the copies of DNA is actively being transcribed, but at the most we have two. So in this case, the effect of low molecule numbers can obviously be important, and one of the examples we're gonna show of a stochastic model is one that simulates processes of transcription and translation. Where else in biology are low copy number important? Another example is release of calcium from intracellular stores. This is a process that's important in all kinds of different cell types in mammalian cells. This is a general schematic diagram showing calcium channels in the cellular membrane that are very close to release channels that are in the membrane of either the endoplasmic reticulum, or in muscle cells we call this the sarcoplasmic reticulum, and these release channels are generally of two different categories. Either what are called IP3 receptors or channels that are called ryanodine receptors. Now the details of this process are not important for the time being. What's important is that this schematic is actually somewhere accurate in terms of what we need or what we're talking about in terms of the number of molecules. Usually we have a handful of calcium channels in the cell membrane, somewhere in the neighborhood of 10. And then somewhere between 10 and 20 channels in the sarcoplasmic reticulum or endoplasmic reticulum membrane. And so therefore, each local release event is due to the opening of somewhere between 10 and 100 channels and these are events for which stochastic methods must be used if we want to simulate these events using mathematical models. Again, this is another example where low copy number is important and therefore stochastic methods should be used. Now if we wanna actually simulate stochastic events, what do we need to do? The key thing we need to do is we need to convert from a rate to a probability. What we're gonna do now is we're gonna go through step by step to show conceptually how we do that. Remember that a rate in a biological model expresses a number of transitions per unit time. For instance, reactions per second. We need to convert that into a probability, which is different conceptually. In a probability, we're talking about a chance that a reaction will occur in a given amount of time. Now in ordinary differential equation models, our rates are generally change in concentration per unit time. For instance, micromolars per second. Or, like we encountered with the Hodgkin-Huxley model of the action potential, sometimes it's just a change in the fraction per unit per time. So if we have a potassium channel that can either be in the closed state or the open state or in, say, the permissive state or the non-permissive state, then our rates in that case for our gating variables, m and h and n, are in the fraction per unit time that are transitioning from one state to the other. So that would be in units just of seconds to the minus 1. The question then becomes, how do we convert these rates that we are comfortable working with, that we've encountered in our other models, how do we convert these rates into probabilities? Let's go back to this very simple reaction that we encountered before, where A gets converted into B with a rate constant of k1+. The forward rate in this case, which is in units of concentration per unit time, is k1+ times a. And let's just assume for the sake of argument this is in units of micromolar per second. In order to be able to use this sort of a reaction in a stochastic model, we have to take a couple steps. Step one is to convert from concentration per unit time to number of molecules per unit time. So if we have a rate that's in molar per second, for instance, which is in moles per liter per second, we need to multiply this by the volume. And this means the volume in which the reaction is occurring. This can be the whole cellular volume or it could be the volume of smaller compartment within the cell. That's gonna be in units of liters. So liters is gonna, the numerator here is gonna cancel out with liters on the denominator. Then we'll be left with something in moles per second. In order to get this into molecules, we have to go back to something to something that we learned back in high school chemistry, Avogadro's number. Avogadro's number tells us how many molecules we have in one mole. This is 6.022 times 10 to the 23rd power. Most of you probably had that drilled into your head and remember that. So if we multiply by Avogadro's number which has units of molecules per mole, we see that moles are going to cancel out, mole in the numerator, mole in the denominator. What we're going to be left with when we do this calculation is not a reaction rate, but what we call a reaction propensity, and this is going to be in units of molecules per second. This is step one of being able to use this reaction in a stochastic model. Step two is gonna to be to convert this from molecules per unit time to a probability that an event is going to occur in a particular time interval. And we can illustrate this most clearly by considering a simple example. What if we do this calculation, we have a propensity that says we're gonna have, on average, ten transitions occurring per second? Say, for instance, going up to this one. On average 10 times per second A is going to get converted into B. If this occurs on average 10 times per second, then each transition is going to take place in roughly 100 milliseconds on average. Sometimes it'll occur more quickly than that, sometimes it'll occur more slowly than that. But on average, each transition is going to occur in 100 milliseconds because we are going to have a total of 10 of them per second. If the average transition time for each one is 100 milliseconds, then we can ask ourselves, well, in 1 millisecond, what's the probability that we're gonna get a transition? And if 1 transition is going to occur in 100 milliseconds, we divide that by 100. Then we can compute in 1 millisecond, we're going to get a probability of a transition of occurring of 0.01. In other words, we have a 1% chance in each 1 millisecond that we're gonna get a transition. So conceptually, this is actually quite straightforward. We take a rate and concentration per unit time. We convert it into molecules per second, and then we consider that, we can linearly convert this into a probability that a reaction is going to occur in a given time interval. But, conceptually, it has to be a different way of looking at reactions compared to what we had before, which were reactions rates derived from the law of mass action, which we saw previously is clearly an approximation. What we need to address next is how can we write a practical algorithm to simulate stochastic events. We just went over how we can go from a sort of normal, ordinary differential equation rate and concentration per unit time, into something that we can consider more of a probability. Now we need to say, how do we use that probability? How do we have a practical algorithm that's going to simulate these stochastic events? And next we're gonna cover a couple different algorithms that can be used for that. In summary, what we've seen in this first lecture on stochastic models is that stochastic simulations may be necessary when some molecular species are present in very low copy numbers. This can occur if you have a very, very low volume, for instance, a very small volume in which the reactions are occurring, or this can occur if you just inherently know that certain molecules are present in low numbers. For instance, DNA is a great example of that. And the conceptual key to implementing stochastic math models is to express transitions in terms of probabilities rather than in terms of rate. And what we're going to cover next is, how do we do that in practical terms?