midterm_review_session
.pdf
keyboard_arrow_up
School
Hong Kong Polytechnic University *
*We aren’t endorsed by this school
Course
273
Subject
Statistics
Date
Nov 24, 2024
Type
Pages
8
Uploaded by lixun73230
STAT 151A
Lab 7: Midterm Review Session
October 6, 2023
Note: there is no submission required for lab 7. This worksheet doesn’t include everything
you need to review for the midterm. Please see the midterm study guide posted on bCourses
for a more comprehensive list of concepts, examples and exercises.
1
Data transformation
Problem 1 Conceptual Review
(a) Why do we transform data?
(b) What is Box-Cox transformation on
X
?
(c) What
p
do you use to correct positive skewness (right skew)? What
p
do you use to
correct negative skewness (left skew)?
(d) A good transformation will make this ratio
UQ
−
M
M
−
LQ
close to 1.
(e) What is Tukey and Mosteller’s bulging rule and how to use it to correct monotone
non-linearity?
Problem 2 Excercise 4.1 - Fox
Creat a graph for the ordinary power transformations
X
→
X
p
for
p
=
−
1
,
0
,
1
,
2
,
3. (When
p
= 0, however, use the log transformation.) Compare the graph to Figure 4.1, and comment
on the similarities and differences between the two families of transformations
x
p
and (
x
p
−
1)
/p
.
1
STAT 151A
Lab 7: Midterm Review Session
October 6, 2023
2
Simple linear regression
Problem 3 SLR review
Consider simple linear regression
y
i
=
β
0
+
β
1
x
i
+
ϵ
i
.
(a) what are the assumptions?
(b) Derive the least squares estimates of
β
0
and
β
1
.
(c) Show that
ˆ
β
0
and
ˆ
β
1
are unbiased. What assumptions are used?
(d) Derive
var
(
ˆ
β
0
),
var
(
ˆ
β
1
) and
cov
(
ˆ
β
0
,
ˆ
β
1
). What assumptions are used?
(e) What is an unbiased estimator for
σ
2
?
Problem 4 TSS, RSS and
R
2
review
Consider simple linear regression
y
i
=
β
0
+
β
1
x
i
+
ϵ
i
under standard linear model assumptions:
(a) What is residual standard error and how to interpret it?
(b) What are total sum of squares, regression sum of squares, and residual sum of squares?
(c) Definition of R-squared and what does it represent?
Problem 5 (SP23 HW)
Consider simple linear regression where there is one response variable
y
and an explanatory
variable
x
and there are
n
subjects with values
y
1
,
·
, y
n
and
x
1
,
· · ·
, x
n
.
(a) What are the estimates for
α
0
and
α
1
if we regress
x
on
y
?
(b) Let
ˆ
β
0
and
ˆ
β
1
be the estimate from regressing
y
on
x
.
Intuition might suggest that
ˆ
α
1
= 1
/
ˆ
β
1
. Is this true?
Problem 6 Excercise 5.9
Show that in simple-regression analysis, the standardized slope coefficient
B
is equal to
the correlation coefficient
r
.
(In general, however, standardized slope coefficients are not
correlations and can be outside of the range [0, 1].)
2
STAT 151A
Lab 7: Midterm Review Session
October 6, 2023
3
Multiple regression
Problem 7 MR Review
Consider multiple regression
⃗
y
=
Xβ
+
⃗
ϵ
.
(a) what are the assumptions?
(b) Derive the least squares estimates of
β
.
(c) Show that
ˆ
β
is unbiased. What assumptions are used?
(d) Derive
cov
(
ˆ
β
). What assumptions are used?
(e) What is an unbiased estimator for
σ
2
?
Problem 8 Other concepts of MR
(a) what is adjusted R-squared? Why
R
2
can only rise?
(b) How do correlated variables impact the regression coefficient?
(c) What are the standardized coefficient and how to interpret them?
Problem 9 True/False (Past midterm)
(a)
R
2
is an effective model selection criterion for deciding the best size for a linear model.
(b) If I assume the data-generating process is
⃗
y
=
Xβ
+
⃗
ϵ
with full rank matrix
X
treated
as fixed, then the following is true:
arg min
||
Xβ
−
⃗
y
||
2
2
= (
X
T
X
)
−
1
X
T
⃗
y
regardless of the distribution of
ϵ
.
(c) The R-squared summary output will always increase if I add more covariates to the
regression.
Problem 10 SP23 midterm
In many data analyses,
⃗
y
observations are collected from various sensors with different mea-
surement variabilities. Let’s say that I know the variability of each sensor such that I can
safely assume the following model:
3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
STAT 151A
Lab 7: Midterm Review Session
October 6, 2023
⃗
y
=
Xβ
+
⃗
ϵ,
⃗
ϵ
∼
N
(0
, σ
2
w
2
1
0
· · ·
0
0
w
2
2
· · ·
0
.
.
.
.
.
.
0
0
0
· · ·
w
2
n
)
(a) What is the solution (call this
ˆ
β
OLS
) to the following optimization problem:
arg min
||
Xβ
−
⃗
y
||
2
2
(b) Let
⃗w
=
w
1
w
2
.
.
.
w
n
.
Show the following
V ar
(
ˆ
β
OLS
) =
σ
2
(
X
T
X
)
−
1
X
T
⃗w ⃗w
T
X
(
X
T
X
)
−
1
(c) Let
⃗w ⃗w
T
=
W
, and note
W
−
1
=
1
/w
1
1
/w
2
· · ·
1
/w
n
1
/w
1
1
/w
2
.
.
.
1
/w
n
.
Consider the
transformed model:
W
−
1
/
2
⃗
y
=
W
−
1
/
2
Xβ
+
W
−
1
/
2
⃗
ϵ
Show that the least square estimator (call this
ˆ
β
WLS
) for model above is
ˆ
β
WLS
= (
X
T
W
−
1
X
)
−
1
X
T
W
−
1
⃗
y
(d) Show that
ˆ
β
WLS
is unbiased for
β
.
(e) Compute variance of
ˆ
β
WLS
as an expression involving one instance of each of the fol-
lowing:
X, X
T
, W
−
1
, σ
2
.
Problem 11 Partial coefficient - FWL theorem
(a) How to compute partial coefficient and its standard error?
(b) What is the variance-inflation factor and how does it relate to the coefficient variance?
4
STAT 151A
Lab 7: Midterm Review Session
October 6, 2023
4
Geometry and matrix form of linear models
Problem 12 Gram-Schmidt (SP23 practice midterm)
Consider running a multiple linear regression of ˆ
y
on
X
= [
⃗
1
⃗x
⃗x
2
]
,
where
⃗x
2
is a vector of the squared corresponding elements of
⃗x
, and the elements of
⃗x
are
larger than 10.
(a) Is there a unique solution to the following optimization problem? Explain why or why
not.
(b) Find an orthogonal basis for
X
.
(c) Write the OLS predictions, ˆ
y
, as a function of the orthogonal basis in (b). No need to
fully simplify.
Problem 13 Hat matrix (SP23 practice midterm)
In this problem we will analyze some properties of the ”hat matrix” from the linear model.
Specifically, consider the multiple linear regression model
⃗
y
=
X
⃗
β
+
⃗
ϵ
, with
⃗
ϵ
∼
N
(0
, σ
2
I
).
Recall the hat matrix is defined as:
H
=
X
(
X
T
X
)
−
1
X
T
,
where
X
∈
R
n
×
(
p
+1)
is full column rank.
(a) Consider the predicted values ˆ
y
=
X
ˆ
β
. Show that ˆ
y
has variance
σ
2
H
.
(b) Let
⃗e
=
⃗
y
−
ˆ
y
. Show that
⃗e
= (
I
−
H
)
⃗
y
.
(c) Show that (
I
−
H
) is symmetric and idempotent.
(d) Show that
var
(
⃗e
) =
σ
2
(
I
−
H
).
(e) Show that
ˆ
β
and
⃗e
are independent.
5
Sample dataset questions
Problem 14 Modeling Sugar Cane Production (SP23 midterm)
Suppose you have been hired as a consultant by the sugar company that operates these
sugarcane fields. Your job is to build a linear model to predict the sugarcane production in
tons per hectare. You are provided a dataset with columns:
5
STAT 151A
Lab 7: Midterm Review Session
October 6, 2023
•
Region: region (defined by physical position and average rainfall) in which each paddock
is located.
•
Position:
geographic position of each paddock in the general area according to the
compass directions (E = east, W = west, N = north, S = south, C = central).
•
Area: size of the paddock in hectares.
•
Age: years elapsed since the paddock was plowed out and planted with new sugarcane
seeds.
•
HarvestMonth: month of the year in which the harvest took place (1 = January, 2 =
February, etc.).
•
HarvestDuration: time taken to harvest the sugarcane in days.
•
Tonn.Hect: tons per hectare of sugarcane produced by this paddock.
•
Rainfall.96: Total rainfall for the district from July 1996 through December 1996 (mil-
limeters).
(a) Which variable is your response variable. Which variables are continuous/categorical?
(b) You plot the distribution for Tonn.Hect.
How would you describe the spread of the
variable. For the purposes of your model, would you transform this variable, and if yes,
how so?
6
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
STAT 151A
Lab 7: Midterm Review Session
October 6, 2023
(c) You create the following correlation matrix.
Based on the following correlations, in a linear regression model where Tonn.Hect is
the response variable, how would the covariates Age and HarvestDuration impact the
coefficient of Area?
(d) HarvestMonth can be used as a continuous or categorical variable for our model. What
are some drawbacks of using HarvestMonth as continuous over categorical?
This question is a little beyond the scope of this midterm.
So here is the solution if
you’re curious:
Categorical variable captures non-linear relationship between variable and response (i.e
if there is a difference in re- sponse variable between various months).
Additionally,
treating Month as continuous us uninterpretable, as our model will con- sider non-
integer values for Month.
(e) You fit the following linear model, and the R summary is as follows:
Tonn.Hect
∼
Area
+
HarvestMonth
+
Position
+
Region
+
Rainfall.
96
7
STAT 151A
Lab 7: Midterm Review Session
October 6, 2023
Based on this output, is it safe to assume that Region is unimportant to our model due
to most of the categories having a low t-value? Explain your reasoning.
This question is a little beyond the scope of this midterm.
So here is the solution if
you’re curious:
No, we cannot look at the individual t-values of each category to make an overall claim
about the entire variable. We would need to use an F-test where we test the significance
of all categories together.
Problem 15 Model diagnostic (SP23 practice exam)
Below are the residual vs. fitted plot and the Q-Q plot from a model. Describe what
problems you see, if any, in the assumptions of the model. If you see problems in these
diagnostic plots, describe what you might suggest to get an improved regression model.
8
Related Questions
geBoard
Consumable Student Editic
Name: tyr poPrsrey Class:
Date:
Version: J
Algebra I EOC Review #3 WS Due 4-15-21(ALL WORK MUST BE SHOWN) In-person must
get approved by teacher before submitting in Classroom. Online may submit, then resubmit onc
Must show all work or explain steps(in detail) to receive any credit.
1. The data set shows the amount of funds raised and the number of participants in the fundraiser at the Family
House organization branches. Use a graphing calculator to find and graph an equation of the least-squares line
the data.(Linear Regression)
Family House Fundraiser
# of participants
Funds raised (S)
10
15
20
25
13
15
18
490 500 | 550 570 630 520 550 560
Yünu'a fomihy is staving at a campground th
arrow_forward
02-3 data visualalizations HW#3b F21-1. video tutorial
arrow_forward
The Ministry of Tourism in Trinidad and Tobago is interested in developing a campaign to increase the number of visitors to the island. The Ministry in collaboration with the island’s hotels collected data to be used as a guide to determine what steps should be taken going forward. Using the data in the Microsoft Excel file attached you are required to use the knowledge you have acquired during the semester to answer the following question. Ensure that your responses are detailed and all the necessary steps are clearly outlined.
Derive a model for the estimation of the probability of returning to the island from the average money spent during the visit.
Discuss why regression analysis is important in decision-making.
arrow_forward
P Do Homework - Section 5.2 Homework - Google Chrome
A mathxl.com/Student/PlayerHomework.aspx?homeworkld=5868461298&questionld=9&flushed%3Dtrue&cld%3D6341632¢erwi.
Fernando Roblero & | 02/17/21 9:53 PM
MS 205 DE Introduction to Statistics Spring 2021
Homework: Section 5.2 Homework
Save
Score: 0 of 1 pt
9 of 20 (19 complete)
HW Score: 90%, 18 of 20 pts
5.2.24-E
Question Help ▼
Assume that when adults with smartphones are randomly selected, 59% use them in meetings or classes. If 15 adult smartphone users
are randomly selected, find the probability that fewer than 5 of them use their smartphones in meetings or classes.
The probability is
(Type an integer or decimal rounded to four decimal places as needed.)
Enter your answer in the answer box and then click Check Answer
arrow_forward
P Do Homework - Getting Started: Math Review - Google Chrome
A mathxl.com/Student/PlayerHomework.aspx?homeworkld%3D611294897&questionld%3D9&flushed%=true&cld%3D6721186¢erwin=Dyes
ITMG 1B Econ 2100
E Homework: Getting Started: Math Review
Question 4, 2.4 Study Ex...
HW Score: 2.82%, 2 of 7
Part 1 of 8
O Points: 0 of 10
The following questions refer to a coordinate graph with the variable X on the horizontal axis and the variable Y on the vertical axis. Complete parts (a) through (h).
a. If two points on a line are (X = 4, Y = 3) and (X= 12, Y = 5), what is the slope of the line?
The slope of the line is (Enter your response as an integer or a fraction. Simplify your answer.)
Grapher
Get More Help-
e Text Pages
99+
here to search
arrow_forward
Answer the exercise of the image.
(In the other image are the final answers, this to verify the final answer).
arrow_forward
X
Document1 - Word
AutoSave
evie tucker
Off
ЕT
Design
References
Mailings
Review
View
Search
Share
File
Help
Comments
Home
Insert
Draw
Layout
-5
3 3
Compute det (A- B) c)
2. Let A =
В -
C =
2 -3
3 4
(Ctrl)
O words
DFocus
Page 1 of 1
100%
1:07 PM
a
Type here to search
11
10/16/2019
arrow_forward
AutoSave On
Assignment 1 in Excel_Updated January 17^J 2021 (1) - Saved -
O Search
ysnsjj njkbj YN
困
File
Home
Insert
Page Layout
Formulas
Data
Review
View
Help
A Share
P Comments
LO Shapes
A SmartArt
A Get Add-ins
de
시
Icons
O. Screenshot v
PivotTable Recommended Table
Pictures
Recommended
Maps PivotChart
3D
Line Column Win/
Slicer Timeline
Link
Comment
Text
Symbols
O 3D Models v
O My Add-ins v
PivotTables
Charts
Мар
Los
Tables
Illustrations
Add-ins
Charts
Tours
Sparklines
Filters
Links
Comments
H199
fx
1/36
A
В
C
E
F
G
H
J
K
M
200
201
202
|5층 53
203
204
205
206
207
208
V205.9225
209
1!
210
211
212
V1.15
213
214
(round to 4 decimal places)
11
215
216
217
218
-12
(1+0.045)2 (round to 4 decimal
places)
219
220
11
221
222
223
224
225
Q8: Compute the following
CLR 2- Obj. 4
L3
Instructions
Questions 1-11
Enter
100%
7:40 PM
O Type here to search
日
a 4) ENG
2/3/2021
arrow_forward
Wanting to study the effect of exercise on preventing the common cold, a researcher collects 500 test subjects and randomly assigns them to a treatment group instructed to exercise and a control group instructed to not exercise. He later records the number of colds for each group. This is an example of:
linear regression
an experiment
an observational study
independence
arrow_forward
actice
Assignment
Gradebook
nment
FULL SCREEN
PRINTER VERSION
4 ВАСK
Game Show Prizes
NEXT
On the television game show Deal or No Deal, a contestant chooses from among 26 suitcases, each of which contains a dollar amount. Those 26 amounts (in order) are given below.
0.01
300
75,000
1
400
100,000
500
200,000
10
750
300,000
25
1000
400,000
50
5000
500,000
75
10,000
750,000
100
25,000
1,000,000
200
50,000
If one of these 26 prizes is selected at random (so that all 26 prizes are equally likely), the expected value of these prize amounts is equal to this mean: $131,478
131 A78
acy Policy I 2000-2020 John Wiley & Sons, Inc. All Rights Reserved. A Division of John Wiley & Sons, Inc.
Version 4.24.20.1
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:9781133382119
Author:Swokowski
Publisher:Cengage
Big Ideas Math A Bridge To Success Algebra 1: Stu...
Algebra
ISBN:9781680331141
Author:HOUGHTON MIFFLIN HARCOURT
Publisher:Houghton Mifflin Harcourt
Related Questions
- geBoard Consumable Student Editic Name: tyr poPrsrey Class: Date: Version: J Algebra I EOC Review #3 WS Due 4-15-21(ALL WORK MUST BE SHOWN) In-person must get approved by teacher before submitting in Classroom. Online may submit, then resubmit onc Must show all work or explain steps(in detail) to receive any credit. 1. The data set shows the amount of funds raised and the number of participants in the fundraiser at the Family House organization branches. Use a graphing calculator to find and graph an equation of the least-squares line the data.(Linear Regression) Family House Fundraiser # of participants Funds raised (S) 10 15 20 25 13 15 18 490 500 | 550 570 630 520 550 560 Yünu'a fomihy is staving at a campground tharrow_forward02-3 data visualalizations HW#3b F21-1. video tutorialarrow_forwardThe Ministry of Tourism in Trinidad and Tobago is interested in developing a campaign to increase the number of visitors to the island. The Ministry in collaboration with the island’s hotels collected data to be used as a guide to determine what steps should be taken going forward. Using the data in the Microsoft Excel file attached you are required to use the knowledge you have acquired during the semester to answer the following question. Ensure that your responses are detailed and all the necessary steps are clearly outlined. Derive a model for the estimation of the probability of returning to the island from the average money spent during the visit. Discuss why regression analysis is important in decision-making.arrow_forward
- P Do Homework - Section 5.2 Homework - Google Chrome A mathxl.com/Student/PlayerHomework.aspx?homeworkld=5868461298&questionld=9&flushed%3Dtrue&cld%3D6341632¢erwi. Fernando Roblero & | 02/17/21 9:53 PM MS 205 DE Introduction to Statistics Spring 2021 Homework: Section 5.2 Homework Save Score: 0 of 1 pt 9 of 20 (19 complete) HW Score: 90%, 18 of 20 pts 5.2.24-E Question Help ▼ Assume that when adults with smartphones are randomly selected, 59% use them in meetings or classes. If 15 adult smartphone users are randomly selected, find the probability that fewer than 5 of them use their smartphones in meetings or classes. The probability is (Type an integer or decimal rounded to four decimal places as needed.) Enter your answer in the answer box and then click Check Answerarrow_forwardP Do Homework - Getting Started: Math Review - Google Chrome A mathxl.com/Student/PlayerHomework.aspx?homeworkld%3D611294897&questionld%3D9&flushed%=true&cld%3D6721186¢erwin=Dyes ITMG 1B Econ 2100 E Homework: Getting Started: Math Review Question 4, 2.4 Study Ex... HW Score: 2.82%, 2 of 7 Part 1 of 8 O Points: 0 of 10 The following questions refer to a coordinate graph with the variable X on the horizontal axis and the variable Y on the vertical axis. Complete parts (a) through (h). a. If two points on a line are (X = 4, Y = 3) and (X= 12, Y = 5), what is the slope of the line? The slope of the line is (Enter your response as an integer or a fraction. Simplify your answer.) Grapher Get More Help- e Text Pages 99+ here to searcharrow_forwardAnswer the exercise of the image. (In the other image are the final answers, this to verify the final answer).arrow_forward
- X Document1 - Word AutoSave evie tucker Off ЕT Design References Mailings Review View Search Share File Help Comments Home Insert Draw Layout -5 3 3 Compute det (A- B) c) 2. Let A = В - C = 2 -3 3 4 (Ctrl) O words DFocus Page 1 of 1 100% 1:07 PM a Type here to search 11 10/16/2019arrow_forwardAutoSave On Assignment 1 in Excel_Updated January 17^J 2021 (1) - Saved - O Search ysnsjj njkbj YN 困 File Home Insert Page Layout Formulas Data Review View Help A Share P Comments LO Shapes A SmartArt A Get Add-ins de 시 Icons O. Screenshot v PivotTable Recommended Table Pictures Recommended Maps PivotChart 3D Line Column Win/ Slicer Timeline Link Comment Text Symbols O 3D Models v O My Add-ins v PivotTables Charts Мар Los Tables Illustrations Add-ins Charts Tours Sparklines Filters Links Comments H199 fx 1/36 A В C E F G H J K M 200 201 202 |5층 53 203 204 205 206 207 208 V205.9225 209 1! 210 211 212 V1.15 213 214 (round to 4 decimal places) 11 215 216 217 218 -12 (1+0.045)2 (round to 4 decimal places) 219 220 11 221 222 223 224 225 Q8: Compute the following CLR 2- Obj. 4 L3 Instructions Questions 1-11 Enter 100% 7:40 PM O Type here to search 日 a 4) ENG 2/3/2021arrow_forwardWanting to study the effect of exercise on preventing the common cold, a researcher collects 500 test subjects and randomly assigns them to a treatment group instructed to exercise and a control group instructed to not exercise. He later records the number of colds for each group. This is an example of: linear regression an experiment an observational study independencearrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Algebra & Trigonometry with Analytic GeometryAlgebraISBN:9781133382119Author:SwokowskiPublisher:CengageBig Ideas Math A Bridge To Success Algebra 1: Stu...AlgebraISBN:9781680331141Author:HOUGHTON MIFFLIN HARCOURTPublisher:Houghton Mifflin Harcourt
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:9781133382119
Author:Swokowski
Publisher:Cengage
Big Ideas Math A Bridge To Success Algebra 1: Stu...
Algebra
ISBN:9781680331141
Author:HOUGHTON MIFFLIN HARCOURT
Publisher:Houghton Mifflin Harcourt