You are on page 1of 1

American University of Beirut

Introduction to Analysis
STAT 235 – Spring 2022
Assignment 1 (due: Monday, February 7)

Problem 1 (Pressure vs. boiling point). Recall the Forbes’s data set discussed during the lecture (and in your
textbook). Repeat the experiment we did in class but using the model

log(pres) = β0 + β1 bp + error

suggested by Forbes’s theory. Namely,

(a) Plot the histograms of bp and log(pres).


(b) Make the scatter plot of log(pres) against bp.
(c) Use R to estimate the parameters β0 and β1 .
(d) Draw the derived line on top of the scatter plot.

(e) Using your model, what is the predicted value for the pressure if the boiling point is 207 ◦ F?
(f) Make the scatter plot of the residuals of log(pres) against bp.
(g) Summarize your observations at each step.

Problem 2 (Fertility vs. GDP). Problems 1.1 from Chapter 1 of the textbook.
Problem 3 (Smallmouth bass). Problems 1.2 from Chapter 1 of the textbook.
(optional) Problem 4 (Water runoff). Problems 1.5 from Chapter 1 of the textbook.
Problem 5 (Review: independent vs. uncorrelated). Find two random variables that are dependent but uncor-
related.
Problem 6 (Review: law of total variance). Verify that for every two random variables X and Y ,

Var[Y ] = E[Var[Y | X]] + Var[E[Y | X]] .

Recall: The notation E[Y | X] (the conditional expectation of Y given X) stands for the random variable f (X),
where f (x) := E[Y | X = x].
Problem 7 (Error in linear models). Let X and Y be two random variables, and assume that Var[Y | X = x] =
σ 2 is independent of x. Consider the general form of a linear model

Y = a + bX + ε

for predicting Y based on X, where a, b ∈ R and ε := Y − a − bX is the error. Prove that E[ε2 ] ≥ σ 2 with
equality if and only if E[ε | X = x] = 0 for every x.
Remark 1: This shows that the parameters derived based on the assumption E[ε | X = x] = 0 are “optimal”, in
the sense that they minimize the mean squared error E[ε2 ].
Remark 2: During the lecture, we already showed that E[ε2 ] ≥ σ 2 provided E[ε] = 0. It remains to show that
(1) the same holds if E[ε] 6= 0, and (2) the equality E[ε2 ] = σ 2 happens only if E[ε | X = x] = 0 for every x.

You might also like