HW 3-无代写
时间:2023-03-22
HW 3: Due March 7, 23:59:59
Problem 1
Grades on a standardized test are known to have a mean of 1000 in Australia. The test is adminis-
tered to 453 randomly selected students in NSW; in this sample, the mean is 1013 and the (sample)
standard deviation (SY ) is 108.
(1) Construct a 95% confidence interval for the average test score for NSW students.
(2) Suppose the constructed confidence interval contained the value 1000. Can you reject H0?
Suppose the constructed confidence interval did NOT contain the value 1000. Can you reject H0?
Give reasons for your answer.
(3) Based on your answer for (1) and (2), Is there statistically significant evidence, at 5% signifi-
cance level, that NSW students perform differently than other students in Australia?
(4) Construct a 99% confidence interval for the average test score for NSW students. Based on
this, is there statistically significant evidence, at 1% significance level, that NSW students perform
differently than other students in Australia?
1
Ans:
(1) The 95% confidence interval is found as {Y¯ − 1.96s.e.(Y¯ ), Y¯ + 1.96s.e.(Y¯ )}, where Y¯ is the
average test score. In this case:
1013± 1.96× 108√
453
(1)
gives a confidence interval (1003.05, 1022.95).
(2) Recall that the (1 − α)% C.I. is constructed as “set of values µY that are not rejected by a
hypothesis test with a α significance level.” Therefore, if 1000 is contained in this interval, it means
that a H0 : µY,0 = 1000 cannot be rejected. By symmetric arguments, if 1000 is outside of the C.I.,
the H0 can be rejected under a test with significance level α.
(3) Based on the C.I. found in (1), at the 5% level, we can reject the null that the average score
for NSW students is equal to the national average of 1000.
(4) At the 1% significance level, the CI is:
1013± 2.58× 108√
453
(2)
or (999.91, 1026.09).
At the 1% significance level, the value 1000 is just inside the C.I., and so we cannot reject the null
that NSW students perform the same, on average, as other students in Australia.
2
Problem 2
(SW 4.5) A researcher runs an experiment to measure the impact a short nap has on memory.
200 participants in the sample are allowed to take a short nap of either 60 minutes or 75 minutes.
After waking up, each of the participants takes a short test on short-term recall. Each participant
is randomly assigned one of the examination times, based on the flip of a coin. Let Yi denote the
number of points scored on the test by the ith participant (0 ≤ Yi ≤ 100), let Xi denote the amount
of time for which the participant slept prior to taking the test (Xi = 60 or 75), and consider the
regression model
Yi = b0 + b1Xi + ui
(1) Explain what the term ui represents. Why will different students have different values of ui?
(2) What is E[ui|Xi]? Are the estimated coefficients unbiased?
(3) What concerns might you have about ensuring compliance among participants?
(4) The estimated regression is
Yi = 55 + 0.17Xi.
a) Compute the estimated regression’s prediction for the average score of participants who slept
for 60 minutes before taking the test. Repeat for 75 minutes and 90 minutes.
b) Compute the estimated gain in score for a participant who is given an additional 5 minutes on
the exam.
3
Ans:
(1) ui can differ across students for a number of “omitted factors”: It may represent student’s
luck that day, health conditions, the student’s cognitive ability, amount of caffeine they took that
morning, side-effects from drugs they may have taken that day, etc. etc.
(2) The ‘flip of a coin’ is a random assignment, hence ui can be deemed independent of Xi. There-
fore, E[ui|Xi] = 0 should hold.
(3) That someone is assigned 60minutes or 75minutes does not mean it can be enforced. Some par-
ticipants may find if had to sleep for the whole 75minutes, even when have been assigned 75minutes.
Similarly, some participants may find it hard to fall asleep. Also, it may be difficult (or very costly)
to measure exactly when a participant falls asleep (measurement error).
(4)
a) 55 + 0.17× 60 = 65.2, 55 + 0.17× 75 = 67.75, 55 + 0.17× 90 = 70.3
b) 5× 0.17 = 0.85.
4
Problem 3
For the following problems, use calculus.
(1) Consider the following problem:
min
m
(m− 1)2
(This means you want to find the minimum of (m− 1)2 among all values of m.) What is the value
of m that minimizes (m− 1)2?
HINT: Try differentiating with respect to m, set it equal to 0, and then solve for m.
(2) Consider the following problem:
min
m
(m− 1)2 + (m− 2)2.
What is the value of m that minimizes (m− 1)2 + (m− 2)2?
HINT: Try differentiating with respect to m, set it equal to 0, and then solve for m.
(3) Consider the following problem:
min
m
n∑
i=1
(m− yi)2
What is the value of m that minimizes
∑n
i=1(m− yi)2?
HINT: Try differentiating with respect to m, set it equal to 0, and then solve for m.
For problems (4) and (5), consider the following problem:
min
β0,β1
n∑
i=1
(β0 + β1xi − yi)2
(4) Let f(β0, β1) =
∑n
i=1(β0 + β1xi − yi)2. Show that ∂f∂β0 = 0,
∂f
∂β1
= 0 yields:
5
nβ0 + β1
n∑
i=1
xi =
n∑
i=1
yi
β0
n∑
i=1
xi + β1
n∑
i=1
x2i =
n∑
i=1
xiyi.
(5) What is the value of β0 and β1 that minimizes
∑n
i=1(β0 + β1xi − yi)2
HINT: If you weren’t able to do (4), don’t worry about it. Just use the result, solve the system
of equations for β0 and β1. It may help to rewrite using
1
n
∑n
i=1 xi = x and
1
n
∑n
i=1 yi = y. Start
from β1 .
(6) Enjoy the fact that you have just derived OLS estimators with 1 regressor.
6
Ans:
(1) Following the hint, we get:
2(m− 1) = 0 ⇐⇒ m = 1.
(We note that the second derivative is positive (2 > 0), hence this delivers the minimum. Same for
the rest of the problem.)
(2) Similarly, we get
2(m− 1) + 2(m− 2) = 0 ⇐⇒ m = 3
2
.
(3) Similarly, we get
2
n∑
i=1
(m− yi) = 0 ⇐⇒ n×m =
n∑
i=1
yi ⇐⇒ m =
∑n
i=1 yi
n
= Y
(4) Follow similar procedure, but with respect to two parameters, β0 and β1.
∂f
∂β0
= 2
n∑
i=1
(β0 + β1xi − yi) = 0 ⇐⇒ nβ0 + β1
n∑
i=1
xi =
n∑
i=1
yi,
∂f
∂β1
= 2
n∑
i=1
xi(β0 + β1xi − yi) = 0 ⇐⇒ β0
n∑
i=1
xi + β1
n∑
i=1
x2i =
n∑
i=1
xiyi.
NOTE: These two equations are sometimes called “normal equations”.
(5) Rewriting using 1n
∑n
i=1 xi = x and
1
n
∑n
i=1 yi = y, the first equation in (4) becomes:
β0 = y − β1x.
Plug this into the second equation in (4) to get:
(y − β1x)
n∑
i=1
xi + β1
n∑
i=1
x2i =
n∑
i=1
xiyi ⇐⇒ β1
( n∑
i=1
x2i −
n∑
i=1
xix
)
=
n∑
i=1
xiyi −
n∑
i=1
xiy
⇐⇒ β1
n∑
i=1
xi(xi − x) =
n∑
i=1
xi(yi − y)
⇐⇒ β1 =
∑n
i=1 xi(yi − y)∑n
i=1 xi(xi − x)
⇐⇒ β1 =
∑n
i=1(xi − x)(yi − y)∑n
i=1(xi − x)2
=
SXY
S2X
7
The last line follows from the fact that x
∑n
i=1(yi − y) = 0 and x
∑n
i=1(xi − x) = 0.
Finally, plug this into β0 = y − β1x to get
β0 = y − x
∑n
i=1(xi − x)(yi − y)∑n
i=1(xi − x)2
.
(6) Those of you who were not able to do (5) completely can still find comfort in the fact that I
will NOT ask you to prove this directly on the midterm/final exams.
8
Problem 4
(1) Consider
uˆ =
1
n
n∑
i=1
uˆi.
Using the facts we learned in class, can you guess what value this should be? (There is no “right
answer”, just state your guess and reasons.)
(2) Recall the following equations, (from (4) above in the previous Problem) which are sometimes
called “normal equations”:
nβˆ0 + βˆ1
n∑
i=1
Xi =
n∑
i=1
Yi (3)
βˆ0
n∑
i=1
Xi + βˆ1
n∑
i=1
X2i =
n∑
i=1
XiYi. (4)
Use the (first) normal equation to evaluate the value of
uˆ =
1
n
n∑
i=1
uˆi.
HINT: What is uˆi? Can you write it out explicitly?
9
Ans:
(1) There is no right answer, but here is my guess:
- LLN says (in large samples, and if iid): sample mean → population mean.
- In similar vein, and loosely speaking, uˆ should be approximately similar to E[uˆ].
- If uˆ is a good guess for u, then E[uˆ] must be close to E[u]
- By LSA1 and LIE, E[u] should be 0.
- Hence, uˆ should be close to 0.
(2) Recall that
uˆi = Yi − Yˆi = Yi − (βˆ0 + βˆ1Xi)
Hence,
n∑
i=1
uˆi =
n∑
i=1
Yi − nβˆ0 − βˆ1
n∑
i=1
Xi
= 0 (∵ first normal equation)
Thus,
1
n
n∑
i=1
uˆi = 0.
10
essay、essay代写