Posts

Showing posts from October, 2022

Death process

Image
  Defining the death process Consider a population where individuals only die, and nobody is born. We now study the death process under the following assumptions. The probability that each individual dies in a short period of time \(\delta t\) is \(\mu\delta t + o(\delta t)\) where \(\mu > 0\) is the  death rate . For a population of \(n\) individuals, the probability of each death is \(n\mu\delta t + o(\delta t)\). We assume that the probability of multiple deaths in \(\delta t\) is negligible.  Thus, the population size \(N(t)\) is a random variable that only decreases. Let \[p_n(t) = \Pr(N(t) = n),\] the probability that the population size is \(n\) at time \(t\). Suppose the initial population size is \(N(0) = n_0\), and hence the initial condition is given as \[p_{n}(t) = \delta_{n,n_0}. \tag{Eq:Init}\] A sample path of a death process is shown below: Differential-difference equations Now, let's find the differential-difference equations for the death process. First, suppos

Birth process

Image
  Defining the birth process  Consider a colony of bacteria that never dies. We study the following process known as  the birth process , also known as  the Yule process . The colony starts with \(n_0\) cells at time \(t = 0\). Assume that the probability that any individual cell divides in the time interval \((t, t + \delta t)\) is proportional to \(\delta t\) for small \(\delta t\). Further assume that each cell division is independent of others. Let \(\lambda\) be the  birth rate.  The probability of a cell division for a population of \(n\) cells during \(\delta t\) is \(\lambda n \delta t\). We assume that the probability that two or more births take place in the time interval \(\delta t\) is \(o(\delta t)\). That is, it can be ignored. Consequently, the probability that no cell divides during \(\delta t\) is \(1 - \lambda n \delta t - o(\delta t)\). Note that this process is an example of the Markov chain with states \({n_0}, {n_0 + 1}, {n_0 + 2}, \cdots\) where each integer \(n\

Change of variables in multiple integrals

Image
Sometimes, we need to integrate a function on a bounded closed region other than a rectangle or a region sandwiched by two curves. Even when the bounded closed region is simple, it may still be difficult to integrate a function on it. We may calculate the integral in such cases by changing the integration variables. Consider two \(\mathbb{R}^2\) planes, the \((u,v)\) plane and \((x,y)\) plane. Suppose we have a map \(\Phi\) \[\Phi(u,v) = (x(u,v), y(u,v))\] defined on a neighbor of the bounded closed region \(E\) in the \((u,v)\) plane. Suppose \(\Phi\) maps \(E\) to the bounded closed region \(D\) in the \((x,y)\) plane (Figure 1): \[\Phi(E) = D.\] Figure 1. Change of variables by the mapping \(\Phi(u,v) = (x(u,v), y(u,v))\). We further assume the following: \(\Phi(u,v)\) is injective. The functions \(x(u,v)\) and \(y(u,v)\) are of class \(C^1\), and at an arbitrary point \((u_0,v_0)\in E\), we have \[\frac{\partial x}{\partial u}(u_0,v_0)\frac{\partial y}{\partial v}(u_0,v_0)-\frac{\

Multivariate normal distribution is normalized (of course): A proof

Image
Let \(\mathbf{X} = (X_1, X_2, \cdots, X_n)^\top\) be a vector of random variables. We say it follows the multivariate normal (Gaussian) distribution if its density is given by \[f(\mathbf{x}) = \frac{1}{\sqrt{(2\pi)^n|\Sigma|}}\exp\left(-\frac{1}{2}(\mathbf{x} - \boldsymbol{\mu})^\top\Sigma^{-1}(\mathbf{x} - \boldsymbol{\mu})\right)\tag{Eq:density}\] where \(\boldsymbol{\mu} = (\mu_1, \mu_2, \cdots, \mu_n)^\top \in \mathbb{R}^n\) is a vector, \(\Sigma\) is a symmetric   positive definite \(n\times n\) matrix, and \(\Sigma^{-1}\) and \(|\Sigma|\) are the inverse and determinant of \(\Sigma\), respectively. It turns out that \(\boldsymbol{\mu}\) and \(\Sigma\) are the mean vector and covariance matrix of \(\mathbf{X}\), respectively. But we will not prove that here. In this post, we will show this density (Eq:density) is normalized (of course). That is, we prove that \[\int_{\mathbb{R}^n}f(\mathbf{x})d\mathbf{x} = 1.\] We assume that you already know how to prove the univariate normal

Iterated integral on a bounded closed set

Image
We saw the method of iterative integral for a rectangular region. We now extend the method to the case of non-rectangular regions. See also : Iterated integral on a rectangular region Consider two continuous functions \(y = \varphi(x)\) and  \(y = \psi(x)\) on \([a,b]\) such that \(\psi(x) < \varphi(x)\) for all \(x \in [a,b]\). We can define the following region \(D\) in \(\mathbb{R}^2\) sandwiched by these functions: \[D = \{ (x,y) \mid a \leq x \leq b, \psi(x) \leq y \leq \varphi(x)\}.\tag{Eq:Dsand}\] Clearly, \(D\) is a closed Jordan region . Let \(f(x,y)\) be a continuous function on \(D\). Then, \(f(x,y)\) is integrable on \(D\). We can calculate the integral of \(f(x,y)\) on \(D\) by the method of iterated integral. See also : Multiple integral on a bounded closed set  for the explanation of closed Jordan regions. First, fix an \(x \in [a,b]\), and define the univariate function \(F_1(x)\) by  \[F_1(x) = \int_{\psi(x)}^{\varphi(x)}f(x,y)dy.\tag{Eq:F1}\] Lemma  The function \(

Any covariance matrix is positive semi-definite: A proof

Let \(\mathbf{X} = (X_1, X_2, \cdots, X_n)^\top \in \mathbb{R}^n\) be a vector of random variables. The covariance matrix \(\Sigma\) of \(\mathbf{X}\) is a square (\(n\times n\)) matrix whose elements are covariances between the components of \(\mathbf{X}\). That is, \[\Sigma_{ij} = \mathrm{Cov}(X_i,X_j)\] where \(\mathrm{Cov}(X_i,X_j)\) is the covariance between \(X_i\) and \(X_j\) , \(i,j = 1, 2, \cdots, n\):  \[\mathrm{Cov}(X_i, X_j) = \mathbb{E}[(X_i - \mathbb{E}[X_i])(X_j - \mathbb{E}[X_j])].\] Here, \(\mathbb{E}[\cdot]\) indicates the expectation value of a random variable . Any covariance matrix has the following properties: Symmetric. That is, \[\Sigma = \Sigma^\top.\] Positive semi-definite. That is,\[\forall \mathbf{v} \in \mathbb{R}^n, \mathbf{v}^\top\Sigma\mathbf{v} \geq 0.\] See also : Positive definite matrix (Wolfram MathWorld) The symmetry is obvious from the definition of the covariance matrix.  Now, let us prove that the covariance matrix is positive semi-definite.

Iterated integral on a rectangular region

Image
Defining the multiple integral is one thing; calculating it is another. The iterated integral is a technique to calculate a multiple integral. Simply put, an iterated integral is a technique where we apply one-variable integration iteratively, thereby reducing a multiple integral to one-variable integrals. Here, we consider an iterated integral over a rectangular region. Let \(f(x,y)\) be a continuous function on the rectangular region \(D=[a,b]\times[c, d]\). Fix an arbitrary \(x_0 \in [a,b]\). Then, \(f(x_0,y)\) can be regarded as a univariate function of \(y\). \(f(x_0,y)\) is continuous on \([c, d]\) so it is integrable. The integral \[\int_c^df(x_0,y)dy\] contains \(x_0\) as a parameter. Replacing \(x_0\) with \(x\), let us define the function \(F_1(x)\) of \(x\) on \([a,b]\) by \[F_1(x) =   \int_c^df(x, y)dy.\] We have the following lemma: Lemma The function \(F_1(x)\) defined above is continuous on \([a,b]\). Proof . The proof will be given in another post when we prove a more

Multiple integral on a bounded closed set

Image
In a previous post, we defined the multiple integral on a (closed) rectangular region and saw that continuous functions were integrable on such regions.  But more functions are integrable. Some functions are not necessarily defined on a rectangular region. Yet other functions may not be continuous everywhere. To describe a wider class of integrable functions, we define the notion of the "null" sets. Null sets Definition (Null set) The subset \(A\) of \(\mathbb{R}^2\) is said to be a  null set  if the following condition is satisfied: For all \(\varepsilon > 0\), there exist a finite number of open rectangular regions  \[L_i = (a_i, b_i)\times (c_i, d_i) ~(a_i < b_i, c_i < d_i, i = 1, 2, \cdots, r)\]  such that  \[A \subset \bigcup_{i=1}^{r}L_i\]  and  \[\sum_{i=1}^{r}(b_i - a_i)(d_i - c_i) < \varepsilon.\] This means that if a set is a null set if it can be "covered" by a finite number of open rectangular regions, and the total area of these rectangular

Some test problems

Image
Here are some problems to test your basic knowledge and understanding. Problem 1 The absolute value \(|x|\) of a real number \(x\) is defined as \[|x| = \left\{ \begin{array}{cc} x & \text{if $x \geq 0$},\\ -x & \text{if $x < 0$}. \end{array}\right.\] Prove the following. For any \(x \in \mathbb{R}\), \(-|x| \leq x \leq |x|\). Let \(a > 0\). For any \(x\in\mathbb{R}\), if \(-a \leq x \leq a\), then \(|x| \leq a.\)  [5 marks each; 10 marks in total] Problem 2 Let \(\mathbf{a} = (2,3)\), \(\mathbf{b} = (1, 5)\), and \(\mathbf{r} = (x,y)\) be position vectors. The equation \[\mathbf{r} = s\mathbf{a} + (1 - s)\mathbf{b}\] with \(0 \leq s \leq 1\) defines the line segment between \(\mathbf{a}\) and \(\mathbf{b}\).  Draw the line segment defined above in the \(x\)-\(y\) plane. Find the closest point on this line segment from the origin \(\mathbf{o} = (0,0)\).  [5 marks each; 10 marks in total] Problem 3 Compute the matrix determinant \[\begin{vma

Multiple integral on a rectangular region

Image
We extend the notion of integral to multivariate functions. For a bivariate function \(f(x,y)\) on a closed region \(D\), its double integral \[\iint_Df(x,y)dxdy\] is defined similarly to what we did for univariate functions, using the Riemann sums . In this and the following posts, we mainly deal with integrating bivariate (two-variable) functions (i.e., double integral). Roughly speaking, a double integral corresponds to the volume of a solid between a region on the \(x\)-\(y\) plane and a two-variable function \(z = f(x,y)\) in \(\mathbb{R}^3\). Riemann sums The integral of multivariate functions can be defined in much the same manner as univariate functions. In the case of univariate functions, we first considered integrals on a closed interval. In the case of bivariate functions, we first consider integrals on a bounded closed region, but the region can be of any shape. We start with a rectangular region. Let \(f(x,y)\) be a bounded function on the rectangular region \(D = [a,b]\t

Examples are not proofs.

Image
Consider the following problem. For any \(x \in \mathbb{R}\), prove that \[-|x| \leq x \leq |x|.\] In case you forgot, the absolute value of a real number \(x\) is defined as follows: \[|x| = \left\{\begin{array}{cc}x & \text{if $x\geq 0$},\\-x & \text{if $x < 0$}.\end{array}\right.\] A notable property of the absolute value is that it is always non-negative (positive or zero). Proof (wrong!): Let \(x = 3\). Then \(|x| = 3\). Thus, we have  \[-3 \leq 3 \leq 3.\]  So the proposition is true. Let \(x = -3\). Then \(|x| = |-3| = 3\). Thus, we have \[-3 \leq -3 \leq 3.\] So the proposition is also true. In either case, the proposition is true. Proved! ■ What is exactly wrong with this "proof"? It is that it only proves the cases when \(x = 3\) or \(x = -3\). But we need to prove that for any real number \(x\), and there are infinitely many (in fact, uncountably many) real numbers! What about \(x = 2.3\), or \(x = \pi^{-\sqrt{2}}\), or ...? Unless we prove the proposit

Differentiation of more general maps \(\mathbb{R}^n \to \mathbb{R}^m\)

Image
 We now consider the differentiation of more general maps \(\mathbb{R}^n \to \mathbb{R}^m\). We can import many results from the case of bivariate functions, \(\mathbb{R}^2 \to \mathbb{R}\). Multivariate functions \(\mathbb{R}^n \to \mathbb{R}\) First, we consider the general multivariate function \(y = f(x): \mathbb{R}^n \to \mathbb{R}\) where \(x = (x_1, x_2, \cdots, x_n) \in\mathbb{R}^n\). Definition (Total differentiability) Let \(U\) be an open region in \(\mathbb{R}^n\). For the function \(f(x)\) on \(U\) and \(a = (a_1, a_2, \cdots, a_n)\in U\), \(f(x)\) is said to be (totally) differentiable at \(a\) if there exist constants \(m_1, m_2, \cdots, m_n\) such that \[f(x) = f(a) + m_1(x_1 - a_1) + m_2(x_2 - a_2) +\cdots + m_n(x_n - a_n) + o(\|x-a\|)\] as \(x \to a\). \(f(x)\) is said to be totally differentiable on \(U\) if \(f(x)\) is totally differentiable at all points in \(U\). When \(n = 2\), this definition matches the definition of total differentiability of two-variable fu