辅导案例-CS 4342
Assignment #1
CS 4342

Conceptual and theoretical questions
Section 2.4 from the textbook
1. Question 1 (5 points)
2. Question 2 (5 points)
3. Question 3 (5 points)
4. Question 4 (5 points)
5. Question 5 (5 points)
6. Question 6 (5 points)
7. Question 7 (5 points)

Applied
Section 2.4 from the textbook
8. Question 9 (15 points)
9. Question 10 (15 points)
You can find the description of Boston data set in the following link:
https://www.cs.toronto.edu/~delve/data/boston/bostonDetail.html
Mathematics and Probability
10. Minimum and Maximum of a function (10)
For the following function (, ) = 4 ! + 9 ! − 16 + 36 + 18 + 5
a. Show the contour plot
b. Find the partial derivative with respect to and
c. Find the minimum point

11. Maximum Likelihood Estimation (MLE) (10)
For the normal distribution with mean and variance !; its pdf is defined by () = 1√2 "($"%)!'!
a. Plot the curve for = 3 and = 1
b. Plot the curve for = 3 and = √10
c. Let’s assume, we have samples - {(, !, … . , )}. The likelihood function is defined by ((, !, … , ); , ) [email protected](*))*+( = (() × (!) × ⋯× ())
find the MLE for and .
d. Draw 10 samples from a normal distribution with = 3 and = √10. Show its
histogram, and calculate it's mean and variance
e. Draw 100 samples from a normal distribution with = 3 and = √10. Show its
histogram, and calculate it's mean and variance
f. Draw 1000 samples from a normal distribution with = 3 and = √10. Show its
histogram, and calculate it's mean and variance

12. Bayes Rule and Conditional Distribution (15)
For a company, we have collected the following information for their hiring process over the
last 10 years.
Education Ph.D. Engineering Ph.D. in Engineering
Accepted 10 25 45
Rejected 90 125 55

a. What is the probability of an applicant to have PhD in Engineering?
b. What is probability of being accepted if you have an Engineering background?
c. What is probability of being accepted?
d. What is probability of having Ph.D. if the candidate being accepted?


Python functions which might be helpful here
https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.contour.html
https://docs.scipy.org/doc/numpy-
1.15.0/reference/generated/numpy.random.normal.html
https://matplotlib.org/3.2.0/api/_as_gen/matplotlib.pyplot.hist.html



51作业君 51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: ITCSdaixie