Cx4240 homework 1 | Mathematics homework help

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

• Submit your answers as an electronic copy on T-square.
• No unapproved extension of deadline is allowed. Late submission will lead to 0 credit.
• Typing with Latex is highly recommended. Typing with MS Word is also okay. If you handwrite, try
to be clear as much as possible. No credit may be given to unreadable handwriting.
• Explicitly mention your collaborators if any.

1

Probability

On the morning of September 31, 1982, the won-lost records of the three leading baseball teams in the
western division 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 games remaining to be played. All 3 of the Giants games were with the Dodgers, and
the 3 remaining games of the Braves were against the San Diego Padres. Suppose that the outcomes of all
remaining games are independent and each game is equally likely to be won by either participant. If two
teams tie for first place, they have a playoff game, which each team has an equal chance of winning.
(a) What is the probability that Atlanta Braves wins the division? [5 pts]
(b) What is the probability that San Francisco Giants wins the division? [5 pts]
(c) What is the probability that Los Angeles Dodgers wins the division? [5 pts]
(d) What is the probability to have an additional playoff game? [5 pts]

2

Maximum Likelihood

Suppose we have n i.i.d (independent and identically distributed) data samples from the following probability
distribution. This problem asks you to build a log-likelihood function, and find the maximum likelihood
estimator of the parameter(s).
1

(a) Poisson distribution [5 pts]
The Poisson distribution is defined as
P ( xi = k ) =

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

What is the maximum likelihood estimator of λ?
(b) Exponential distribution [5 pts]
The probability density function of Exponential distribution is given by
f ( x) =

λe−λx
0

x≥0
x<0

What is the maximum likelihood estimator of λ?
(c) Gaussian normal distribution [10 pts]
Suppose we have n i.i.d (Independent and Identically Distributed) data samples from a univariate Gaussian
normal distribution N (µ, σ 2 ), which is given by
(x − µ)2
1
√ exp −
2σ 2
σ 2π

N (x; µ, σ 2 ) =

.

What is the maximum likelihood estimator of µ and σ 2 ?

3

Principal Component Analysis

In class, we learned that Principal Component Analysis (PCA) preserves variance as much as possible. We
are going to explore another way of deriving it: minimizing reconstruction error.
Consider data points xn (n = 1, …, N ) in D-dimensional space. We are going to represent 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 length when x is projected onto ui .
Suppose we want to reduce the dimension from D to M < D. Then the data point xn is approximated
by
M

xn =
˜

D
n
zi ui +

i=1

bi ui .
i=M +1

In this representation, the first M directions of ui are allowed to have different coefficient zni for each data
point, while the rest has a constant coefficient bi . As long as it is the same value for all data points, it does
not need to be 0.
Our goal is setting ui , zni , and bi for n = 1, …, N and i = 1, …, D so as to minimize reconstruction error.
That is, we want to minimize the difference 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 answer 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 sample covariance matrix.
¯
¯

Image Compression using Principal Component Analysis

For this section, you will be using PCA to perform dimensionality reduction on the given dataset (q4.mat).
This dataset contains vectorized grey scale photos of all members of the class. The file contains a matrix
’faces’ of size (62x 4500) for each of the 59 students (as well as 2 TA’s and Prof) in the class. You are to use
Principal Component Analysis to perform Image Compression.
• Submit a plot of the Eigen values in ascending order (Visualize the increase of Eigen values across all
Eigen vectors).
• Select a cut off to choose the top n eigen faces (or vectors) based on the graph. Discuss the reasoning
for choosing this cut off.
• For your choosen eigen faces, calculate the reconstruction error (Squared distance from original image,
and reconstructed image) for the first two images in the dataset. (They are images of the two TAs).
• Vary the number of eigen faces to view the differences in reconstruction error and in the quality of the
image. Use imshow() to display the two images for your choosen n eigen faces. Attach the two images
to your submission.
Hint: Use Matlab function eig or eigs for calculating the eigen values and vectors. For reconstructing
the images, you can convert the row vectors to matrices using reshape(rowVector, 75, 60)

Get 20% Discount on This Paper
Pages (550 words)
Approximate price: -

Try it now!

Get 20% Discount on This Paper

We'll send you the first draft for approval by at
Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

Custom Writings Help is a Quality-Oriented Company in Online Writing as a result of hiring exceptional professionals to execute clients' tasks.

Essays

Research Papers

At Custom Writings Help,We understand the struggle of research paper writing, and that is why at Custom WritingS Help, we are all out to help you. We pride ourselves on having a team of clinical writers. The stringent and rigorous vetting process ensures that only the 'BEST' Writers are chosen for the job. We have highly qualified Ph.D. and MA writers working with us; we equally offer these experienced writers specific bonuses and incentives to make them deliver highly original, unique, and informative content at reasonably low prices.

Admissions

Thesis Writing Service

Worlwide, Many Masters Students are struggling with Thesis Completion. A thesis is likely to be the longest and most challenging piece of work a student has ever completed. However, unlike essays and other assignments, a student can pick a particular interest topic and work on their initiative. Fortunately, we are there for you. At Custom Writings Help, you are assured of an authentic, imaginative, informative, linguistically great, and advantageous thesis that adheres to all your needs. So, why continue considering different writers when you have discovered the best in the field?

Editing

Custom Papers

Not a single student can avoid writing custom papers. However, a total lack of experience, skills, and time makes it very hard to produce a superb writing piece. Therefore, if you are seeking professional help, turn to us. Our specialized and experienced writers compose a variety of model papers, including custom essays, college term papers, research papers, book reports, MBA essays, executive summaries, dissertations, Ph.D. theses, admission essays, and research proposals for college and university students at any level.

Coursework

Essay Writing

Most of the students disregard the critical principles of essay writing and compose papers below sensible guidelines. Therefore, with Custom Writings Help, one should not worry about his/her essay. Our Writers compose informative and engaging content on all complexities and topics. We write meaningful and smart essays while prioritizing all aspects that bring about a good grade, such as impeccable grammar, proper structure, zero-plagiarism, and conformance to guidelines.

Coursework

Coourse Work Writing

Don't let the seemingly never-ending onslaught of writing assignments get you down. If you are looking where to get course work assistance online, the writers at Custom Writings Help are here to assist you with all of your writing needs. We undertake to unique delivery of papers that meet the professor's requirements. The content is proofread, edited, and checked plagiarism before submission to customers. No matter how big or small your work is, we will deliver on time. Try US Now! !

Coursework

Dissertation Writing Service

High-Quality Dissertation Writing Services are rare. They require Ph.D. academicians – not easily found. However, are an exception. The years, time, and resources we have invested in the dissertation world has given us a competitive advantage over others. Choose to come to Custom Writings Help; You will find perfect Ph.D. consultants who have written hundreds of dissertations theses ready to help you. Let our dissertation-writing services help you craft your dissertation, for you are assured we will give you the results.