Homework 2 Solutions
#2.1 a
Since the 95% confidence interval for 1 does not include 0, then we would reject 0 : 1 = 0 at the 0.05
significance level. So the students conclusion is warranted.
#2.4
a)
>
>
>
>
>
>
>
data = read.table("CH02PR04.txt", header
1
05/09/14
"Models should be as simple as possible, but not more so." -Albert Einstein
Mallows Criteria
Clarification on the
- represents the true mean of .
- represents the fitted value for the model with a subset of
We are interested in the bias:
This r
1
05/02/14
"Youve never heard of the Millennium Falcon? its the ship that made the Kessel run in less
than 12 parsecs. - Han Solo
7.1 Extra Sums of Sguares
For multiple regression, we want to know how much or a Fahd) in 555
when one or several M; are a
1
05/09/14
"Models should be as simple as possible, but not more so." -A|bert Einstein
Mal/ows Cp Criteria
Clarification on the we d'f
[45 - represents the true mean of Yi.
9- - represents the fitted value for the model with a subset of XI;
9 14¢ MC
1
05/12/14
To understand Gods thoughts, we must study statistics, for these are the measure of his
purpose. -F|orence Nightingale
2014 OS 09 Best Subsets Model.R
Stepwise Regression
The best subsets regression algorithm produces 1 Act/Jo «F "Ami " page
1
05/14/14
"I hear the jurys still out on science." -Gob Bluth
Review of Model Selection
Before we started Chapter 9, we discussed e exuq ;M5- 0; MM;
Moi Ht For?!" F'- 1561+.
We also noted that the t-test for testing
H6: 8 = 0
Ha - g 40
is related to
Ttv -
IS ' Jets] 1 1 o b - .' 1C (0 '_ '0
52m: /2 e es J
1 =.+ x- +
.5 ~3=0 o"( ~04
St la?
5
"X . fchEJ J (Au-m (o If s
- A + fr -Hl re, 413'}. 1c 7-?
Eff-k . + 0- Y' =04
" Ui'f Jo' *I. - J - ersmTP
I A
*ka "ML - We: arm
"ver-Hr! o4: qur+ e PM
data = read.table("Toluca.txt", header=T)
attach(data)
line = lm(work_hrs~lot_size)
# the anova table is found using the anova function
anova(line)
# The F distribution
# You can obtain the F distribution in R by using the df function
# We first need to o
data = read.table("dwaine.txt", header = T)
attach(data)
line = lm(sales~young + income)
line
#coefficient of multiple determination
summary(line)
#for this case R-squared is 0.9167
#the adjusted R-squared is 0.9075
#confidence interval for single beta
#N
1
04/28/14
"The man who does not read has no advantage over the man who cannot read.
- Mark Twain
2.10 Considerations in Applying Regression Analysis
Before moving to multiple regression (Ch 6) we discuss some cautions about implementing
regression ana
Homework:
All homework assignments are assigned on Wednesday and are due the following Wednesday. See the
file named Homework Example on SmartSite to see how your homework should look.
H
W
1
2
3
Assigne
d
4/9
4/16
4
5
6
4/30
5/7
5/14
Problems
Due
1.5 1.6(
Homework:
All homework assignments are assigned on Wednesday and are due the following Wednesday. See the
file named Homework Example on SmartSite to see how your homework should look.
H
W
1
2
3
Assigne
d
4/9
4/16
4
4/30
Problems
Due
1.5 1.6(b) 1.16 1.20
Homework Example
Use this worked homework problem as an example for how you should do your homework. It is
preferred that your homework be typed. However, if you work the problems out by hand, then
staple the printout of your R commands and output to the
Homework 5 Solutions
Problem 6.16
Part a)
>
>
>
>
dat = read.table("CH06PR16.txt", header=T)
attach(dat)
fit = lm(y~x1+x2+x3)
summary(fit)
Call:
lm(formula = y ~ x1 + x2 + x3)
Residuals:
Min
1Q
-18.3524 -6.4230
Median
0.5196
3Q
8.3715
Max
17.1601
Coeffici
1
04/02/14
"Statistical thinking will one day be as necessary for efficient citizenship as the ability to
read and write."
-H.G. Wells
Simple Linear Regression Model
Suppose for random variable
variable
the population mean changes based on another
Lets ca
l
W
04/11/14
"If you want to inspire confidence, give plenty of statistics. It does not matter that they should
be accurate, or even intelligible, as long as there is enough of them. -Lewis Carroll
2.2 Inferences Concerning the Intercept
As we did with
1
04/25/14
Back off, man. Im a scientist. Peter Venkman
2.7 Analysis of Variance Approach to Regression Analysis
The
approach is a different perspective of regression analysis.
For
do anything new.
regression, the ANOVA approach does not allow us to
The A