ECON3203-econ代写
时间:2022-11-10
ECON3203-ECON5403 Final Exam, Semester 3, 2021
ˆ The exam duration is 2 hours and 30 minutes, plus 10 minutes reading time, for both
the lab part and written part. The buffer time for submission is 20 minutes; this is not
exam time and should be used only for submission. Please make sure you submit on
time - late penalty will apply at 5% per 5 minute late.
ˆ The exam has two parts: a Lab part and a Written Part. You should spend about
60% of your time on the Written Part.
ˆ For students with Equitable Learning, please submit your work within your allowed time
frame either on Moodle or via email to minhngoc.tran@unsw.edu.au. Late penalty will
apply.
ˆ Plagiarism and student misconduct are treated very seriously. You are allowed to use
any course materials. This exam material cannot be shared in any form. Students
cannot communicate during the exam. UNSW uses a range of technologies to detect
cheating. Serious misconduct may result in a fail mark for the course, suspension or
permanent exclusion from the university.
ˆ The Lab part is given in the jupyter notebook. The written part starts on the next
page. Make sure you submit both parts.
1
ECON3203-ECON5403 Final Exam (Written Part)
ˆ ECON3203 students should attempt questions 1 to 4. Your written exam is out of 35
marks.
ˆ ECON5403 students should attempt all questions. Your written exam is out of 40 marks.
ˆ In answering questions, be precise in your answer but concise. Do not answer just yes
or no unless asked to do so.
ˆ All answers should be correct up to 4 decimal points (for example, 0.0121, 12.3444)
ˆ You may type the written exam in Word or hand-write it. Please clearly mark the
question numbers.
Question 1 (9 marks)
(a) For large study courses, it is important for the teaching team to be able to identify well
in advance students who are having difficulty in studying the course. This enables the team
to bring those students back on the right track. Using the data from the courses offered in
the past, the team runs a classification algorithm using a logistic regression model in order to
classify students into the “fail” or “pass” categories, based on three predictors: hours studied
per week, mid-term exam marks and number of absences from the class. What statistical
estimation method can be used to estimate this model? Briefly explain what it is and how to
use it.
(b) The table below summarizes the estimate of the logistic regression model from part (a)
for the probability of “pass”
Variable Estimate
Intercept -0.05
Hours studied 0.12
Mid-term 0.03
Absence -0.37
Under the 0-1 loss, which category would the teaching team classify a student who studies
2 hours per week, has a midterm mark of 45 and 6 absences into?
2
(c) The distribution of a waiting time for an event to occur is often modeled by an exponential
distribution
p(y|θ) = θe−θy, y > 0
with θ > 0 being the parameter to be estimated. Given a dataset y = {y1, ..., yn} with the
sample mean y¯ = 10, find the maximum likelihood estimate of θ.
Question 2 (12 marks)
We want to fit a multiple linear regression model to a dataset of n = 97 observations and
carry out variable selection using Lasso. We find that λmax = 0.9 is a value of the shrinkage
parameter λ that all the coefficients are shrunk to zero. To find the optimal shrinkage, we
create a range of 10 values for λ : 0, 0.1, 0.2, ..., 0.9, and compute the Lasso estimates β̂lassoλ at
each of these values. Let σ̂2λ =
∥y−Xβ̂lassoλ ∥2
n
be the estimate of the variance of the error term ϵ.
The table below gives the degrees of freedom dfλ and σ̂
2
λ
λ 0 0.1 0.2 0.3 0.4 0.5 .6 .7 .8 .9
dfλ 8 5 3 3 2 1 1 1 1 0
σ̂2λ 0.9033 0.8116 1.8865 4.1080 4.6396 5.1962 5.7991 6.4485 7.1444 7.4611
(a) Find the best value of λ among these 10 values using the BIC criterion.
(b) Explain why variable selection is often necessary in regression and classification.
Question 3 (8 marks)
The manager of the purchasing department of a large company would like to develop a re-
gression model to predict the average amount of time it takes to process a given number of
invoices. The following model was fit to the data: Y = β0+β1x+ e where Y is the processing
time and x is the number of invoices. Utilizing the output from the fit of this model provided
below, complete the following tasks.
(a) Find a 95% confidence interval for the slope β1.
Given the large data size n, the critical value tn−2,0.025 ≈ z0.025 = 1.96.
(b) Suppose that a best practice benchmark for the start-up time β0 is 0.6 hours. Test the
null hypothess H0 : β0 = 0.6 against a two-sided alternative. Calculate the tstat value
for this test With α = 5%, what is your conclusion?
3
. reg Time Invoices
Source | SS df MS Number of obs = 30
-------------+------------------------------ F( 1, 28) = 190.36
Model | 20.7019874 1 20.7019874 Prob > F = 0.0000
Residual | 3.04501264 28 .108750451 R-squared = 0.8718
-------------+------------------------------ Adj R-squared = 0.8672
Total | 23.747 29 .818862069 Root MSE = .32977
------------------------------------------------------------------------------
Time | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
Invoices | .0112916 .0008184 13.80 0.000 ------- ---------
_cons | .6417099 .1222707 5.25 0.000 ------- --------
------------------------------------------------------------------------------
Question 4 (6 marks)
You are using a feedforward neural network with the structure given in Figure 1 for binary
classification. The bi value next to each hidden unit denotes the bias term for that unit. The
numbers on the edges are the estimated weights.
Figure 1: Neural network.
Given a subsect x = (x1, x2, x3) with the observations x1 = 1, x2 = 1 and x3 = −4.
Suppose you are using the rectified activation function on all the hidden units. Calculate the
output of this network.
Question 5 (5 marks) - for ECON5403 students only
Let y1, y2, ..., y100 be a time series. The last three observations are y98 = 2, y99 = 1 and
y100 = 2. You use a simple recurrent neural network for forecasting
ht = σ(0.1yt + 0.1ht−1 − 0.5),
yt+1 = 1 + 2ht + ϵt+1.
4
where the ϵt are random error with mean 0, and σ(x)= 1/(1+e
−x) is the sigmoid function.
The forecast for the last time period is ŷ100=1.5. Compute the point forecast for y101.


essay、essay代写