CM146 Problem Set 0: Math prerequisites

$35.00

Category: You will Instantly receive a download link for .zip solution file upon Payment

Description

5/5 - (3 votes)

• Multivariate Calculus (at the level of a first undergraduate course, e.g., Math 32A and 32B
at UCLA). For example, we rely on you being able to take derivatives and integrals. During
the class you might be asked, for example, to derive gradients of multivariate functions.
• Linear Algebra (at the level of a first undergraduate course, e.g., Math 33A). For example,
we assume you know how to multiply vectors and matrices, and that you understand matrix
inversion, eigenvectors and eigenvalues. During the class, you might also be asked to also
learn about methods for matrix factorization.
• Probability and Statistics (at the level of a first undergraduate course, e.g., Statistics
100A). For example, we assume you know how to find the mean and variance of a set of
data, that you are familiar with common probability distributions such as the Gaussian and
Uniform distributions, and that you understand basic notions such as conditional probabilities
and Bayes rule. During the class, you might be asked to calculate the likelihood (probability)
of a data set with respect to some given probability distribution, and to then derive the
parameters of the distribution that maximize this likelihood.
This assignment helps you self-evaluate whether you have the background to succeed in the class.
For each of these mathematical topics, we provide below (1) a minimum background test and (2) a
moderate background test. If you pass the moderate background test, you are in excellent shape to
take the class. If you pass the minimum background but not the moderate background test, then
you can still take the class, but you should expect to devote extra time to fill in necessary math
background. If you cannot pass the minimum background test, we suggest you fill in your math
background before taking the class.
You may find the following resources helpful:
This assignment is adapted from course material by William Cohen, Ziv Bar-Joseph (CMU) and Jessica Wu
(Harvey Mudd).
1
• Andrew Ng’s CS229 Course (Stanford)
– Linear Algebra Review (http://cs229.stanford.edu/section/cs229-linalg.pdf)
– Probability Theory Review (http://cs229.stanford.edu/section/cs229-prob.pdf)
Additional resources are available on the course syllabus.
2
Necessary Minimum Background Test [45 pts]
While you are welcome to use online resources, such as Wolfram-Alpha, you should be able to solve
these problems by hand.
1 Multivariate Calculus [2 pts]
Consider y = x sin(z)e
−x
. What is the partial derivative of y with respect to x?
3
2 Linear Algebra [8 pts]
Consider the matrix X and the vectors y and z below:
X =

2 4
1 3
y =

1
3

z =

2
3

(a) What is the inner product y
T z?
(b) What is the product Xy?
(c) Is X invertible? If so, give the inverse; if not, explain why not.
(d) What is the rank of X?
4
3 Probability and Statistics [10 pts]
Consider a sample of data S obtained by flipping a coin five times. Xi
, i ∈ {1, . . . , 5} is a random
variable that takes a value 0 when the outcome of coin flip i turned up heads, and 1 when it turned
up tails. Assume that the outcome of each of the flips does not depend on the outcomes of any of
the other flips. The sample obtained S = (X1, X2, X3, X4, X5) = (1, 1, 0, 1, 0).
(a) What is the sample mean for this data?
(b) What is the unbiased sample variance ?
(c) What is the probability of observing this data assuming that a coin with an equal probability
of heads and tails was used? (i.e., The probability distribution of Xi
is P(Xi = 1) = 0.5,
P(Xi = 0) = 0.5.)
(d) Note the probability of this data sample would be greater if the value of the probability of
heads P(Xi = 1) was not 0.5 but some other value. What is the value that maximizes the
probability of the sample S? [Optional: Can you prove your answer is correct?]
(e) Given the following joint distribution between X and Y , what is P(X = T|Y = b)?
P(X, Y )
Y
a b c
X
T 0.2 0.1 0.2
F 0.05 0.15 0.3
5
4 Probability axioms [5 pts]
Let A and B be two discrete random variables. In general, are the following true or false? (Here
Ac denotes complement of the event A.)
(a) P(A ∪ B) = P(A ∩ (B ∩ Ac
))
(b) P(A ∪ B) = P(A) + P(B) − P(A ∩ B)
(c) P(A) = P(A ∩ B) + P(Ac ∩ B)
(d) P(A|B) = P(B|A)
(e) P(A1 ∩ A2 ∩ A3) = P(A3|(A2 ∩ A1))P(A2|A1)P(A1)
6
5 Discrete and Continuous Distributions[5 pts]
Match the distribution name to its formula.
(a) Gaussian (i) p
x
(1 − p)
1−x
, when x ∈ {0, 1}; 0 otherwise
(b) Exponential (ii) 1
b−a when a ≤ x ≤ b; 0 otherwise
(c) Uniform (iii)
n
x

p
x
(1 − p)
n−x
(d) Bernoulli (iv) λe−λx when x ≥ 0; 0 otherwise
(e) Binomial (v) √
1
(2π)σ2
exp

1
2σ2 (x − µ)
2