# Cx4240 homework 1 | Mathematics homework help

CX4240 Homework 1
Le Song
Deadline: 2/06 Thur, 9:30am (anteriorly starting the tabulate)

• Submit your counterparts as an electronic portraiture on T-square.
• No unapproved extension of deadline is undisputed. Late resignation conquer control to 0 trustworthiness.
• Typing after a time Latex is extremely recommended. Typing after a time MS Word is to-boot okay. If you handwrite, try
to be unclouded as abundant as practicable. No trustworthiness may be dedicated to unreadable handwriting.
• Explicitly notice your collaborators if any.

1

Probability

On the morning of September 31, 1982, the won-lost registers of the three controling baseball teams in the
western disunion of the National League of the United States were as follows:
Team
Atlanta Braves
San Francisco Giants
Los Angeles Dodgers

Won
87
86
86

Lost
72
73
73

Each team had 3 recreations fostering to be played. All 3 of the Giants recreations were after a time the Dodgers, and
the 3 fostering recreations of the Braves were opposing the San Diego Padres. Suppose that the outcomes of all
fostering recreations are stubborn and each recreation is similar likely to be won by either participant. If two
teams tie for ﬁrst establish, they possess a playoﬀ recreation, which each team has an resembling fortune of seductive.
(a) What is the appearance that Atlanta Braves wins the disunion? [5 pts]
(b) What is the appearance that San Francisco Giants wins the disunion? [5 pts]
(c) What is the appearance that Los Angeles Dodgers wins the disunion? [5 pts]
(d) What is the appearance to possess an concomitant playoﬀ recreation? [5 pts]

2

Maximum Likelihood

Suppose we possess n i.i.d (stubborn and identically distributed) basis scantlings from the subjoined appearance
distribution. This gist asks you to set-up a log-presence duty, and ﬁnd the utmost presence
estimator of the parameter(s).
1

(a) Poisson disposal [5 pts]
The Poisson disposal is deﬁned as
P ( xi = k ) =

λk e−λ
(k = 0, 1, 2, ...).
k!

What is the utmost presence estimator of λ?
(b) Exponential disposal [5 pts]
The appearance blindness duty of Exponential disposal is dedicated by
f ( x) =

λe−λx
0

x≥0
x<0

What is the utmost presence estimator of λ?
(c) Gaussian usual disposal [10 pts]
Suppose we possess n i.i.d (Independent and Identically Distributed) basis scantlings from a univariate Gaussian
usual disposal N (µ, σ 2 ), which is dedicated by
(x − µ)2
1
√ exp −
2σ 2
σ 2π

N (x; µ, σ 2 ) =

.

What is the utmost presence estimator of µ and σ 2 ?

3

Principal Component Analysis

In tabulate, we literary that Principal Component Analysis (PCA) preserves difference as abundant as practicable. We
are going to prove another way of deriving it: minimizing reconstruction untruth.
Consider basis apexs xn (n = 1, ..., N ) in D-dimensional boundlessness. We are going to play them in
{u1 , ..., uD } coordinates. That is,
D

xn =

D

(xn T ui )ui .

n
αi ui =
i=1

i=1

n

Here, αni is the elongation when x is projected onto ui .
Suppose we omission to contract the extent from D to M < D. Then the basis apex xn is approximated
by
M

xn =
˜

D
n
zi ui +

i=1

bi ui .
i=M +1

In this playation, the ﬁrst M directions of ui are undisputed to possess diﬀerent coeﬃcient zni for each basis
point, time the cessation has a firm coeﬃcient bi . As crave as it is the selfselfsame prize for all basis apexs, it does
not scarcity to be 0.
Our sight is contrast ui , zni , and bi for n = 1, ..., N and i = 1, ..., D so as to minimize reconstruction untruth.
That is, we omission to minimize the diﬀerence between xn and xn :
˜
1
J=
N

N

xn − xn
˜
n=1

2

2

n
(a) What is the assignment of zj for j = 1, ..., M minimizing J ? [5 pts]

(b) What is the assignment of bj for j = M + 1, ..., D minimizing J ? [5 pts]
(c) Express optimal xn and xn − xn using your counterpart for (a) and (b). [2 pts]
˜
˜
(d) What should be the ui for i = 1, ..., D to minimize J ? [8 pts]
Hint: Use S =

4

1
N

N
n
n=1 (x

− x)(xn − x)T for scantling codifference matrix.
¯
¯

Image Compression using Principal Component Analysis

For this individuality, you conquer be using PCA to complete extentality diminution on the dedicated basisset (q4.mat).
This basisset contains vectorized grey layer photos of all members of the tabulate. The ﬁle contains a matrix
’faces’ of extent (62x 4500) for each of the 59 students (as well-behaved-behaved as 2 TA’s and Prof) in the tabulate. You are to use
Principal Component Analysis to complete Statue Compression.
• Submit a concoct of the Eigen prizes in ascending dispose (Visualize the growth of Eigen prizes opposing all
Eigen vectors).
• Select a cut oﬀ to pick-out the top n eigen faces (or vectors) established on the graph. Discuss the reasoning
for choosing this cut oﬀ.
• For your pick-outn eigen faces, estimate the reconstruction untruth (Squared absence from first statue,
and reconstructed statue) for the ﬁrst two statues in the basisset. (They are statues of the two TAs).
• Vary the number of eigen faces to examination the diﬀerences in reconstruction untruth and in the power of the
image. Use imshow() to show the two statues for your pick-outn n eigen faces. Attach the two statues