- $P[$ in $i$ for $t_1 < t < t_2]$
- $P[$ in $j$ at $t=t_2$ $\big \|$ in $i$ for $t_1 < t < t_2]$
- $P[$ in $j$ at $t=t_2$ ; in $i$ for $t_1 < t < t_2]$
- $P[$ in $j$ for $t_3 > t > t_1$ $\big\|$ in $i$ for $t_2 > t > t_2]$
- $P[$ in $j$ for $t_3 > t > t_1$ ; in $i$ for $t_2 > t > t_2]$
- $P[$ in $j$ at $t_2$ $\big\|$ in $i$ at $t_1]$
- $P[$ in $j$ at $t_2$ $\left.\right|$ in $i$ at $t_1]$
Tuesday, December 22, 2009
Different Distributions
Sunday, December 20, 2009
Gillespie Decomposition of a Markov Chain
Goal
- The probability distribution for the waiting time until the next transition.
- The probability distribution for which transition will occur when the transition takes place.
Continuous Time Markov Chain
- The system resides in a finite number of discrete states
- The system transitions from state to state in a particular way such that the probability of a transition in a small time interval $\Delta t$ is proportional to $\lambda \Delta t$ for some constant $\lambda$
- Once the system is in a given a given state it retains no memory of past states or transitions (or any other aspect of its history). In other words, it is "memoryless"
$p_{i,j} = P[\text{in state } i \text{ at } t+\Deltat ,| \text{ in state } j \text{ at } t]$
Connection to Poisson Process
$P[\text{still in } j \text{ at } t+\tau \,|\, \text{was in } j \text{ at } t] = e^{-p_{j,j}\,t}$
Math in compose mode
Environment mode:
\begin{equation}
\frac{1}{\sqrt{sigma}}
\end{equation}
Friday, December 18, 2009
Continuous Time Markov Chains 1.
Goal
Markov Chains
Memory
Discrete Time Markov Chains
Representations of Markov Chains
\begin{bmatrix} 0.1 & 0.7 & 0.2 \\ 0.8 & 0.1 $ 0.1 \\ 0.4 & 0.3 & 0.3 \\ \end{bmatrix}
Examples
Queues
One of the important practical applications of MCs is in modeling queuing systems. A classic example is machines which may break down randomly at any time, and one or more technicians who service the machines. Perhaps the servicing time also has some probability distribution. As will be discussed in another note, if the probability of a machine breaking down at any moment is fairly small, then the machine breakdowns are essentially memoryless. In this example, the "state" of the system is the list of which machines are active and which are in repair. This classic example also has numerous equivalent variants: people in line to get service at some counter, requests to an internet server, etc.Population and Counting
Another classic application is in various "counting processes". In a counting process, the various states of the system are the numbers of something, such as the number of molecules of a certain chemical in a reaction, the number of individuals in a population, etc. An important class of these is called "birth and death processes", which have application in biology including population dynamics of species and the spread of epidemics.Real and Hypothetical Networks
Google uses a Markov type model to rank pages. An world wide web user remains on a certain page for a certain amount of time before going to another. Thus, there is a probabilistic rate associated with page links. The world-wide-web is somewhere between a physical network of interconnected physical entities and a virtual network of hypothetical entities or states. The internet, which is the physical network of servers, is a physical network. Markov models can also be used to model network traffic. For instance, the path of a single packet through the internet can be a Markov chain. The packet travels to a server and remains there for a certain amount of time before being routed to another server.Climate
Markov chains are often used in modeling climate. By discretizing the values of a climate variable such as temperature or pressuer, these values can be thought of as the states of a Markov chain. Because climate has natural periodicities, one can use DTMCs for modeling successive days, for instance. Or, for events that occur intermittently, such as rain or extreme winds, one can use CTMCs.Summary and Conclusion
jsMath problems in blogger
Inline math
givesThis is an example of $\frac{1}{\sqrt{2 \pi \sigma^2}}$ inline math
This is an example of $\frac{1}{\sqrt{2 \pi \sigma^2}}$ inline math
Equation Environment
gives\begin{equation} p(x) = \frac{1}{\sqrt{2 \pi \sigma^2}} e^-x^2/{2 \sigma^2} \end{equation}
\begin{equation} p(x) = \frac{1}{\sqrt{2 \pi \sigma^2}} e^-x^2/{2 \sigma^2} \end{equation}
Shorthand Equation Environment
gives$$p(x) = \frac{1}{\sqrt{2 \pi \sigma^2}} e^-x^2/{2 \sigma^2}$$
$$p(x) = \frac{1}{\sqrt{2 \pi \sigma^2}} e^-x^2/{2 \sigma^2}$$
<myserver>/jsMath/easy/load.js
Thursday, December 17, 2009
Poisson Processes
Goal
Probability distribution, at time $t$ for $N$ events in a subsequent time interval $[t, t+\tau]$: $P[N,\tau,t]$. As we shall see, as a practical matter, we primarily focus on calculating $P[1, \tau, t]$.Assumptions
- For a small time interval $h$, as $h \to 0$, $P[1,h,t] \to \lambda h$ for all $t$ and $P[N>1,h,t] \to 0$. Therefore $P[0,h,t] \to 1 - \lambda h$.
- $P$ is independent of $t$: $P[N, \tau, t] = P[N, \tau]$ for all $t$. In other words, it is stationary.
- The probabilities of events in disjoint intervals are independent. If $t_2-t_1>\tau_1$ then, $P[N_2,\tau_2,t_2 ; N_1,\tau_1,t_1] = P[N_2,\tau_2,t_2] \cdot P[N_1,\tau_1,t_1]$ Alternatively, consider four successive time points $t_4 \geq t_3 \geq t_2 \geq t_1$. Then: $P[N_2,t_4-t_3,t_3 ; N_1,t_2-t_1,t_1] = P[N_2,t_4-t_3,t_3] \cdot P[N_1,t_2-t_1,t_1]$
- $P$ is memoryless. We might feel as though having already waited a long time for an event to occur that the next event should happen sooner. However, since $P$ is memoryless, it does not remember how long it took for the last event to occur. Note that this is not the same as being stationary.
Derivation of $P[0,\tau]$
We wamt to derive an expression for $P[N,\tau]$ using the assumed properties listed above. To do so, we start by looking at probabilities for 0 events in time intervals. As an aid in understanding, think about the following situation: you start standing at a bus stop at a certain time $t_1$. You wait until a later time $t_2$ and observe that no bus has arrived. For some reason, you stick around until an even later time $t_3$ and notice that a bus has still not arrived. This is strange, because you know that the buses arrive in a way that obeys to assumptions of the Poisson process. Mathematically, consider three successive times $t_3>t_2>t_1$, and the joint probability $P[0,t_3-t_1 ; 0, t_2 - t_1]$ By the independence of events in disjoint intervals, $P[0,t_3-t_1 ; 0, t_2 - t_1] = P[0,t_3-t_2] \cdot P[0,t_2-t_1]$Alternatively, due to the memoryless assumption, we have
$P[0,t_3-t_1 ; 0, t_2 - t_1] = P[0,t_3-t_1]$ This may seem counterintuitive, but it can be understood if we think abou the fact that we have arbitrarily divide the interval $t_3-t_1$ into two by inserting $t_2$. Doing so should not alter the probability! Therefore, we have the above expression. Combining the two above, we have $P[0,t_3-t_1] = P[0,t_3-t_2] \cdot P[0,t_2-t_1]$ This expression in hand, we now derive the analytical form for $P[0,\tau]$. To do so, we differentiate the equation by $t_2$. Along the way, we adopt some abbreviated notation that should be clear enough $0 = p_0'(t_3-t_2) \cdot p_0(t_2-t_1) + p_0'(t_3-t_2) \cdot p_0(t_2-t_1)$From this we conclude that
$\frac{1}{p_0(t_3-t_2)}\frac{dp_0(t_3-t_2)}{d(t_2)} = \frac{1}{p_0(t_2-t_1)}\frac{dp_0(t_2-t_1)}{d(t_2)}$Using a standard technique in separation of variables, we note that the two sides of the equation are respectively functions of only $p_0(t_3-t_2)$ and $p_0(t_2-t_1)$. Therefore each side is separately equal to a constant, $\lambda$. Writing $t_2-t_1$ as $\tau$,
$\frac{1}{p_0(\tau)}\frac{dp_0(\tau)}{d\tau} = \lambda$which has the unique solution
$p_0(\tau) = e^{-\lambda \tau + C}$Since $p_0(0) = 0$,
$p_0(\tau) = e^{-\lambda \tau + C}$Derivation of $P[N,\tau]$
$p_0(\tau) = e^{-\lambda \tau}$
$p_1(t_3-t_1 | \text{event at } t_2) = p_0(t_2-t_1) \cdot p_1(\delta t) \cdot p_0(t-3-t_2)$
To remove the conditioning, we integrate over $t_2$ from $0 \ldots \tau$.$p_1(t_3-t_1) = \int_0^\tau p_1(t_3-t_1 | \text{event at } t_2) dt_2$
$=\int_0^\tau e^_{-\lambda t_2} \cdot \lambda \cdot e^{-\lambda(\tau-t_2)} dt_2$
$=\lambda \cdot e^_{-\lambda \tau} \cdot \int_0^\tau dt_2$
$=\lambda \tau e^_{-\lambda \tau}$
$p_N(\tau | t_1 \ldots t_N) = p_0(t_1-t_0)\Pi_{n \in 2\ldots N} \lambda \cdot p_0(t_n-t_{n-1})$
$=\lambda^N e^{-\lambda \tau}$
$p_N(\tau) = \lambda^N e^{-\lambda \tau} int_{t_0}^{t_2}dt'_1 \int_{t_1}^{t_3}dt'_2 \cdots \int_{t_{n-1}}^{t_{n+1}}dt'_n \cdots \int_{t_{N-2}}^{\tau}dt'_{n-1}$
This integral is going to be nasty do evaluate. Therefore, we use a trick. Although I numbered the times of the events, $t_n$, consecutively, I will consider the indices to be arbitrary markers. This means that the $t_n$ can actually happen in any order. In order to keep the calculation correct, I will now also need to divide by the $N!$ different orders in which the events can happen. Now all of the $t_n$ can range from $t_0$ to $\tau$. This simplifies the integral so that we have$p_N(\tau) = \frac{1}{N!}\lambda^N e^{-\lambda \tau} \times \ldots$
$int_{t_0}^{t_2}dt'_1 \int_{t_0}^{\tau}dt'_2 \cdots \int_{t_0}^{\tau}dt'_n \cdots \int_{t_0}^{\tau}dt'_{n-1}
which evaluates to$ = \frac{1}{N!} \lambda^N \tau^N e^{-\lambda \tau} = \frac{(\lambda \tau)^N}{N!}e^{-\lambda \tau}$
Conclusion
$p_N(\tau) = frac{(\lambda \tau)^N}{N!}e^{-\lambda \tau}$
Appendix A -- quick and dirty $p_0(\tau)$
$p_0(\tau + \Delta \tau) = P[\text{no event in } \tau ; \text{ no event in } \Delta \tau]$
$p_0(\tau + \Delta \tau) = P[\text{no event in } \tau \cdot P[\text{ no event in } \Delta \tau]$
$\approx p_0(\tau) \cdot (1 - \lambda \Delta \tau)$
$p_0(\tau + \Delta \tau) - p_0(\tau) = - \lambda \Delta \tau \cdot p_0(\tau)$
$\frac{dp_0(\tau)}{d\tau} = - \lambda \cdot p_0(\tau)$
$p_0(\tau) = e^{-\lambda \tau)$
math test 2
$\sqrt(\sigma)$
\\begin{equation}
\sqrt(\sigma)
\\end{equation}
\begin{equation}
\sqrt(\sigma)
\end{equation}
Friday, November 6, 2009
mathtest
$\begin{equation}\sqrt{\sigma}\end{equation}$
\begin{equation}\sqrt{\sigma}\end{equation}