Job equation

Take-home examination for Econ 140A, Summer 2020, Week 2
• Your answers should be submitted in a single pdf document on GauchoSpace.
• You may either type or handwrite your answers, or some combination if you like. You
can take pictures of your handwritten responses, then include them in the single pdf
document that you submit. Regardless of what you decide, it is important that your
answers are as clear as possible. Your answers should appear in the order in which the
questions are asked. Please review your answers before submitting them to confirm that
they are easily readable.
• Be sure that you explicitly answer each question and explain each step, as if you were
writing solutions so that another student in the class would be able to follow your
thoughts. Part of your grade will depend on explaining each step of your answers.

  1. (10 points) Table 1 presents data on number of interviews (X) and number of job offers
    (Y ) for 15 job seekers.
    Table 1: Responses by sampled job seekers
    Job Seeker (k) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
    Interviews (Xi) 3 5 1 4 6 10 0 11 4 6 7 7 6 3 4
    Job Offers (Yi) 0 2 1 2 2 8 1 1 4 5 3 8 4 5 2
    (a) (1 point) You want to make a prediction of the number of job offers as a function
    of the number of interviews, Yi = f(Xi). In particular, you want to make a linear
    prediction of the number of job offers, i.e., f(Xi) = aXi
    . If a = 0.8, what is the
    average squared prediction error, i.e., 1
    n
    Pn
    i=1(Yi − aXi)
    2
    ?
    (b) (1 point) If a = 1, what is the average squared prediction error, i.e., 1
    n
    Pn
    i=1(Yi −
    aXi)
    2
    ? Using your answer to questions (a) and (b), which value of a is a better
    adjustment in terms of the average squared prediction error, a = 0.8 or a = 1?
    (c) (1 point) One of your friends suggests that you should compute the regression
    estimator of a, namely αˆ =
    Pn
    Pi=1 XiYi
    n
    i=1 X2
    i
    , to find the best linear predictor of the
    number of job offers. Calculate αˆ.
    (d) (1 point) What is the average squared prediction error of the regression estimator
    αˆ, i.e., 1
    n
    Pn
    i=1(Yi − αXˆ i)
    2
    . Compare your answer to the answers to questions (a)
    and (b).
    (e) (1 point) Calculate the average prediction error 1
    n
    Pn
    i=1(Yi − αXˆ i). Calculate
    1
    n
    Pn
    i=1 Xi(Yi − αXˆ i).
    (f) (2 points) Prove that 1
    n
    Pn
    i=1 Xi(Yi − αXˆ i) = 0 in general.
    (g) (1 point) Make a scatter plot using the data from Table 1 where the number of
    interviews is in the x axis and the number of job offers is in the y axis. Add a line
    representing the best linear predictor, i.e., αXˆ i
    .
    (h) (1 point) If you would like to make a prediction for a job seeker that had 8 interviews, how many job offers would you expect the job seeker to have?
    (i) (1 point) Calculate the R2 of your prediction, i.e., R2 = 1 −
    Pn
    i=1(Yi−αXˆ i)
    2
    Pn
    i=1(Yi−Y )
    2
    , where
    Y =
    1
    n
    Pn
    i=1 Yi
    .
  2. Use the information on Table 1 to solve the following questions.
    (a) (1 point) You want to make a prediction of the number of job offers as a function
    of the number of interviews, Yi = f(Xi). In particular, you want to make an affine
    prediction of the number of job offers, i.e., f(Xi) = b0+b1Xi
    . If b0 = 1 and b1 = 0.2,
    what is the average squared prediction error, i.e., 1
    n
    Pn
    i=1(Yi − b0 − b1Xi)
    2
    ?
    (b) (1 point) If b0 = 0.5 and b1 = 0.8, what is the average squared prediction error,
    i.e., 1
    n
    Pn
    i=1(Yi − b0 − b1Xi)
    2
    ? Using your answer to questions 2(a) and 2(b),
    which values of b0 and b1 are a better adjustment in terms of the average squared
    prediction error, (b0, b1) = (1, 0.2) or (b0, b1) = (0.5, 0.8)?
    (c) (1 point) One of your friends suggests that you should estimate the OLS regression
    function coefficients of b0 and b1, namely βˆ
    0 = Y −βˆ
    1X and βˆ
    1 =
    Pn
    i=1(Xi−X)(Yi−Y )
    Pn
    i=1(Xi−X)
    2
    where X =
    1
    n
    Pn
    i=1 Xi and Y =
    1
    n
    Pn
    i=1 Yi
    , to find the best linear predictor of the
    number of job offers. Calculate βˆ
    0 and βˆ
    1.
    (d) (1 point) What is the average squared prediction error of the OLS regression function, i.e., 1
    n
    Pn
    i=1(Yi−βˆ
    0−βˆ
    1Xi)
    2
    . Compare your answer to the answers to questions
    2(a) and 2(b).
    (e) (1 point) Calculate the average prediction error 1
    n
    Pn
    i=1(Yi − βˆ
    0 − βˆ
    1Xi). Do you
    find this result intuitive? Why?
    (f) (1 point) Prove that 1
    n
    Pn
    i=1(Yi − βˆ
    0 − βˆ
    1Xi) = 0 in general.
    (g) (2 points) Prove that 1
    n
    Pn
    i=1 Xi(Yi − βˆ
    0 − βˆ
    1Xi) = 0 in general. Show that that
    equality approximately holds using the data from Table 1.
    (h) (2 points) Make a scatter plot using the data from Table 1 where the number of
    interviews is in the x axis and the number of job offers is in the y axis. Add a line
    representing the OLS linear predictor, i.e., βˆ
    0 + βˆ
    1Xi
    .
    (i) (2 points) Calculate the R2 of the regression, i.e., R2 = 1 −
    Pn
    i=1(Yi−βˆ
    0−βˆ
    1Xi)
    2
    Pn
    i=1(Yi−Y )
    2
    ,
    where Y =
    1
    n
    Pn
    i=1 Yi
    .
    (j) (2 points) Compare your answers to questions 1(i) and 2(i). What method is better?
    Discuss in no more than five lines.
    Page 2
    (k) (2 points) Cathy who works at the Job Opportunities Office says “everyone of our
    job seekers receives no job offer if the job seeker has no interviews, but for each
    additional interview the job seeker receives 0.8 job offers on average.” Comment on
    her statement based on your answer to question 2(c).
    (l) (2 points) Your friend Paul, who took Econ 140A last year, says that you should
    run a hypothesis test to evaluate Cathy’s statement. If the null hypothesis is that
    β1 = 0.8 versus the alternative that β1 6= 0.8, can you reject a 5% level test?
    Clearly state the standard error of βˆ
    1, the test statistic, and the critical value.
    (Hint: the standard error is s.e.(βˆ
    1) = √σˆ
    nS2
    X
    where σˆ
    2 =
    Pn
    i=1(Yi−βˆ
    0−βˆ
    1Xi)
    2
    n−1
    and
    S
    2
    X =
    Pn
    i=1(Xi−X)
    2
    n
    .)
    (m) (2 points) Construct a 95% confidence interval for β1. Interpret this confidence
    interval in no more than five lines. Would you argue in favor or against Cathy’s
    statement?

This question has been answered.

Get Answer