Processing math: 100%

Chapter 4: Exercises

Old Chinese version

  1. (*)AM-GM inequality:
    1. Give the formula to show the inequality of arithmetic and geometric means. When does the equality hold?
    2. Prove the formula.
  2. (*)MLE for an unfair coin: Toss an unfair coin 10 times and obtain 7 heads and 3 tails. Use the principle of MLE (maximum likelihood estimate) to derive the probabilities for head and tail are 0.7 and 0.3, respectively.
  3. (*)MLE for a 3-sided dice: Toss a 3-sided dice 10 times and obtain 2 times for side 1, 3 times for side 2, 5 times for side 3. Use the principle of MLE (maximum likelihood estimate) to derive the probabilities for sides 1, 2, and 3 are 0.2, 0.3, and 0.5, respectively.
  4. (*)1D Gaussian PDF and its MLE:
    1. What is the formula for 1D Gaussian PDF (probability density function)?
    2. Given a set of observation {x1,x2,...,xn}, what are the MLE (maximum likelihood estimate) of μ and σ2 for the 1D Gaussian PDF?
  5. (**)Multivariate Gaussian PDF and its MLE:
    1. What is the formula for the multivariate Gaussian PDF (probability density function) in the d-dimensional space?
    2. Given a set of observation {x1,x2,...,xn}, what are the MLE (maximum likelihood estimate) of μRd and ΣRd×d for the multivariate Gaussian PDF?
  6. (*)Function for computing the MLE of the multivariate Gaussian PDF: The multivariate Gaussiaon PDF in the d-dimensional space is given by g(x,μ,Σ)=1(2π)d|Σ|e(xμ)TΣ1(xμ)/2. Write a function mle4gaussian.m with the following usage: [mu, sigma]=mle4gaussian(X); where X=[x1,x2,...,xn] is a matrix with each column being an observation vector, and mu and sigma are the MLE for the multivariate Gaussian expressed by {ˆμ=1nni=1xi,ˆΣ=1nni=1(xiˆμ)(xiˆμ)T. Note that you are not allowed to use any of the ready-to-use functions from any MATLAB toolbox. In other words, you need to write the function from scratch.

    Here is a test case. If the input X is given by

    X=[magic(5), magic(5)']; Then the returned mu is 13 13 13 13 13 And the returned sigma is 52.0000 4.5000 -28.0000 -23.0000 -5.5000 4.5000 47.0000 -3.0000 -25.5000 -23.0000 -28.0000 -3.0000 62.0000 -3.0000 -28.0000 -23.0000 -25.5000 -3.0000 47.0000 4.5000 -5.5000 -23.0000 -28.0000 4.5000 52.0000
  7. (*)Simplified formula of the MLE of ND Gaussian PDF: Prove that the MLE of Σ of the multivariate Gaussian PDF can be expressed as follows: ˆΣ=1nni=1(xiˆμ)(xiˆμ)T=1nXXTˆμˆμT, where X=[x1,x2,...,xn] is a matrix with each column being an observation vector.
  8. (*)Incremental formula for the MLE of ND Gaussian PDF: Given the observation matrix X=[x1,x2,...,xn] where each column is an observation vector, the MLE of a D-dim Gaussian PDF can be expressed as: {ˆμ=1nni=1xi,ˆΣ=1nXXTˆμˆμT. We can use ˆμk and ˆΣk to denote the MLE after removing xk from X, Prove that the MLE can be expressed as: {ˆμk=nˆμxkn1,ˆΣk=nn1ˆΣ+nn1ˆμˆμTˆμkˆμTk1n1xkxTk.
  9. (*)ND Gaussian PDF with not-full covariance matrix: Given a set of observation {x1,x2,...,xn}, we want to find the MLE of μ and Σ for the multivariate Gaussian PDF when Σ assumes a specific non-full forms.
    1. If Σ is restricted to be diagonal, that is Σ=diag(α1,,αd)=[α1000000αd] Prove that the MLE of μ and Σ are {ˆμ=1nni=1xi,ˆαk=1nni=1(xi(k)ˆμ(k))2,k=1,,d.
    2. If Σ is restricted to be αI (a constant times an identity matrix), prove that the MLE of μ and Σ are {ˆμ=1nni=1xi,ˆα=1ndni=1(xiˆμ)T(xiˆμ).

    Data Clustering and Pattern Recognition (資料分群與樣式辨認)