# Cx4240 homework 1 | Mathematics homework help

CX4240 Homework 1

Le Song

Deadline: 2/06 Thur, 9:30am (precedently starting the systematize)

• Submit your rejoinders as an electronic enactation on T-square.

• No unapproved extension of deadline is undisputed. Late inferiority obtain administer to 0 trustworthiness.

• Typing after a opportunity Latex is greatly recommended. Typing after a opportunity MS Word is too okay. If you handwrite, try

to be pure as abundantly as practicable. No trustworthiness may be ardent to unreadable handwriting.

• Explicitly declaration your collaborators if any.

1

Probability

On the early of September 31, 1982, the won-lost registers of the three administering baseball teams in the

western analysis 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 pastimes fostering to be played. All 3 of the Giants pastimes were after a opportunity the Dodgers, and

the 3 fostering pastimes of the Braves were counter the San Diego Padres. Suppose that the outcomes of all

fostering pastimes are recalcitrant and each pastime is homogeneous slight to be won by either participant. If two

teams tie for ﬁrst attribute, they own a playoﬀ pastime, which each team has an resembling befoulment of seductive.

(a) What is the presumption that Atlanta Braves wins the analysis? [5 pts]

(b) What is the presumption that San Francisco Giants wins the analysis? [5 pts]

(c) What is the presumption that Los Angeles Dodgers wins the analysis? [5 pts]

(d) What is the presumption to own an concomitant playoﬀ pastime? [5 pts]

2

Maximum Likelihood

Suppose we own n i.i.d (recalcitrant and identically as sorted) facts scantlings from the subjoined presumption

distribution. This problem asks you to institute a log-air discharge, and ﬁnd the zenith air

estimator of the parameter(s).

1

(a) Poisson dispensation [5 pts]

The Poisson dispensation is deﬁned as

P ( xi = k ) =

λk e−λ

(k = 0, 1, 2, ...).

k!

What is the zenith air estimator of λ?

(b) Exponential dispensation [5 pts]

The presumption hebetude discharge of Exponential dispensation is ardent by

f ( x) =

λe−λx

0

x≥0

x<0

What is the zenith air estimator of λ?

(c) Gaussian natural dispensation [10 pts]

Suppose we own n i.i.d (Independent and Identically Distributed) facts scantlings from a univariate Gaussian

natural dispensation N (µ, σ 2 ), which is ardent by

(x − µ)2

1

√ exp −

2σ 2

σ 2π

N (x; µ, σ 2 ) =

.

What is the zenith air estimator of µ and σ 2 ?

3

Principal Component Analysis

In systematize, we scholarly that Principal Component Analysis (PCA) preserves hostility as abundantly as practicable. We

are going to search another way of deriving it: minimizing reconstruction deception.

Consider facts purposes xn (n = 1, ..., N ) in D-dimensional interspace. We are going to enact 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 tediousness when x is contemplated onto ui .

Suppose we insufficiency to subject the extent from D to M < D. Then the facts purpose xn is approximated

by

M

xn =

˜

D

n

zi ui +

i=1

bi ui .

i=M +1

In this enactation, the ﬁrst M directions of ui are undisputed to own diﬀerent coeﬃcient zni for each facts

point, opportunity the security has a true coeﬃcient bi . As covet as it is the corresponding compute for all facts purposes, it does

not need to be 0.

Our sight is contrast ui , zni , and bi for n = 1, ..., N and i = 1, ..., D so as to minimize reconstruction deception.

That is, we insufficiency to minimize the diﬀerence among 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 rejoinder 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 cohostility matrix.

¯

¯

Image Compression using Principal Component Analysis

For this exception, you obtain be using PCA to discharge extentality decrease on the ardent factsset (q4.mat).

This factsset contains vectorized grey lamina photos of all members of the systematize. The ﬁle contains a matrix

’faces’ of extent (62x 4500) for each of the 59 students (as well-mannered-mannered as 2 TA’s and Prof) in the systematize. You are to use

Principal Component Analysis to discharge Representation Compression.

• Submit a devise of the Eigen computes in ascending arrange (Visualize the growth of Eigen computes abutting all

Eigen vectors).

• Select a cut oﬀ to cull the top n eigen faces (or vectors) inveterate on the graph. Discuss the reasoning

for choosing this cut oﬀ.

• For your culln eigen faces, estimate the reconstruction deception (Squared interspace from pristine representation,

and reconstructed representation) for the ﬁrst two representations in the factsset. (They are representations of the two TAs).

• Vary the enumerate of eigen faces to light the diﬀerences in reconstruction deception and in the tendency of the

image. Use imshow() to vault the two representations for your culln n eigen faces. Attach the two representations

to your inferiority.

Hint: Use Matlab discharge eig or eigs for guarded the eigen computes and vectors. For reconstructing

the representations, you can apply the row vectors to matrices using reshape(rowVector, 75, 60)