chapter int64 1 14 | question_number stringlengths 3 5 | difficulty stringclasses 3
values | question_text stringlengths 64 8.24k | answer stringlengths 56 16.5k | answer_length int64 14 16.6k |
|---|---|---|---|---|---|
1 | 1.1 | easy | Consider the sum-of-squares error function given by $E(\mathbf{w}) = \frac{1}{2} \sum_{n=1}^{N} \{y(x_n, \mathbf{w}) - t_n\}^2$ in which the function $y(x, \mathbf{w})$ is given by the polynomial $y(x, \mathbf{w}) = w_0 + w_1 x + w_2 x^2 + \ldots + w_M x^M = \sum_{j=0}^{M} w_j x^j$. Show that the coefficients $\math... | We let the derivative of *error function E* with respect to vector $\mathbf{w}$ equals to $\mathbf{0}$ , (i.e. $\frac{\partial E}{\partial \mathbf{w}} = 0$ ), and this will be the solution of $\mathbf{w} = \{w_i\}$ which minimizes *error function E*. To solve this problem, we will calculate the derivative of E wi... | 1,240 |
1 | 1.10 | easy | Suppose that the two variables x and z are statistically independent. Show that the mean and variance of their sum satisfies
$$\mathbb{E}[x+z] = \mathbb{E}[x] + \mathbb{E}[z] \tag{1.128}$$
$$var[x+z] = var[x] + var[z]. \tag{1.129}$$ | We will solve this problem based on the definition of expectation, variation
and independence.
$$\mathbb{E}[x+z] = \int \int (x+z)p(x,z)dxdz$$
$$= \int \int (x+z)p(x)p(z)dxdz$$
$$= \int \int xp(x)p(z)dxdz + \int \int zp(x)p(z)dxdz$$
$$= \int (\int p(z)dz)xp(x)dx + \int (\int p(x)dx)zp(z)dz$$
$$= \int xp(x)dx + \i... | 2,015 |
1 | 1.12 | medium | Using the results $\mathbb{E}[x] = \int_{-\infty}^{\infty} \mathcal{N}(x|\mu, \sigma^2) x \, \mathrm{d}x = \mu.$ and $\mathbb{E}[x^2] = \int_{-\infty}^{\infty} \mathcal{N}\left(x|\mu, \sigma^2\right) x^2 \, \mathrm{d}x = \mu^2 + \sigma^2.$, show that
$$\mathbb{E}[x_n x_m] = \mu^2 + I_{nm} \sigma^2 \tag{1.130}$$
where... | It is quite straightforward for $\mathbb{E}[\mu_{ML}]$ , with the prior knowledge that $x_n$ is i.i.d. and it also obeys Gaussian distribution $\mathcal{N}(\mu, \sigma^2)$ .
$$\mathbb{E}[\mu_{ML}] = \mathbb{E}[\frac{1}{N}\sum_{n=1}^N x_n] = \frac{1}{N}\mathbb{E}[\sum_{n=1}^N x_n] = \mathbb{E}[x_n] = \mu$$
For $\... | 1,585 |
1 | 1.13 | easy | Suppose that the variance of a Gaussian is estimated using the result $\sigma_{\rm ML}^2 = \frac{1}{N} \sum_{n=1}^{N} (x_n - \mu_{\rm ML})^2$ but with the maximum likelihood estimate $\mu_{\rm ML}$ replaced with the true value $\mu$ of the mean. Show that this estimator has the property that its expectation is give... | This problem can be solved in the same method used in Prob.1.12:
$$\begin{split} \mathbb{E}[\sigma_{ML}^2] &= \mathbb{E}[\frac{1}{N} \sum_{n=1}^{N} (x_n - \mu)^2] \quad \text{(Because here we use } \mu \text{ to replace } \mu_{ML}) \\ &= \frac{1}{N} \mathbb{E}[\sum_{n=1}^{N} (x_n - \mu)^2] \\ &= \frac{1}{N} \mathbb{E}... | 1,234 |
1 | 1.14 | medium | Show that an arbitrary square matrix with elements $w_{ij}$ can be written in the form $w_{ij} = w_{ij}^{\rm S} + w_{ij}^{\rm A}$ where $w_{ij}^{\rm S}$ and $w_{ij}^{\rm A}$ are symmetric and anti-symmetric matrices, respectively, satisfying $w_{ij}^{\rm S} = w_{ji}^{\rm S}$ and $w_{ij}^{\rm A} = -w_{ji}^{\r... | This problem is quite similar to the fact that any function f(x) can be written into the sum of an odd function and an even function. If we let:
$$w_{ij}^S = \frac{w_{ij} + w_{ji}}{2}$$
and $w_{ij}^A = \frac{w_{ij} - w_{ji}}{2}$
It is obvious that they satisfy the constraints described in the problem, which are:
... | 1,868 |
1 | 1.15 | hard | $ In this exercise and the next, we explore how the number of independent parameters in a polynomial grows with the order M of the polynomial and with the dimensionality D of the input space. We start by writing down the $M^{\rm th}$ order term for a polynomial in D dimensions in the form
$$\sum_{i_1=1}^{D} \sum_... | This problem is a more general form of Prob.1.14, so the method can also be used here: we will find a way to use $w_{i_1i_2...i_M}$ to represent $\widetilde{w}_{i_1i_2...i_M}$ .
We begin by introducing a mapping function:
$$F(x_{i1}x_{i2}...x_{iM}) = x_{j1}x_{j2}...,x_{jM}$$
$$s.t. \bigcup_{k=1}^{M} x_{ik} = \big... | 5,028 |
1 | 1.16 | hard | $ In Exercise 1.15, we proved the result $n(D,M) = \sum_{i=1}^{D} n(i, M-1).$ for the number of independent parameters in the $M^{\rm th}$ order term of a D-dimensional polynomial. We now find an expression for the total number N(D,M) of independent parameters in all of the terms up to and including the M6th order.... | This problem can be solved in the same way as the one in Prob.1.15. Firstly, we should write the expression consisted of all the independent terms up to Mth order corresponding to N(D,M). By adding a summation regarding to M on the left side of $\sum_{i_1=1}^{D} \sum_{i_2=1}^{i_1} \cdots \sum_{i_M=1}^{i_{M-1}} \widetil... | 3,596 |
1 | 1.17 | medium | $ The gamma function is defined by
$$\Gamma(x) \equiv \int_0^\infty u^{x-1} e^{-u} \, \mathrm{d}u. \tag{1.141}$$
Using integration by parts, prove the relation $\Gamma(x+1) = x\Gamma(x)$ . Show also that $\Gamma(1) = 1$ and hence that $\Gamma(x+1) = x!$ when x is an integer. | $$\Gamma(x+1) = \int_0^{+\infty} u^x e^{-u} du$$
$$= \int_0^{+\infty} -u^x de^{-u}$$
$$= -u^x e^{-u} \Big|_0^{+\infty} - \int_0^{+\infty} e^{-u} d(-u^x)$$
$$= -u^x e^{-u} \Big|_0^{+\infty} + x \int_0^{+\infty} e^{-u} u^{x-1} du$$
$$= -u^x e^{-u} \Big|_0^{+\infty} + x \Gamma(x)$$
Where we have taken advantage of *I... | 887 |
1 | 1.18 | medium | We can use the result $I = (2\pi\sigma^2)^{1/2}.$ to derive an expression for the surface area $S_D$ , and the volume $V_D$ , of a sphere of unit radius in D dimensions. To do this, consider the following result, which is obtained by transforming from Cartesian to polar coordinates
$$\prod_{i=1}^{D} \int_{-\infty}^{... | Based on $I = \int_{-\infty}^{\infty} \exp\left(-\frac{1}{2\sigma^2}x^2\right) dx$ and $I = (2\pi\sigma^2)^{1/2}.$ and by substituting x to $\sqrt{2}\sigma y$ , it is quite obvious to obtain :
$$\int_{-\infty}^{+\infty} e^{-x_i^2} dx_i = \sqrt{\pi}$$
Therefore, the left side of $= \mathbb{E}_{\mathbf{x}, \mathbf{y}}... | 1,933 |
1 | 1.19 | medium | Consider a sphere of radius a in D-dimensions together with the concentric hypercube of side 2a, so that the sphere touches the hypercube at the centres of each of its sides. By using the results of Exercise 1.18, show that the ratio of the volume of the sphere to the volume of the cube is given by
$$\frac{\text{volum... | We have already given a hint in the solution of Prob.1.18, and here we will make it more clearly: the volume of a sphere with radius r is $V_D \cdot r^D$ . This is quite similar with the conclusion we obtained in Prob.1.18 about the surface area except that it is proportion to Dth power of its radius, i.e. $r^D$ not... | 1,143 |
1 | 1.2 | easy | Write down the set of coupled linear equations, analogous to (1.122), satisfied by the coefficients $w_i$ which minimize the regularized sum-of-squares error function given by $\widetilde{E}(\mathbf{w}) = \frac{1}{2} \sum_{n=1}^{N} \{y(x_n, \mathbf{w}) - t_n\}^2 + \frac{\lambda}{2} ||\mathbf{w}||^2$. | This problem is similar to Prob.1.1, and the only difference is the last term on the right side of $\widetilde{E}(\mathbf{w}) = \frac{1}{2} \sum_{n=1}^{N} \{y(x_n, \mathbf{w}) - t_n\}^2 + \frac{\lambda}{2} ||\mathbf{w}||^2$, the penalty term. So we will do the same thing as in Prob.1.1:
$$\frac{\partial E}{\partial w_... | 715 |
1 | 1.20 | medium | In this exercise, we explore the behaviour of the Gaussian distribution in high-dimensional spaces. Consider a Gaussian distribution in D dimensions given by
$$p(\mathbf{x}) = \frac{1}{(2\pi\sigma^2)^{D/2}} \exp\left(-\frac{\|\mathbf{x}\|^2}{2\sigma^2}\right).$$
$p(\mathbf{x}) = \frac{1}{(2\pi\sigma^2)^{D/2}} \exp\le... | The density of probability in a thin shell with radius r and thickness $\epsilon$ can be viewed as a constant. And considering that a sphere in dimension D with radius r has surface area $S_D r^{D-1}$ , which has already been proved in Prob 1.19.
$$\int_{shell} p(\mathbf{x}) d\mathbf{x} = p(\mathbf{x}) \int_{shell}... | 2,757 |
1 | 1.21 | medium | $ Consider two nonnegative numbers a and b, and show that, if $a \leq b$ , then $a \leq (ab)^{1/2}$ . Use this result to show that, if the decision regions of a two-class classification problem are chosen to minimize the probability of misclassification, this probability will satisfy
$$p(\text{mistake}) \leqslant \... | The first question is rather simple:
$$(ab)^{\frac{1}{2}} - a = a^{\frac{1}{2}}(b^{\frac{1}{2}} - a^{\frac{1}{2}}) \ge 0$$
Where we have taken advantage of $b \ge a \ge 0$ . And based on (1.78):
$$\begin{split} p(\text{mistake}) &= p(\mathbf{x} \in R_1, C_2) + p(\mathbf{x} \in R_2, C_1) \\ &= \int_{R_1} p(\mathbf{x... | 2,027 |
1 | 1.23 | easy | Derive the criterion for minimizing the expected loss when there is a general loss matrix and general prior probabilities for the classes. | $$\mathbb{E}[L] = \sum_{k} \sum_{j} \int_{R_{j}} L_{kj} p(\mathbf{x}, C_{k}) d\mathbf{x} = \sum_{k} \sum_{j} \int_{R_{j}} L_{kj} p(C_{k}) p(\mathbf{x} | C_{k}) d\mathbf{x}$$
If we denote a new loss matrix by $L_{jk}^{} = L_{jk}p(C_k)$ , we can obtain a new equation :
$\mathbb{E}[L] = \sum_{k} \sum_{i} \int_{R_{i}} ... | 374 |
1 | 1.24 | medium | - 1.24 (\*\*) Consider a classification problem in which the loss incurred when an input vector from class $C_k$ is classified as belonging to class $C_j$ is given by the loss matrix $L_{kj}$ , and for which the loss incurred in selecting the reject option is $\lambda$ . Find the decision criterion that will giv... | This description of the problem is a little confusing, and what it really mean is that $\lambda$ is the parameter governing the loss, just like $\theta$ governing the posterior probability $p(C_k|\mathbf{x})$ when we introduce the reject option. Therefore the reject option can be written in a new way when we view... | 1,313 |
1 | 1.25 | easy | Consider the generalization of the squared loss function $\mathbb{E}[L] = \iint \{y(\mathbf{x}) - t\}^2 p(\mathbf{x}, t) \, d\mathbf{x} \, dt.$ for a single target variable t to the case of multiple target variables described by the vector t given by
$$\mathbb{E}[L(\mathbf{t}, \mathbf{y}(\mathbf{x}))] = \iint \|\mathb... | We can prove this informally by dealing with one dimension once a time just as the same process in $\mathbb{E}[L] = \iint \{y(\mathbf{x}) - t\}^2 p(\mathbf{x}, t) \, d\mathbf{x} \, dt.$ - $y(\mathbf{x}) = \frac{\int tp(\mathbf{x}, t) dt}{p(\mathbf{x})} = \int tp(t|\mathbf{x}) dt = \mathbb{E}_t[t|\mathbf{x}]$ until all ... | 1,173 |
1 | 1.26 | easy | - 1.26 (\*) By expansion of the square in $\mathbb{E}[L(\mathbf{t}, \mathbf{y}(\mathbf{x}))] = \iint \|\mathbf{y}(\mathbf{x}) - \mathbf{t}\|^2 p(\mathbf{x}, \mathbf{t}) \, d\mathbf{x} \, d\mathbf{t}.$, derive a result analogous to $\mathbb{E}[L] = \int \{y(\mathbf{x}) - \mathbb{E}[t|\mathbf{x}]\}^2 p(\mathbf{x}) d\math... | The process is identical as the deduction we conduct for $\mathbb{E}[L] = \int \{y(\mathbf{x}) - \mathbb{E}[t|\mathbf{x}]\}^2 p(\mathbf{x}) d\mathbf{x} + \int \{\mathbb{E}[t|\mathbf{x}] - t\}^2 p(\mathbf{x}) d\mathbf{x}.$. We will not repeat here. And what we should emphasize is that $\mathbb{E}[\mathbf{t}|\mathbf{x}]... | 3,743 |
1 | 1.27 | medium | Consider the expected loss for regression problems under the $L_q$ loss function given by $\mathbb{E}[L_q] = \iint |y(\mathbf{x}) - t|^q p(\mathbf{x}, t) \, d\mathbf{x} \, dt$. Write down the condition that $y(\mathbf{x})$ must satisfy in order to minimize $\mathbb{E}[L_q]$ . Show that, for q=1, this solution repr... | Since we can choose $y(\mathbf{x})$ independently for each value of $\mathbf{x}$ , the minimum of the expected $L_q$ loss can be found by minimizing the integrand given by
$$\int |y(\mathbf{x}) - t|^q p(t|\mathbf{x}) \, \mathrm{d}t \tag{42}$$
for each value of $\mathbf{x}$ . Setting the derivative of (42) with ... | 1,871 |
1 | 1.28 | easy | In Section 1.6, we introduced the idea of entropy h(x) as the information gained on observing the value of a random variable x having distribution p(x). We saw that, for independent variables x and y for which p(x,y) = p(x)p(y), the entropy functions are additive, so that h(x,y) = h(x) + h(y). In this exercise, we deri... | Basically this problem is focused on the definition of *Information Content*, i.e.h(x). We will rewrite the problem more precisely. In *Information Theory*, $h(\cdot)$ is also called *Information Content* and denoted as $I(\cdot)$ . Here we will still use $h(\cdot)$ for consistency. The whole problem is about the ... | 3,235 |
1 | 1.29 | easy | Consider an M-state discrete random variable x, and use Jensen's inequality in the form $f\left(\sum_{i=1}^{M} \lambda_i x_i\right) \leqslant \sum_{i=1}^{M} \lambda_i f(x_i)$ to show that the entropy of its distribution p(x) satisfies $H[x] \leq \ln M$ . | This problem is a little bit tricky. The entropy for a M-state discrete random variable x can be written as :
$$H[x] = -\sum_{i}^{M} \lambda_{i} ln(\lambda_{i})$$
Where $\lambda_i$ is the probability that x choose state i. Here we choose a concave function $f(\cdot) = ln(\cdot)$ , we rewrite *Jensen's inequality*,... | 560 |
1 | 1.3 | medium | Suppose that we have three coloured boxes r (red), b (blue), and g (green). Box r contains 3 apples, 4 oranges, and 3 limes, box b contains 1 apple, 1 orange, and 0 limes, and box g contains 3 apples, 3 oranges, and 4 limes. If a box is chosen at random with probabilities p(r) = 0.2, p(b) = 0.2, p(g) = 0.6, and a piece... | This problem can be solved by *Bayes' theorem*. The probability of selecting an apple P(a):
$$P(a) = P(a|r)P(r) + P(a|b)P(b) + P(a|g)P(g) = \frac{3}{10} \times 0.2 + \frac{1}{2} \times 0.2 + \frac{3}{10} \times 0.6 = 0.34$$
Based on *Bayes' theorem*, the probability of an selected orange coming from the green box P(g... | 667 |
1 | 1.30 | medium | Evaluate the Kullback-Leibler divergence $= -\int p(\mathbf{x}) \ln \left\{\frac{q(\mathbf{x})}{p(\mathbf{x})}\right\} d\mathbf{x}.$ between two Gaussians $p(x) = \mathcal{N}(x|\mu, \sigma^2)$ and $q(x) = \mathcal{N}(x|m, s^2)$ .
**Table 1.3** The joint distribution p(x, y) for two binary variables x and y used in ... | Based on definition:
$$ln\{\frac{p(x)}{q(x)}\} = ln(\frac{s}{\sigma}) - \left[\frac{1}{2\sigma^2}(x-\mu)^2 - \frac{1}{2s^2}(x-m)^2\right]$$
$$= ln(\frac{s}{\sigma}) - \left[\left(\frac{1}{2\sigma^2} - \frac{1}{2s^2}\right)x^2 - \left(\frac{\mu}{\sigma^2} - \frac{m}{s^2}\right)x + \left(\frac{\mu^2}{2\sigma^2} - \frac{... | 2,057 |
1 | 1.31 | medium | $ Consider two variables x and y having joint distribution p(x, y). Show that the differential entropy of this pair of variables satisfies
$$H[\mathbf{x}, \mathbf{y}] \leqslant H[\mathbf{x}] + H[\mathbf{y}] \tag{1.152}$$
with equality if, and only if, x and y are statistically independent. | We evaluate $H[\mathbf{x}] + H[\mathbf{y}] - H[\mathbf{x}, \mathbf{y}]$ by definition. Firstly, let's calculate $H[\mathbf{x}, \mathbf{v}]$ :
$$H[\mathbf{x}, \mathbf{y}] = -\int \int p(\mathbf{x}, \mathbf{y}) lnp(\mathbf{x}, \mathbf{y}) d\mathbf{x} d\mathbf{y}$$
$$= -\int \int p(\mathbf{x}, \mathbf{y}) lnp(\mathbf... | 2,566 |
1 | 1.32 | easy | Consider a vector x of continuous variables with distribution p(x) and corresponding entropy H[x]. Suppose that we make a nonsingular linear transformation of x to obtain a new variable y = Ax. Show that the corresponding entropy is given by $H[y] = H[x] + \ln |A|$ where |A| denotes the determinant of A. | It is straightforward based on definition and note that if we want to change variable in integral, we have to introduce a redundant term called *Jacobian Determinant*.
$$H[\mathbf{y}] = -\int p(\mathbf{y}) ln p(\mathbf{y}) d\mathbf{y}$$
$$= -\int \frac{p(\mathbf{x})}{|\mathbf{A}|} ln \frac{p(\mathbf{x})}{|\mathbf{A}|... | 912 |
1 | 1.33 | medium | Suppose that the conditional entropy H[y|x] between two discrete random variables x and y is zero. Show that, for all values of x such that p(x) > 0, the variable y must be a function of x, in other words for each x there is only one value of y such that $p(y|x) \neq 0$ . | Based on the definition of *Entropy*, we write:
$$H[y|x] = -\sum_{x_i} \sum_{y_j} p(x_i, y_j) ln p(y_j|x_i)$$
Considering the property of *probability*, we can obtain that $0 \le p(y_j|x_i) \le 1$ , $0 \le p(x_i, y_j) \le 1$ . Therefore, we can see that $-p(x_i, y_j) \ln p(y_j|x_i) \ge 0$ when $0 < p(y_j|x_i) \l... | 1,638 |
1 | 1.34 | medium | $ Use the calculus of variations to show that the stationary point of the functional $p(x) = \exp\left\{-1 + \lambda_1 + \lambda_2 x + \lambda_3 (x - \mu)^2\right\}.$ is given by $p(x) = \exp\left\{-1 + \lambda_1 + \lambda_2 x + \lambda_3 (x - \mu)^2\right\}.$. Then use the constraints $\int_{-\infty}^{\infty} p(x) \... | This problem is complicated. We will explain it in detail. According to Appenddix D, we can obtain the relation, i.e. (D.3):
$$F[y(x) + \epsilon \eta(x)] = F[y(x)] + \int \frac{\partial F}{\partial y} \epsilon \eta(x) dx \qquad (**)$$
Where y(x) can be viewed as an operator that for any input x it will give an output... | 10,306 |
1 | 1.35 | easy | Use the results $\int_{-\infty}^{\infty} x p(x) \, \mathrm{d}x = \mu$ and $\int_{-\infty}^{\infty} (x - \mu)^2 p(x) \, \mathrm{d}x = \sigma^2.$ to show that the entropy of the univariate Gaussian $p(x) = \frac{1}{(2\pi\sigma^2)^{1/2}} \exp\left\{-\frac{(x-\mu)^2}{2\sigma^2}\right\}$ is given by $H[x] = \frac{1}{2} \lef... | If $p(x) = \mathcal{N}(\mu, \sigma^2)$ , we write its entropy:
$$\begin{split} H[x] &= -\int p(x) ln p(x) dx \\ &= -\int p(x) ln \{ \frac{1}{2\pi\sigma^2} \} dx - \int p(x) \{ -\frac{(x-\mu)^2}{2\sigma^2} \} dx \\ &= -ln \{ \frac{1}{2\pi\sigma^2} \} + \frac{\sigma^2}{2\sigma^2} \\ &= \frac{1}{2} \{ 1 + ln(2\pi\sigma^... | 492 |
1 | 1.36 | easy | A strictly convex function is defined as one for which every chord lies above the function. Show that this is equivalent to the condition that the second derivative of the function be positive. | Here we should make it clear that if the second derivative is strictly positive, the function must be strictly convex. However, the converse may not be true. For example $f(x) = x^4$ , $g(x) = x^2$ , $x \in \mathcal{R}$ are both strictly convex by definition, but their second derivatives at x = 0 are both indeed 0 ... | 1,946 |
1 | 1.37 | easy | Using the definition $H[\mathbf{y}|\mathbf{x}] = -\iint p(\mathbf{y}, \mathbf{x}) \ln p(\mathbf{y}|\mathbf{x}) \, d\mathbf{y} \, d\mathbf{x}$ together with the product rule of probability, prove the result $H[\mathbf{x}, \mathbf{y}] = H[\mathbf{y}|\mathbf{x}] + H[\mathbf{x}]$. | We evaluate $H[\mathbf{x}] + H[\mathbf{y}] - H[\mathbf{x}, \mathbf{y}]$ by definition. Firstly, let's calculate $H[\mathbf{x}, \mathbf{v}]$ :
$$H[\mathbf{x}, \mathbf{y}] = -\int \int p(\mathbf{x}, \mathbf{y}) lnp(\mathbf{x}, \mathbf{y}) d\mathbf{x} d\mathbf{y}$$
$$= -\int \int p(\mathbf{x}, \mathbf{y}) lnp(\mathbf... | 14 |
1 | 1.38 | medium | $ Using proof by induction, show that the inequality $f(\lambda a + (1 - \lambda)b) \leqslant \lambda f(a) + (1 - \lambda)f(b).$ for convex functions implies the result $f\left(\sum_{i=1}^{M} \lambda_i x_i\right) \leqslant \sum_{i=1}^{M} \lambda_i f(x_i)$. | When M = 2, $f\left(\sum_{i=1}^{M} \lambda_i x_i\right) \leqslant \sum_{i=1}^{M} \lambda_i f(x_i)$ will reduce to $f(\lambda a + (1 - \lambda)b) \leqslant \lambda f(a) + (1 - \lambda)f(b).$. We suppose $f\left(\sum_{i=1}^{M} \lambda_i x_i\right) \leqslant \sum_{i=1}^{M} \lambda_i f(x_i)$ holds for M, we will prove that... | 963 |
1 | 1.39 | hard | $ Consider two binary variables x and y having the joint distribution given in Table 1.3.
Evaluate the following quantities
(a) H[x]
(c) H[y|x] (e) H[x,y] (d) H[x|y] (f) I[x,y].
**(b)** H[y]
Draw a diagram to show the relationship between these various quantities.
### 66 1. INTRODUCTION | It is quite straightforward based on definition.
$$H[x] = -\sum_{i} p(x_{i}) ln p(x_{i}) = -\frac{2}{3} ln \frac{2}{3} - \frac{1}{3} ln \frac{1}{3} = 0.6365$$
$$H[y] = -\sum_{i} p(y_{i}) ln p(y_{i}) = -\frac{2}{3} ln \frac{2}{3} - \frac{1}{3} ln \frac{1}{3} = 0.6365$$
$$H[x, y] = -\sum_{i,j} p(x_{i}, y_{j}) ln p(x_{... | 1,100 |
1 | 1.4 | medium | Consider a probability density $p_x(x)$ defined over a continuous variable x, and suppose that we make a nonlinear change of variable using x = g(y), so that the density transforms according to $= p_{x}(g(y)) |g'(y)|.$. By differentiating $= p_{x}(g(y)) |g'(y)|.$, show that the location $\widehat{y}$ of the maximum... | This problem needs knowledge about *calculus*, especially about *Chain rule*. We calculate the derivative of $P_y(y)$ with respect to y, according to (1.27):
$$\frac{dp_{y}(y)}{dy} = \frac{d(p_{x}(g(y))|g'(y)|)}{dy} = \frac{dp_{x}(g(y))}{dy}|g'(y)| + p_{x}(g(y))\frac{d|g'(y)|}{dy} \qquad (*)$$
The first term in the... | 1,288 |
1 | 1.40 | easy | By applying Jensen's inequality $f\left(\sum_{i=1}^{M} \lambda_i x_i\right) \leqslant \sum_{i=1}^{M} \lambda_i f(x_i)$ with $f(x) = \ln x$ , show that the arithmetic mean of a set of real numbers is never less than their geometrical mean. | f(x) = lnx is actually a strict concave function, therefore we take advantage of *Jensen's Inequality* to obtain:
$$f(\sum_{i=1}^{M} \lambda_m x_m) \ge \sum_{i=1}^{M} \lambda_m f(x_m)$$
We let $\lambda_m = \frac{1}{M}, m = 1, 2, ..., M$ . Hence we will obtain:
$$ln(\frac{x_1 + x_2 + \dots + x_m}{M}) \ge \frac{1}{M}... | 543 |
1 | 1.41 | easy | Using the sum and product rules of probability, show that the mutual information $I(\mathbf{x}, \mathbf{y})$ satisfies the relation $I[\mathbf{x}, \mathbf{y}] = H[\mathbf{x}] - H[\mathbf{x}|\mathbf{y}] = H[\mathbf{y}] - H[\mathbf{y}|\mathbf{x}].$. | Based on definition of $I[\mathbf{x}, \mathbf{y}]$ , i.e.(1.120), we obtain:
$$I[\mathbf{x}, \mathbf{y}] = -\int \int p(\mathbf{x}, \mathbf{y}) ln \frac{p(\mathbf{x})p(\mathbf{y})}{p(\mathbf{x}, \mathbf{y})} d\mathbf{x} d\mathbf{y}$$
$$= -\int \int p(\mathbf{x}, \mathbf{y}) ln \frac{p(\mathbf{x})}{p(\mathbf{x}|\math... | 1,171 |
1 | 1.5 | easy | Using the definition $var[f] = \mathbb{E}\left[ \left( f(x) - \mathbb{E}[f(x)] \right)^2 \right]$ show that var[f(x)] satisfies $var[f] = \mathbb{E}[f(x)^2] - \mathbb{E}[f(x)]^2.$. | This problem takes advantage of the property of expectation:
$$\begin{aligned} var[f] &= & \mathbb{E}[(f(x) - \mathbb{E}[f(x)])^2] \\ &= & \mathbb{E}[f(x)^2 - 2f(x)\mathbb{E}[f(x)] + \mathbb{E}[f(x)]^2] \\ &= & \mathbb{E}[f(x)^2] - 2\mathbb{E}[f(x)]^2 + \mathbb{E}[f(x)]^2 \\ => & var[f] &= & \mathbb{E}[f(x)^2] - \math... | 349 |
1 | 1.6 | easy | Show that if two variables x and y are independent, then their covariance is zero. | Based on (1.41), we only need to prove when x and y is independent, $\mathbb{E}_{x,y}[xy] = \mathbb{E}[x]\mathbb{E}[y]$ . Because x and y is independent, we have :
$$p(x, y) = p_x(x) p_y(y)$$
Therefore:
$$\iint xyp(x,y)dxdy = \iint xyp_x(x)p_y(y)dxdy$$
$$= (\int xp_x(x)dx)(\int yp_y(y)dy)$$
$$=> \mathbb{E}_{x,y}[... | 354 |
1 | 1.7 | medium | In this exercise, we prove the normalization condition $\int_{-\infty}^{\infty} \mathcal{N}\left(x|\mu,\sigma^2\right) \, \mathrm{d}x = 1.$ for the univariate Gaussian. To do this consider, the integral
$$I = \int_{-\infty}^{\infty} \exp\left(-\frac{1}{2\sigma^2}x^2\right) dx \tag{1.124}$$
which we can evaluate by fi... | We need Integration by substitution.
$$\begin{split} I^2 &= \int_{-\infty}^{+\infty} \int_{-\infty}^{+\infty} exp(-\frac{1}{2\sigma^2}x^2 - \frac{1}{2\sigma^2}y^2) dx dy \\ &= \int_{0}^{2\pi} \int_{0}^{+\infty} exp(-\frac{1}{2\sigma^2}r^2) r dr d\theta \end{split}$$
Here we utilize:
$$x = r\cos\theta$$
, $y = r\sin... | 1,228 |
1 | 1.8 | medium | By using a change of variables, verify that the univariate Gaussian distribution given by $\mathcal{N}(x|\mu,\sigma^2) = \frac{1}{(2\pi\sigma^2)^{1/2}} \exp\left\{-\frac{1}{2\sigma^2}(x-\mu)^2\right\}$ satisfies $\mathbb{E}[x] = \int_{-\infty}^{\infty} \mathcal{N}(x|\mu, \sigma^2) x \, \mathrm{d}x = \mu.$. Next, by dif... | The first question will need the result of Prob.1.7:
$$\begin{split} \int_{-\infty}^{+\infty} \mathcal{N}(x|\mu,\sigma^2) x \, dx &= \int_{-\infty}^{+\infty} \frac{1}{\sqrt{2\pi\sigma^2}} exp\{-\frac{1}{2\sigma^2} (x-\mu)^2\} x \, dx \\ &= \int_{-\infty}^{+\infty} \frac{1}{\sqrt{2\pi\sigma^2}} exp\{-\frac{1}{2\sigma^2... | 1,622 |
1 | 1.9 | easy | Show that the mode (i.e. the maximum) of the Gaussian distribution $\mathcal{N}(x|\mu,\sigma^2) = \frac{1}{(2\pi\sigma^2)^{1/2}} \exp\left\{-\frac{1}{2\sigma^2}(x-\mu)^2\right\}$ is given by $\mu$ . Similarly, show that the mode of the multivariate Gaussian $\mathcal{N}(\mathbf{x}|\boldsymbol{\mu}, \boldsymbol{\Sigma}... | Here we only focus on $\mathcal{N}(\mathbf{x}|\boldsymbol{\mu}, \boldsymbol{\Sigma}) = \frac{1}{(2\pi)^{D/2}} \frac{1}{|\boldsymbol{\Sigma}|^{1/2}} \exp\left\{-\frac{1}{2} (\mathbf{x} - \boldsymbol{\mu})^{\mathrm{T}} \boldsymbol{\Sigma}^{-1} (\mathbf{x} - \boldsymbol{\mu})\right\}$, because $\mathcal{N}(\mathbf{x}|\bol... | 2,113 |
2 | 2.1 | easy | Verify that the Bernoulli distribution $(x|\mu) = \mu^x (1-\mu)^{1-x}$ satisfies the following properties
$$\sum_{x=0}^{1} p(x|\mu) = 1 (2.257)$$
$$\mathbb{E}[x] = \mu \tag{2.258}$$
$$var[x] = \mu(1-\mu).$$
$var[x] = \mu(1-\mu).$
Show that the entropy $\mathrm{H}[x]$ of a Bernoulli distributed random binary vari... | Based on definition, we can obtain:
$$\sum_{x_i=0,1} p(x_i) = \mu + (1-\mu) = 1$$
$$\mathbb{E}[x] = \sum_{x_i=0,1} x_i \, p(x_i) = 0 \cdot (1-\mu) + 1 \cdot \mu = \mu$$
$$var[x] = \sum_{x_i=0,1} (x_i - \mathbb{E}[x])^2 p(x_i)$$
$$= (0 - \mu)^2 (1 - \mu) + (1 - \mu)^2 \cdot \mu$$
$$= \mu(1 - \mu)$$
$$H[x] = -\sum_{x... | 384 |
2 | 2.10 | medium | Using the property $\Gamma(x+1) = x\Gamma(x)$ of the gamma function, derive the following results for the mean, variance, and covariance of the Dirichlet distribution given by $Dir(\boldsymbol{\mu}|\boldsymbol{\alpha}) = \frac{\Gamma(\alpha_0)}{\Gamma(\alpha_1)\cdots\Gamma(\alpha_K)} \prod_{k=1}^K \mu_k^{\alpha_k - 1... | Based on definition of *Expectation* and $Dir(\boldsymbol{\mu}|\boldsymbol{\alpha}) = \frac{\Gamma(\alpha_0)}{\Gamma(\alpha_1)\cdots\Gamma(\alpha_K)} \prod_{k=1}^K \mu_k^{\alpha_k - 1}$, we can write:
$$\begin{split} \mathbb{E}[\mu_j] &= \int \mu_j Dir(\pmb{\mu}|\pmb{\alpha}) d\pmb{\mu} \\ &= \int \mu_j \frac{\Gamma(\... | 3,094 |
2 | 2.11 | easy | By expressing the expectation of $\ln \mu_j$ under the Dirichlet distribution $Dir(\boldsymbol{\mu}|\boldsymbol{\alpha}) = \frac{\Gamma(\alpha_0)}{\Gamma(\alpha_1)\cdots\Gamma(\alpha_K)} \prod_{k=1}^K \mu_k^{\alpha_k - 1}$ as a derivative with respect to $\alpha_j$ , show that
$$\mathbb{E}[\ln \mu_j] = \psi(\alpha_... | Based on definition of *Expectation* and $Dir(\boldsymbol{\mu}|\boldsymbol{\alpha}) = \frac{\Gamma(\alpha_0)}{\Gamma(\alpha_1)\cdots\Gamma(\alpha_K)} \prod_{k=1}^K \mu_k^{\alpha_k - 1}$, we first denote:
$$\frac{\Gamma(\alpha_0)}{\Gamma(\alpha_1)\Gamma(\alpha_2)...\Gamma(\alpha_K)} = K(\pmb{\alpha})$$
Then we can wri... | 2,606 |
2 | 2.12 | easy | The uniform distribution for a continuous variable x is defined by
$$U(x|a,b) = \frac{1}{b-a}, \qquad a \leqslant x \leqslant b.$$
$U(x|a,b) = \frac{1}{b-a}, \qquad a \leqslant x \leqslant b.$
Verify that this distribution is normalized, and find expressions for its mean and variance. | Since we have:
$$\int_{a}^{b} \frac{1}{b-a} dx = 1$$
It is straightforward that it is normalized. Then we calculate its mean:
$$\mathbb{E}[x] = \int_{a}^{b} x \frac{1}{b-a} dx = \frac{x^{2}}{2(b-a)} \Big|_{a}^{b} = \frac{a+b}{2}$$
Then we calculate its variance.
$$var[x] = \mathbb{E}[x^2] - \mathbb{E}[x]^2 = \int_... | 466 |
2 | 2.13 | medium | Evaluate the Kullback-Leibler divergence $= -\int p(\mathbf{x}) \ln \left\{\frac{q(\mathbf{x})}{p(\mathbf{x})}\right\} d\mathbf{x}.$ between two Gaussians $p(\mathbf{x}) = \mathcal{N}(\mathbf{x}|\boldsymbol{\mu}, \boldsymbol{\Sigma})$ and $q(\mathbf{x}) = \mathcal{N}(\mathbf{x}|\mathbf{m}, \mathbf{L})$ . | Let's begin by calculating $\ln \frac{p(x)}{q(x)}$ :
$$ln(\frac{p(\mathbf{x})}{g(\mathbf{x})}) = \frac{1}{2}ln(\frac{|\mathbf{L}|}{|\mathbf{\Sigma}|}) + \frac{1}{2}(\mathbf{x} - \mathbf{m})^T \mathbf{L}^{-1}(\mathbf{x} - \mathbf{m}) - \frac{1}{2}(\mathbf{x} - \boldsymbol{\mu})^T \mathbf{\Sigma}^{-1}(\mathbf{x} - \bol... | 1,987 |
2 | 2.14 | medium | This exercise demonstrates that the multivariate distribution with maximum entropy, for a given covariance, is a Gaussian. The entropy of a distribution $p(\mathbf{x})$ is given by
$$H[\mathbf{x}] = -\int p(\mathbf{x}) \ln p(\mathbf{x}) \, d\mathbf{x}. \tag{2.279}$$
We wish to maximize H[x] over all distributions p... | The hint given in the problem is straightforward, however it is a little bit difficult to calculate, and here we will use a more simple method to solve this problem, taking advantage of the property of Kullback— $Leibler\ Distance$ . Let g(x) be a Gaussian PDF with mean $\mu$ and variance $\Sigma$ , and f(x) an arbi... | 2,251 |
2 | 2.15 | medium | Show that the entropy of the multivariate Gaussian $\mathcal{N}(\mathbf{x}|\boldsymbol{\mu}, \boldsymbol{\Sigma})$ is given by
$$H[\mathbf{x}] = \frac{1}{2} \ln |\mathbf{\Sigma}| + \frac{D}{2} (1 + \ln(2\pi))$$
$H[\mathbf{x}] = \frac{1}{2} \ln |\mathbf{\Sigma}| + \frac{D}{2} (1 + \ln(2\pi))$
where D is the dimensi... | We have already used the result of this problem to solve Prob.2.14, and now we will prove it. Suppose $x \sim p(x) = \mathcal{N}(\mu|\Sigma)$ :
$$H[\mathbf{x}] = -\int p(\mathbf{x})lnp(\mathbf{x})d\mathbf{x}$$
$$= -\int p(\mathbf{x})ln \left\{ \frac{1}{(2\pi)^{D/2}} \frac{1}{|\mathbf{\Sigma}|^{1/2}} exp \left[ -\fra... | 1,646 |
2 | 2.16 | hard | $ **** Consider two random variables $x_1$ and $x_2$ having Gaussian distributions with means $\mu_1, \mu_2$ and precisions $\tau_1, \tau_2$ respectively. Derive an expression for the differential entropy of the variable $x = x_1 + x_2$ . To do this, first find the distribution of x by using the relation
$$... | Let us consider a more general conclusion about the *Probability Density Function* (PDF) of the summation of two independent random variables. We denote two random variables X and Y. Their summation Z = X + Y, is still a random variable. We also denote $f(\cdot)$ as PDF, and $F(\cdot)$ as *Cumulative Distribution F... | 3,009 |
2 | 2.17 | easy | Consider the multivariate Gaussian distribution given by $\mathcal{N}(\mathbf{x}|\boldsymbol{\mu}, \boldsymbol{\Sigma}) = \frac{1}{(2\pi)^{D/2}} \frac{1}{|\boldsymbol{\Sigma}|^{1/2}} \exp\left\{-\frac{1}{2} (\mathbf{x} - \boldsymbol{\mu})^{\mathrm{T}} \boldsymbol{\Sigma}^{-1} (\mathbf{x} - \boldsymbol{\mu})\right\}$. B... | This is an extension of Prob.1.14. The same procedure can be used here. We suppose an arbitrary precision matrix $\Lambda$ can be written as $\Lambda^S + \Lambda^A$ , where they satisfy:
$$\Lambda^S_{ij} = \frac{\Lambda_{ij} + \Lambda_{ji}}{2} \quad , \quad \Lambda^A_{ij} = \frac{\Lambda_{ij} - \Lambda_{ji}}{2}$$
... | 1,017 |
2 | 2.18 | hard | $ Consider a real, symmetric matrix $\Sigma$ whose eigenvalue equation is given by $\mathbf{\Sigma}\mathbf{u}_i = \lambda_i \mathbf{u}_i$. By taking the complex conjugate of this equation and subtracting the original equation, and then forming the inner product with eigenvector $\mathbf{u}_i$ , show that the eigen... | We will just follow the hint given in the problem. Firstly, we take complex conjugate on both sides of (2.45):
$$\overline{\Sigma u_i} = \overline{\lambda_i u_i} = \sum \overline{\lambda_i} \overline{u_i}$$
Where we have taken advantage of the fact that $\Sigma$ is a real matrix, i.e., $\overline{\Sigma} = \Sigma$... | 2,072 |
2 | 2.19 | medium | Show that a real, symmetric matrix $\Sigma$ having the eigenvector equation $\mathbf{\Sigma}\mathbf{u}_i = \lambda_i \mathbf{u}_i$ can be expressed as an expansion in the eigenvectors, with coefficients given by the eigenvalues, of the form $\Sigma = \sum_{i=1}^{D} \lambda_i \mathbf{u}_i \mathbf{u}_i^{\mathrm{T}}$. S... | For every $N \times N$ real symmetric matrix, the eigenvalues are real and the eigenvectors can be chosen such that they are orthogonal to each other. Thus a real symmetric matrix $\Sigma$ can be decomposed as $\Sigma = U \Lambda U^T$ , where U is an orthogonal matrix, and $\Lambda$ is a diagonal matrix whose en... | 828 |
2 | 2.2 | medium | $ The form of the Bernoulli distribution given by $(x|\mu) = \mu^x (1-\mu)^{1-x}$ is not symmetric between the two values of x. In some situations, it will be more convenient to use an equivalent formulation for which $x \in \{-1, 1\}$ , in which case the distribution can be written
$$p(x|\mu) = \left(\frac{1-\mu}{2... | The proof in Prob.2.1. can also be used here.
$$\sum_{x_i = -1, 1} p(x_i) = \frac{1 - \mu}{2} + \frac{1 + \mu}{2} = 1$$
$$\mathbb{E}[x] = \sum_{x_i = -1, 1} x_i \cdot p(x_i) = -1 \cdot \frac{1 - \mu}{2} + 1 \cdot \frac{1 + \mu}{2} = \mu$$
$$\operatorname{var}[x] = \sum_{x_i = -1, 1} (x_i - \mathbb{E}[x])^2 \cdot p(x... | 577 |
2 | 2.20 | medium | A positive definite matrix $\Sigma$ can be defined as one for which the quadratic form
$$\mathbf{a}^{\mathrm{T}}\mathbf{\Sigma}\mathbf{a}\tag{2.285}$$
is positive for any real value of the vector $\mathbf{a}$ . Show that a necessary and sufficient condition for $\Sigma$ to be positive definite is that all of the... | Since $u_1, u_2, ..., u_D$ can constitute a basis for $\mathbb{R}^D$ , we can make projection for a:
$$\boldsymbol{a} = a_1 \boldsymbol{u_1} + a_2 \boldsymbol{u_2} + \dots + a_D \boldsymbol{u_D}$$
We substitute the expression above into $\boldsymbol{a}^T \boldsymbol{\Sigma} \boldsymbol{a}$ , taking advantage of t... | 1,668 |
2 | 2.21 | easy | Show that a real, symmetric matrix of size $D \times D$ has D(D+1)/2 independent parameters. | It is straightforward. For a symmetric matrix $\Lambda$ of size $D \times D$ , when the lower triangular part is decided, the whole matrix will be decided due to
symmetry. Hence the number of independent parameters is D + (D-1) + ... + 1, which equals to D(D+1)/2. | 268 |
2 | 2.22 | easy | Show that the inverse of a symmetric matrix is itself symmetric. | Suppose A is a symmetric matrix, and we need to prove that $A^{-1}$ is also symmetric, i.e., $A^{-1} = (A^{-1})^T$ . Since identity matrix I is also symmetric, we have:
$$AA^{-1} = (AA^{-1})^T$$
And since $AB^T = B^TA^T$ holds for arbitrary matrix A and B, we will obtain:
$$\boldsymbol{A}\boldsymbol{A}^{-1} = (... | 941 |
2 | 2.23 | medium | By diagonalizing the coordinate system using the eigenvector expansion $\mathbf{\Sigma}\mathbf{u}_i = \lambda_i \mathbf{u}_i$, show that the volume contained within the hyperellipsoid corresponding to a constant
Mahalanobis distance $\Delta$ is given by
$$V_D |\mathbf{\Sigma}|^{1/2} \Delta^D \tag{2.286}$$
where $... | Let's reformulate the problem. What the problem wants us to prove is that if $(\mathbf{x} - \boldsymbol{\mu})^T \mathbf{\Sigma}^{-1} (\mathbf{x} - \boldsymbol{\mu}) = r^2$ , where $r^2$ is a constant, we will have the volume of the hyperellipsoid decided by the equation above will equal to $V_D |\mathbf{\Sigma}|^{1... | 1,555 |
2 | 2.24 | medium | $ Prove the identity $\begin{pmatrix} \mathbf{A} & \mathbf{B} \\ \mathbf{C} & \mathbf{D} \end{pmatrix}^{-1} = \begin{pmatrix} \mathbf{M} & -\mathbf{M}\mathbf{B}\mathbf{D}^{-1} \\ -\mathbf{D}^{-1}\mathbf{C}\mathbf{M} & \mathbf{D}^{-1} + \mathbf{D}^{-1}\mathbf{C}\mathbf{M}\mathbf{B}\mathbf{D}^{-1} \end{pmatrix}$ by mul... | We just following the hint, and firstly let's calculate:
$$\left[\begin{array}{cc} A & B \\ C & D \end{array}\right] \times \left[\begin{array}{cc} M & -MBD^{-1} \\ -D^{-1}CM & D^{-1} + D^{-1}CMBD^{-1} \end{array}\right]$$
The result can also be partitioned into four blocks. The block located at left top equals to :
... | 1,473 |
2 | 2.25 | medium | In Sections 2.3.1 and 2.3.2, we considered the conditional and marginal distributions for a multivariate Gaussian. More generally, we can consider a partitioning of the components of $\mathbf{x}$ into three groups $\mathbf{x}_a$ , $\mathbf{x}_b$ , and $\mathbf{x}_c$ , with a corresponding partitioning of the mean ... | We will take advantage of the result of (2.94)-(2.98). Let's first begin by grouping $x_a$ and $x_b$ together, and then we rewrite what has been given as:
$$m{x} = \left( egin{array}{c} m{x}_{a,b} \\ m{x}_c \end{array}
ight) \quad m{\mu} = \left( egin{array}{c} m{\mu}_{a,b} \\ m{\mu}_c \end{array}
ight) \quad m{... | 2,588 |
2 | 2.26 | medium | $ A very useful result from linear algebra is the *Woodbury* matrix inversion formula given by
$$(\mathbf{A} + \mathbf{BCD})^{-1} = \mathbf{A}^{-1} - \mathbf{A}^{-1}\mathbf{B}(\mathbf{C}^{-1} + \mathbf{D}\mathbf{A}^{-1}\mathbf{B})^{-1}\mathbf{D}\mathbf{A}^{-1}.$$
$(\mathbf{A} + \mathbf{BCD})^{-1} = \mathbf{A}^{-1} -... | This problem is quite straightforward, if we just follow the hint.
$$(A + BCD) (A^{-1} - A^{-1}B(C^{-1} + DA^{-1}B)^{-1}DA^{-1})$$
$$= AA^{-1} - AA^{-1}B(C^{-1} + DA^{-1}B)^{-1}DA^{-1} + BCDA^{-1} - BCDA^{-1}B(C^{-1} + DA^{-1}B)^{-1}DA^{-1}$$
$$= I - B(C^{-1} + DA^{-1}B)^{-1}DA^{-1} + BCDA^{-1} + B(C^{-1} + DA^{-1}B... | 1,908 |
2 | 2.27 | easy | Let $\mathbf{x}$ and $\mathbf{z}$ be two independent random vectors, so that $p(\mathbf{x}, \mathbf{z}) = p(\mathbf{x})p(\mathbf{z})$ . Show that the mean of their sum $\mathbf{y} = \mathbf{x} + \mathbf{z}$ is given by the sum of the means of each of the variable separately. Similarly, show that the covariance m... | The same procedure used in Prob.1.10 can be used here similarly.
$$\mathbb{E}[\mathbf{x}+\mathbf{z}] = \int \int (\mathbf{x}+\mathbf{z})p(\mathbf{x},\mathbf{z})d\mathbf{x}d\mathbf{z}$$
$$= \int \int (\mathbf{x}+\mathbf{z})p(\mathbf{x})p(\mathbf{z})d\mathbf{x}d\mathbf{z}$$
$$= \int \int \mathbf{x}p(\mathbf{x})p(\math... | 934 |
2 | 2.28 | hard | $ Consider a joint distribution over the variable
$$\mathbf{z} = \begin{pmatrix} \mathbf{x} \\ \mathbf{y} \end{pmatrix} \tag{2.290}$$
whose mean and covariance are given by $\mathbb{E}[\mathbf{z}] = \begin{pmatrix} \boldsymbol{\mu} \\ \mathbf{A}\boldsymbol{\mu} + \mathbf{b} \end{pmatrix}.$ and $cov[\mathbf{z}] = \... | It is quite straightforward when we compare the problem with (2.94)-(2.98). We treat $\boldsymbol{x}$ in $\mathbf{x} = \begin{pmatrix} \mathbf{x}_a \\ \mathbf{x}_b \end{pmatrix}, \quad \boldsymbol{\mu} = \begin{pmatrix} \boldsymbol{\mu}_a \\ \boldsymbol{\mu}_b \end{pmatrix}$ as $\boldsymbol{z}$ in this problem, $\... | 3,105 |
2 | 2.29 | medium | Using the partitioned matrix inversion formula $\begin{pmatrix} \mathbf{A} & \mathbf{B} \\ \mathbf{C} & \mathbf{D} \end{pmatrix}^{-1} = \begin{pmatrix} \mathbf{M} & -\mathbf{M}\mathbf{B}\mathbf{D}^{-1} \\ -\mathbf{D}^{-1}\mathbf{C}\mathbf{M} & \mathbf{D}^{-1} + \mathbf{D}^{-1}\mathbf{C}\mathbf{M}\mathbf{B}\mathbf{D}^{-... | It is straightforward. Firstly, we calculate the left top block:
left top =
$$\left[ (\boldsymbol{\Lambda} + \boldsymbol{A}^T \boldsymbol{L} \boldsymbol{A}) - (-\boldsymbol{A}^T \boldsymbol{L})(\boldsymbol{L}^{-1})(-\boldsymbol{L} \boldsymbol{A}) \right]^{-1} = \boldsymbol{\Lambda}^{-1}$$
And then the right top bloc... | 763 |
2 | 2.3 | medium | In this exercise, we prove that the binomial distribution $(m|N,\mu) = \binom{N}{m} \mu^m (1-\mu)^{N-m}$ is normalized. First use the definition $\binom{N}{m} \equiv \frac{N!}{(N-m)!m!}$ of the number of combinations of m identical objects chosen from a total of N to show that
$$\binom{N}{m} + \binom{N}{m-1} = \binom{... | $\binom{N}{m} + \binom{N}{m-1} = \binom{N+1}{m}.$ is an important property of Combinations, which we have used before, such as in Prob.1.15. We will use the 'old fashioned' denotation $C_N^m$ to represent choose m objects from a total of N. With the prior knowledge:
$$C_N^m = \frac{N!}{m!(N-m)!}$$
We evaluate the l... | 1,687 |
2 | 2.30 | easy | By starting from $\mathbb{E}[\mathbf{z}] = \mathbf{R}^{-1} \begin{pmatrix} \mathbf{\Lambda} \boldsymbol{\mu} - \mathbf{A}^{\mathrm{T}} \mathbf{L} \mathbf{b} \\ \mathbf{L} \mathbf{b} \end{pmatrix}.$ and making use of the result $cov[\mathbf{z}] = \mathbf{R}^{-1} = \begin{pmatrix} \mathbf{\Lambda}^{-1} & \mathbf{\Lambda}... | It is straightforward by multiplying $cov[\mathbf{z}] = \mathbf{R}^{-1} = \begin{pmatrix} \mathbf{\Lambda}^{-1} & \mathbf{\Lambda}^{-1} \mathbf{A}^{\mathrm{T}} \\ \mathbf{A} \mathbf{\Lambda}^{-1} & \mathbf{L}^{-1} + \mathbf{A} \mathbf{\Lambda}^{-1} \mathbf{A}^{\mathrm{T}} \end{pmatrix}.$ and $\mathbb{E}[\mathbf{z}] = \... | 968 |
2 | 2.31 | medium | Consider two multidimensional random vectors $\mathbf{x}$ and $\mathbf{z}$ having Gaussian distributions $p(\mathbf{x}) = \mathcal{N}(\mathbf{x}|\boldsymbol{\mu}_{\mathbf{x}}, \boldsymbol{\Sigma}_{\mathbf{x}})$ and $p(\mathbf{z}) = \mathcal{N}(\mathbf{z}|\boldsymbol{\mu}_{\mathbf{z}}, \boldsymbol{\Sigma}_{\mathb... | According to the problem, we can write two expressions:
$$p(\mathbf{x}) = \mathcal{N}(\mathbf{x}|\boldsymbol{\mu}_{\mathbf{x}}, \boldsymbol{\Sigma}_{\mathbf{x}}), \quad p(\mathbf{y}|\mathbf{x}) = \mathcal{N}(\mathbf{y}|\boldsymbol{\mu}_{\mathbf{z}} + \mathbf{x}, \boldsymbol{\Sigma}_{\mathbf{z}})$$
By comparing the ex... | 532 |
2 | 2.32 | hard | This exercise and the next provide practice at manipulating the quadratic forms that arise in linear-Gaussian models, as well as giving an independent check of results derived in the main text. Consider a joint distribution $p(\mathbf{x}, \mathbf{y})$ defined by the marginal and conditional distributions given by $p(... | Let's make this problem more clear. The deduction in the main text, i.e., (2.101-2.110), firstly denote a new random variable z corresponding to the joint distribution, and then by completing square according to z,i.e.,(2.103), obtain the precision matrix R by comparing $= -\frac{1}{2}\begin{pmatrix} \mathbf{x} \\ \mat... | 3,754 |
2 | 2.33 | hard | Consider the same joint distribution as in Exercise 2.32, but now use the technique of completing the square to find expressions for the mean and covariance of the conditional distribution $p(\mathbf{x}|\mathbf{y})$ . Again, verify that these agree with the corresponding expressions $\mathbb{E}[\mathbf{x}|\mathbf{y}] ... | According to Bayesian Formula, we can write $p(\mathbf{x}|\mathbf{y}) = \frac{p(\mathbf{x},\mathbf{y})}{p(\mathbf{y})}$ , where we have already known the joint distribution $p(\mathbf{x},\mathbf{y})$ in $cov[\mathbf{z}] = \mathbf{R}^{-1} = \begin{pmatrix} \mathbf{\Lambda}^{-1} & \mathbf{\Lambda}^{-1} \mathbf{A}^{\ma... | 852 |
2 | 2.34 | medium | - 2.34 (\*\*) To find the maximum likelihood solution for the covariance matrix of a multivariate Gaussian, we need to maximize the log likelihood function $\ln p(\mathbf{X}|\boldsymbol{\mu}, \boldsymbol{\Sigma}) = -\frac{ND}{2} \ln(2\pi) - \frac{N}{2} \ln |\boldsymbol{\Sigma}| - \frac{1}{2} \sum_{n=1}^{N} (\mathbf{x}... | Let's follow the hint by firstly calculating the derivative of $\ln p(\mathbf{X}|\boldsymbol{\mu}, \boldsymbol{\Sigma}) = -\frac{ND}{2} \ln(2\pi) - \frac{N}{2} \ln |\boldsymbol{\Sigma}| - \frac{1}{2} \sum_{n=1}^{N} (\mathbf{x}_n - \boldsymbol{\mu})^{\mathrm{T}} \boldsymbol{\Sigma}^{-1} (\mathbf{x}_n - \boldsymbol{\mu})... | 1,931 |
2 | 2.35 | medium | Use the result $\mathbb{E}[\mathbf{x}] = \boldsymbol{\mu}$ to prove $\mathbb{E}[\mathbf{x}\mathbf{x}^{\mathrm{T}}] = \boldsymbol{\mu}\boldsymbol{\mu}^{\mathrm{T}} + \boldsymbol{\Sigma}.$. Now, using the results $\mathbb{E}[\mathbf{x}] = \boldsymbol{\mu}$, and $\mathbb{E}[\mathbf{x}\mathbf{x}^{\mathrm{T}}] = \boldsymbol... | The proof of $\mathbb{E}[\mathbf{x}\mathbf{x}^{\mathrm{T}}] = \boldsymbol{\mu}\boldsymbol{\mu}^{\mathrm{T}} + \boldsymbol{\Sigma}.$ is quite clear in the main text, i.e., from page 82 to page 83 and hence we won't repeat it here. Let's prove $\mathbb{E}[\Sigma_{\mathrm{ML}}] = \frac{N-1}{N} \Sigma.$. We first begin by ... | 4,249 |
2 | 2.36 | medium | Using an analogous procedure to that used to obtain $= \mu_{\text{ML}}^{(N-1)} + \frac{1}{N} (\mathbf{x}_{N} - \mu_{\text{ML}}^{(N-1)}).$, derive an expression for the sequential estimation of the variance of a univariate Gaussian
distribution, by starting with the maximum likelihood expression
$$\sigma_{\rm ML}^2 = ... | Let's follow the hint. However, firstly we will find the sequential expression based on definition, which will make the latter process on finding coefficient $a_{N-1}$ more easily. Suppose we have N observations in total, and then we can write:
$$\begin{split} \sigma_{ML}^{2(N)} &= \frac{1}{N} \sum_{n=1}^{N} (x_n - ... | 2,963 |
2 | 2.37 | medium | Using an analogous procedure to that used to obtain $= \mu_{\text{ML}}^{(N-1)} + \frac{1}{N} (\mathbf{x}_{N} - \mu_{\text{ML}}^{(N-1)}).$, derive an expression for the sequential estimation of the covariance of a multivariate Gaussian distribution, by starting with the maximum likelihood expression $\Sigma_{\mathrm{ML}... | We follow the same procedure in Prob.2.36 to solve this problem. Firstly,
we can obtain the sequential formula based on definition.
$$\begin{split} \boldsymbol{\Sigma}_{ML}^{(N)} &= \frac{1}{N} \sum_{n=1}^{N} (\boldsymbol{x}_{n} - \boldsymbol{\mu}_{ML}^{(N)}) (\boldsymbol{x}_{n} - \boldsymbol{\mu}_{ML}^{(N)})^{T} \\ ... | 2,304 |
2 | 2.38 | easy | Use the technique of completing the square for the quadratic form in the exponent to derive the results $\mu_N = \frac{\sigma^2}{N\sigma_0^2 + \sigma^2} \mu_0 + \frac{N\sigma_0^2}{N\sigma_0^2 + \sigma^2} \mu_{ML}$ and $\frac{1}{\sigma_N^2} = \frac{1}{\sigma_0^2} + \frac{N}{\sigma^2}$. | It is straightforward. Based on $p(\mathbf{X}|\mu) = \prod_{n=1}^{N} p(x_n|\mu) = \frac{1}{(2\pi\sigma^2)^{N/2}} \exp\left\{-\frac{1}{2\sigma^2} \sum_{n=1}^{N} (x_n - \mu)^2\right\}.$, $p(\mu) = \mathcal{N}\left(\mu|\mu_0, \sigma_0^2\right)$ and $p(\mu|\mathbf{X}) \propto p(\mathbf{X}|\mu)p(\mu).$, we focus on the expo... | 1,777 |
2 | 2.39 | medium | Starting from the results $\mu_N = \frac{\sigma^2}{N\sigma_0^2 + \sigma^2} \mu_0 + \frac{N\sigma_0^2}{N\sigma_0^2 + \sigma^2} \mu_{ML}$ and $\frac{1}{\sigma_N^2} = \frac{1}{\sigma_0^2} + \frac{N}{\sigma^2}$ for the posterior distribution of the mean of a Gaussian random variable, dissect out the contributions from the ... | Let's follow the hint.
$$\frac{1}{\sigma_N^2} = \frac{1}{\sigma_0^2} + \frac{N}{\sigma^2} = \frac{1}{\sigma_0^2} + \frac{N-1}{\sigma^2} + \frac{1}{\sigma^2} = \frac{1}{\sigma_{N-1}^2} + \frac{1}{\sigma^2}$$
However, it is complicated to derive a sequential formula for $\mu_N$ directly. Based on $\frac{1}{\sigma_N^2... | 2,284 |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 3