MATH 402 - LINEAR REGRESSION -
Inference in Linear Regression
Question Bank - Set 4
Liberty University
Question 1
Question
Let Ybe a random variable representing the test scores of students, and let
Xbe a random variable representing the number of hours spent studying. A
linear regression model predicts that E(Y|X) = 75 + 2X. Suppose that the
residuals from this regression model are normally distributed with a mean of 0
and a variance of 4. If a student studies for 10 hours, what is the probability
that their test score will be between 90 and 95?
Solution
Step 1: Find the expected value and variance of the test scores when X= 10.
The expected value of Ywhen X= 10 is:
E(Y|X= 10) = 75 + 2 ×10 = 95
The variance of the residuals is given as 4, so the variance of Ywhen X= 10
is also 4.
Step 2: Convert the problem into a standard normal distribution. Define
Z=Y−95
√4which is standard normally distributed (µ= 0,σ= 1). We want
to find P(90 < Y < 95) which is equivalent to P90−95
2<Y−95
2<95−95
2or
P(−2.5< Z < 0).
Step 3: Find the z-scores for -2.5 and 0. Using a standard normal table, we
find that P(Z < −2.5) ≈0.0062 and P(Z < 0) = 0.5.
Step 4: Calculate the probability that the test score is between 90 and 95.
The probability that the test score is between 90 and 95 is:
P(−2.5< Z < 0) = P(Z < 0) −P(Z < −2.5) = 0.5−0.0062 = 0.4938
Therefore, there is a 49.38
Question 2
Question
Suppose we have a dataset with 100 observations where the response variable
Yand predictor variable Xare related by the linear regression model Y=
β0+β1X+ε, where εis the error term. We fit the model and obtain the
following results:
ˆ
β0= 5.2,ˆ
β1= 2.3, SE(ˆ
β1) = 0.4
Assuming that the standard errors of the estimated coefficients are correct, test
at the 5
Solution
Step 1: State the null and alternative hypotheses. The null hypothesis (H0)
states that there is no linear relationship between Xand Y, meaning β1= 0.
The alternative hypothesis (Ha) states that there is a linear relationship between
Xand Y, meaning β1= 0.
Step 2: Calculate the test statistic. The test statistic for testing the slope
coefficient β1is given by
t=ˆ
β1
SE(ˆ
β1)
Step 3: Determine the critical value. Since we are testing at the 5
Step 4: Make a decision. If the test statistic falls within the critical values,
we reject the null hypothesis. If it falls outside the critical values, we fail to
reject the null hypothesis.
Step 5: Calculate the test statistic:
t=2.3
0.4= 5.75
Step 6: Make a decision. Since the test statistic 5.75 falls outside the critical
values of -2.364 and 2.364, we reject the null hypothesis.
Step 7: Conclusion. There is enough evidence to conclude that there is a
linear relationship between the predictor variable Xand the response variable
Yat the 5
Question 4
Question
Consider a linear regression model with one predictor variable:
Y=β0+β1X+ϵ
2
where ϵ∼N(0, σ2). Suppose we have the following data:
X Y
1 3
2 5
3 6
4 8
Perform a hypothesis test at level α= 0.05 to determine if the slope of the
regression line is significantly different from zero. State the null and alternative
hypotheses, calculate the test statistic, and determine the conclusion of the test.
Solution
Step 1: Formulate the hypotheses
The null hypothesis H0and the alternative hypothesis H1are as follows: -
H0:β1= 0 (The slope of the regression line is not significantly different from
zero) - H1:β1= 0 (The slope of the regression line is significantly different
from zero)
Step 2: Calculate the test statistic
The test statistic for testing the slope of the regression line is given by:
t=b1
SE(b1)
where b1is the estimated slope coefficient and SE(b1)is the standard error of
the slope coefficient.
To calculate b1, first compute the sample means ¯
Xand ¯
Y:
¯
X=1+2+3+4
4= 2.5
¯
Y=3+5+6+8
4= 5.5
Then, compute the sample covariance SXY and sample variance S2
X:
SXY =Pn
i=1(Xi−¯
X)(Yi−¯
Y)
n−1=(1 −2.5)(3 −5.5) + (2 −2.5)(5 −5.5) + (3 −2.5)(6 −5.5) + (4 −2.5)(8 −5.5)
3= 2.25
S2
X=Pn
i=1(Xi−¯
X)2
n−1=(1 −2.5)2+ (2 −2.5)2+ (3 −2.5)2+ (4 −2.5)2
3= 1.25
Now, we can calculate the estimated slope coefficient b1:
b1=SXY
S2
X
=2.25
1.25 = 1.8
Next, calculate the standard error of the slope coefficient SE(b1):
SE(b1) = sMSE
S2
X
3
where MSE is the mean squared error (residual variance) and is given by:
MSE =Pn
i=1(Yi−ˆ
Yi)2
n−2
and the predicted values ˆ
Yiare obtained from the regression model.
Step 3: Make a decision
Using the calculated values and the test statistic formula, we find the test
statistic:
t=1.8
SE(b1)
We can compare this value to the critical values of the t-distribution with
n−2 = 2 degrees of freedom at α= 0.05 to make a decision about whether to
reject the null hypothesis or not.
Question 5
Question
Let Ybe a response variable and Xbe a predictor variable in a linear regression
model. Suppose the least squares regression line is given by ˆ
Y= 5 + 3X. If the
residual standard error is found to be 4.2, can we conclude that the regression
line is a good fit for the data at the 5
Solution
Step 1: State the null and alternative hypotheses. - Null hypothesis (H0): The
regression line is not a good fit for the data. - Alternative hypothesis (HA):
The regression line is a good fit for the data.
Step 2: Calculate the test statistic. The test statistic is given by:
t=b1
SE(b1)
where b1is the coefficient of the predictor variable in the regression model and
SE(b1)is the standard error of the coefficient.
In this case, b1= 3 and the standard error is equal to the residual standard
error, SE(b1) = 4.2. Therefore:
t=3
4.2≈0.7143
Step 3: Determine the critical value. Since we are conducting a hypothesis
test at the 5
Step 4: Make a decision. Since |0.7143|<2.306, we fail to reject the null
hypothesis. This means there is not enough evidence to conclude that the
regression line is a good fit for the data at the 5
4
Question 6
Question
Suppose we have a dataset with two variables, Xand Y, and we are inter-
ested in examining the relationship between them using linear regression. After
performing a simple linear regression analysis, we obtain the following results:
ˆ
Y= 2.5X+ 10
SE(ˆ
Y) = 3.2
Slope of the regression line, ˆ
β1= 2.5
Standard error of the slope, SE(ˆ
β1) = 0.6
Calculate the 95% confidence interval for the true slope parameter, β1.
Solution
Step 1: To calculate the 95% confidence interval for the true slope parameter,
β1, we will use the formula:
ˆ
β1±tα/2×SE(ˆ
β1)
where tα/2is the critical value for a t-distribution with n−2degrees of
freedom (where nis the sample size) at α/2significance level, and here α= 0.05
for a 95% confidence interval.
Step 2: Since we are not given the sample size, we cannot determine the
exact critical value tα/2. However, for a 95% confidence interval and a large
sample size, the critical value is approximately 2.
Step 3: Substituting the values into the formula, we have:
2.5±2×0.6
Step 4: Simplifying the expression, we get:
2.5±1.2
Step 5: Therefore, the 95% confidence interval for the true slope parameter,
β1, is approximately [1.3,3.7].
Question 7
Question
Let Ybe the dependent variable, Xbe the independent variable, and ˆ
Ybe
the predicted value of Yfrom a linear regression model. Consider the following
hypothesis test for the slope coefficient in a simple linear regression model:
H0:β1= 0 against H1:β1= 0
5
A random sample of 25 observations is taken, and the estimated regression
model is given by ˆ
Y= 10 + 3X. The estimated standard error of the slope
coefficient is s.e(ˆ
β1) = 1.2.
Perform a hypothesis test at a significance level of α= 0.05 and determine
if there is enough evidence to conclude that the independent variable is a sig-
nificant predictor of the dependent variable.
Solution
Step 1: Calculate the test statistic. The test statistic for testing the slope
coefficient in a simple linear regression model is given by:
t=ˆ
β1−0
s.e(ˆ
β1)
Given that ˆ
β1= 3 and s.e(ˆ
β1) = 1.2, we have:
t=3−0
1.2=3
1.2= 2.5
Step 2: Determine the critical value. Since we are performing a two-tailed
test at α= 0.05 significance level, the critical values can be found using a
t-distribution table with n−2degrees of freedom, where nis the sample size.
Since the sample size is 25, we have df = 25 −2 = 23. The critical values
can be found as tα/2,23 =±2.069.
Step 3: Make a decision. Since the calculated test statistic t= 2.5falls
outside the critical values −2.069 and 2.069, we reject the null hypothesis H0.
Therefore, there is enough evidence to conclude that the independent variable
is a significant predictor of the dependent variable at the α= 0.05 significance
level.
Question 8
Question
Let’s consider a linear regression model where Y=β0+β1X+ϵ, where ϵ∼
N(0, σ2). For a certain dataset, we obtain the estimated regression equation as
ˆ
Y= 3 + 2X. Now, we want to test the null hypothesis H0:β1= 0 against the
alternative hypothesis H1:β1= 0 at a significance level of 0.05. Can we reject
the null hypothesis based on this information?
Solution
Step 1: Calculate the t-statistic. The t-statistic for testing the slope coefficient
β1is given by:
t=ˆ
β1
SE(ˆ
β1)
6
Where ˆ
β1is the estimated value of β1and SE(ˆ
β1)is the standard error of the
estimated coefficient.
Here, ˆ
β1= 2 (given in the regression equation) and SE(ˆ
β1) = ˆσ
√∑(Xi−¯
X)2,
where ˆσis the estimated standard error of the regression and ¯
Xis the mean of
X values.
Step 2: Calculate the standard error of the regression. The estimated stan-
dard error of the regression ˆσcan be calculated using:
ˆσ=sP(Yi−ˆ
Yi)2
n−2
Given ˆ
Y= 3 + 2Xand Y=β0+β1X+ϵ, we can substitute these values
into the formula to get the sum of squared residuals.
Step 3: Calculate the degrees of freedom. The degrees of freedom for the
t-distribution in this case is n−2.
Step 4: Look up the critical t-value at a significance level of 0.05 with the
corresponding degrees of freedom and check if the calculated t-statistic falls
within the critical region.
If the calculated t-statistic falls within the critical region, we reject the null
hypothesis; otherwise, we fail to reject it.
Question 9
Question
Let’s consider a linear regression model where we are trying to predict a stu-
dent’s final exam score based on the number of hours spent studying, represented
by the following model: Yi=β0+β1Xi+εi, where Yiis the final exam score
of student i,Xiis the number of hours spent studying by student i,β0is the
intercept, β1is the coefficient of hours spent studying, and εiis the error term
for student i.
Suppose we have collected data from 20 students, and the least squares
estimated regression line is ˆ
Y= 70+3X. We also have the following information:
P(Yi−ˆ
Yi)2= 600 and PX2
i= 100. Using a significance level of α= 0.05, test
the null hypothesis H0:β1= 0 against the alternative hypothesis H1:β1= 0.
Solution
Step 1: Calculate the test statistic. The test statistic for testing whether the
slope coefficient is significantly different from zero is given by:
t=ˆ
β1
sP(Yi−ˆ
Yi)2
n−2/PX2
i
7
Substitute the given values into the formula:
t=3
r600
20 −2/100
=3
√30 ≈0.5477
Step 2: Determine the critical value. Since the alternative hypothesis is two-
sided (β1= 0), the critical values for a significance level of 0.05 and degrees of
freedom n−2 = 18 are tα/2,n−2=t0.025,18 ≈ ±2.101.
Step 3: Make a decision. Since −2.101 <0.5477 <2.101, we fail to reject
the null hypothesis.
Step 4: Conclusion. With a significance level of 0.05, there is not enough
evidence to conclude that the number of hours spent studying has a significant
effect on the student’s final exam score.
Question 10
Question
Suppose we have a multiple linear regression model with three predictors: x1,
x2, and x3. The estimated regression equation is given by ˆy= 2x1+ 3x2−x3.
The estimated variance of the error term is ˆσ2= 4.
Test the null hypothesis H0:β1=β2= 0 against the alternative hypothesis
Ha:not all βiare equal to zero using an F-test at the 5
Solution
Step 1: Calculate the F-statistic. The F-statistic is calculated as:
F=(SSR/q)
(SSE/(n−p−1)),
where: - SSR is the sum of squares due to regression, - qis the number of
restrictions (in this case, q= 2), - SSE is the sum of squared errors, and - nis
the total number of observations (sample size) and pis the number of predictors.
Given: - SSR = 40, - n= 50 (sample size), - p= 3 (number of predictors),
-q= 2 (number of restrictions), - ˆσ2= 4.
Substitute these values into the formula:
F=(40/2)
(4/(50 −3−1)) =20
(4/46) =20
0.0869565 ≈230.435.
Step 2: Determine the critical value. At the 5
Step 3: Make a decision. Since the calculated F-statistic of approximately
230.435 is greater than the critical value of 3.195, we reject the null hypothesis.
Conclusion: We have enough evidence to conclude that at least one of the
regression coefficients β1, β2is not equal to zero.
8
Question 11
Question
Suppose we have a linear regression model given by:
Yi=β0+β1Xi+ϵi
where Yirepresents the response variable, Xirepresents the predictor variable,
ϵirepresents the error term for the i-th observation, and β0and β1are the
intercept and slope coefficients respectively.
Given the following data points:
X Y
1 2
2 3
3 4
4 6
5 5
a) Calculate the least squares estimates for β0and β1.
b) Use the least squares estimates to predict the value of Ywhen X= 6.
Solution
a) To calculate the least squares estimates for β0and β1, we need to find the
values that minimize the sum of squared errors Pn
i=1(Yi−(ˆ
β0+ˆ
β1Xi))2.
Step 1: Calculate the means of Xand Y.
The mean of X:
¯
X=1+2+3+4+5
5= 3
The mean of Y:
¯
Y=2+3+4+6+5
5= 4
Step 2: Calculate the least squares estimate for β1.
ˆ
β1=Pn
i=1(Xi−¯
X)(Yi−¯
Y)
Pn
i=1(Xi−¯
X)2
Plugging in the given data:
ˆ
β1=(1 −3)(2 −4) + (2 −3)(3 −4) + (3 −3)(4 −4) + (4 −3)(6 −4) + (5 −3)(5 −4)
(1 −3)2+ (2 −3)2+ (3 −3)2+ (4 −3)2+ (5 −3)2
ˆ
β1=2+1+0+2+2
2+1+0+1+4 =5
8= 0.625
Step 3: Calculate the least squares estimate for β0.
9
ˆ
β0=¯
Y−ˆ
β1¯
X
ˆ
β0= 4 −0.625 ×3 = 4 −1.875 = 2.125
Therefore, the least squares estimates are:
ˆ
β0= 2.125 and ˆ
β1= 0.625
b) To predict the value of Ywhen X= 6, we will use the estimated regression
equation: ˆ
Y=ˆ
β0+ˆ
β1X
Plugging in X= 6:
ˆ
Y= 2.125 + 0.625 ×6 = 2.125 + 3.75 = 5.875
Thus, the predicted value of Ywhen X= 6 is 5.875.
Question 12
Question
Suppose we have a multiple linear regression model with three independent
variables: x1,x2, and x3. The model predicts the dependent variable yusing
the equation:
y=β0+β1x1+β2x2+β3x3+ϵ
where β0,β1,β2, and β3are the coefficients, and ϵis the error term.
Given the following information:
-ˆ
β0= 2.5-ˆ
β1= 1.8-ˆ
β2=−0.7-ˆ
β3= 0.3-SSR = 150.4-SSE = 75.2-
n= 50 - Var(ˆ
β1) = 0.04 - Var(ˆ
β2) = 0.01 - Var(ˆ
β3) = 0.02
Test at the 1
Solution
Step 1: Compute the degrees of freedom.
dfRegression =k= 3
dfError =n−k−1 = 50 −3−1 = 46
Step 2: Compute the Mean Sum of Squares Explained (MSR) and Mean
Sum of Squares Error (MSE).
MSR =SSR
k=150.4
3= 50.1333
MSE =SSE
dfError
=75.2
46 ≈1.6348
10
Step 3: Compute the F-statistic.
F=MSR
MSE =50.1333
1.6348 ≈30.6476
Step 4: Lookup the critical value from the F-distribution table. For dfRegression =
3and dfError = 46 at the 1
Step 5: Make a decision. Since the computed F-statistic (30.6476) is greater
than the critical value (4.8), we reject the null hypothesis.
Step 6: Conclusion. Therefore, we have enough evidence to conclude that
at least one of the coefficients β2and β3is not equal to zero in the model.
Question 13
Question
Suppose we have a dataset with 50 observations, where the dependent variable
yis related to two independent variables x1and x2through the multiple linear
regression model:
y=β0+β1x1+β2x2+ε
The following output from a statistical software summarizes the regression
results:
Variable Coefficient Standard Error T-statistic p-value
β07.52 1.34 5.61 <0.001
x12.31 0.87 2.66 0.012
x2−1.15 0.42 −2.74 0.009
Determine whether the independent variable x2has a significant effect on
the dependent variable yat the significance level of 0.01.
Solution
Step 1: Formulate the hypotheses. - Null hypothesis: H0:β2= 0 (The
coefficient of x2is not significantly different from zero). - Alternative hypothesis:
Ha:β2= 0 (The coefficient of x2is significantly different from zero).
Step 2: Identify the significance level. The significance level is α= 0.01.
Step 3: Determine the test statistic. The test statistic is the T-statistic
for x2, which is −2.74.
Step 4: Find the critical value. Since our significance level is α= 0.01
and we are conducting a two-tailed test, the critical values are ±2.68 from the
T-distribution.
Step 5: Make a decision. Since −2.74 lies outside the critical values of
±2.68, we reject the null hypothesis.
11
Step 6: State the conclusion. There is enough evidence to conclude that
the independent variable x2has a significant effect on the dependent variable y
at the significance level of 0.01.
Question 14
Question
Let Ybe a random variable representing the number of hours studied by a group
of students and Xbe a random variable representing the score they achieved
in an exam. A linear regression model was fitted to the data with the following
results:
ˆ
Y= 8 + 0.6Xand SE(ˆ
Y) = 0.75
Calculate the 95
Solution
Step 1: The formula for the confidence interval given a point estimate ˆ
Y, the
standard error SE(ˆ
Y), a critical value zα/2for a 95
Confidence Interval =ˆ
Y±zα/2·SE(ˆ
Y)
Since we need a 95
Step 2: Substituting the given values, we have:
Confidence Interval = 8 + 0.6·80 ±1.96 ·0.75
Solving the expression inside the parentheses:
Confidence Interval = 8 + 48 ±1.47
Step 3: Calculating the confidence interval:
Confidence Interval = [8 + 48 −1.47,8+48+1.47] = [54.53,55.47]
Therefore, the 95
Question 15
Question
Let Ybe a response variable and Xbe a predictor variable. Consider the simple
linear regression model Yi=β0+β1Xi+εi, where εiare independent and
identically distributed random errors with mean 0and variance σ2. Given the
sample data {(X1, Y1),(X2, Y2), . . . , (Xn, Yn)}, we have the following estimated
12
regression equation: ˆ
Y= 3 + 2X. Test the null hypothesis H0:β1= 2 against
the alternative hypothesis H1:β1= 2 at the 5% significance level. Assume that
the residuals are normally distributed.
Solution
Step 1: The test statistic for testing the null hypothesis H0:β1= 2 against the
alternative hypothesis H1:β1= 2 is given by:
t=ˆ
β1−β1,null
SE(ˆ
β1)
where ˆ
β1is the estimated coefficient for X,β1,null is the null value for the
coefficient (in this case, 2), and SE(ˆ
β1)is the standard error of the estimated
coefficient ˆ
β1.
Step 2: The standard error of the estimated coefficient ˆ
β1is given by:
SE(ˆ
β1) = sMSE
Pn
i=1(Xi−¯
X)2
where MSE is the mean squared error obtained from the ANOVA table.
Step 3: Calculate the t-statistic:
t=2−2
SE(ˆ
β1)=0
SE(ˆ
β1)= 0
Step 4: Determine the critical values for a two-tailed test at the 5% signifi-
cance level. For α= 0.05, with df =n−2, using a t-distribution table, we find
the critical values to be −tα/2and tα/2.
Step 5: Make a decision. Since t= 0 falls within the acceptance region
between −tα/2and tα/2, we do not reject the null hypothesis. Therefore, we
do not have enough evidence to suggest that the slope of the regression line is
different from 2at the 5% significance level.
Question 16
Question
Let ˆ
β1be the estimated coefficient for the variable X1in a linear regression
model with two predictors X1and X2. Suppose the variance of ˆ
β1is given by
Var(ˆ
β1)=0.04. If we want to construct a 95% confidence interval for β1(the
true coefficient), what is the length of the confidence interval?
13
Solution
Step 1: The confidence interval for β1can be calculated as ˆ
β1±tα
2,n−2·SE(ˆ
β1),
where tα
2,n−2is the critical value for a t-distribution with n−2degrees of
freedom at the α
2level, and SE(ˆ
β1)is the standard error of the estimate for ˆ
β1.
Step 2: Since we are looking to construct a 95% confidence interval, α= 0.05
and 1−α= 0.95. Therefore, α
2= 0.025.
Step 3: The length of the confidence interval is given by 2·tα
2,n−2·SE(ˆ
β1).
Step 4: Since we are not given the sample size n, we cannot determine the
exact value of tα
2,n−2. However, we can calculate the standard error of the
estimate as SE(ˆ
β1) = qVar(ˆ
β1) = √0.04 = 0.2.
Step 5: Therefore, the length of the confidence interval is 2·t0.025,n−2·0.2.
Step 6: The length of the confidence interval for β1depends on the sample
size nand the critical value t0.025,n−2.
Question 17
Question
Suppose we have a linear regression model given by Y=β0+β1X+ε, where ε∼
N(0, σ2)and β0,β1, and σ2are unknown parameters. Consider the following
hypothesis test:
H0:β1= 0 vs. H1:β1= 0
Suppose we collected a sample of size n= 30. The estimated regression
equation is ˆ
Y= 3 + 2X, and we found that the standard error of ˆ
β1is 0.5.
Conduct the hypothesis test at the 5
Solution
Step 1: Calculate the test statistic The test statistic for testing the slope
coefficient in simple linear regression is given by:
t=ˆ
β1−β1,Hypothesized
SE(ˆ
β1)
Given that ˆ
β1= 2 and SE(ˆ
β1) = 0.5, the test statistic is:
t=2−0
0.5= 4
Step 2: Determine the critical values Since the alternative hypothesis is
two-sided (β1= 0), we need to find the critical values for a two-tailed test at
the 5
For a two-tailed test at 5
Step 3: Look up the critical values Using a t-distribution table or soft-
ware, we find that t0.025,28 ≈ ±2.048.
14
Step 4: Make a decision Since the test statistic t= 4 >2.048, we reject
the null hypothesis H0:β1= 0 in favor of the alternative hypothesis H1:β1= 0
at the 5
Step 5: Conclusion There is sufficient evidence to suggest that there is
a linear relationship between the independent variable Xand the dependent
variable Yat the 5
Question 18
Question
Suppose we have a linear regression model given by Y=β0+β1X+ϵ, where
ϵ∼N(0, σ2). Given the following data and output from an analysis:
Variable Coefficient Standard Error
β03.24 0.62
β11.28 0.36
Test at the significance level of 0.05 whether the slope coefficient is signifi-
cantly different from zero. State the null and alternative hypotheses, calculate
the test statistic and p-value, and draw a conclusion.
Solution
Step 1: Null and Alternative Hypotheses
The null hypothesis H0and alternative hypothesis H1are given by: - H0:
β1= 0 (the slope coefficient is not significantly different from zero) - H1:β1= 0
(the slope coefficient is significantly different from zero)
Step 2: Calculate the Test Statistic
The test statistic is calculated as:
t=β1
SE(β1)=1.28
0.36 = 3.56
Step 3: Calculate the P-Value
Since the alternative hypothesis is two-sided (β1= 0), we need to find the
p-value for |t|>3.56 with df =n−2, where nis the number of observations.
Using a t-table or software, we find that the p-value is less than 0.001.
Step 4: Conclusion
Since the p-value is less than the significance level of 0.05, we reject the null
hypothesis. There is sufficient evidence to conclude that the slope coefficient is
significantly different from zero.
15
Question 19
Question
Suppose we have a linear regression model Y=β0+β1X+ϵ, where Yrepresents
the dependent variable, Xthe independent variable, and ϵ∼N(0, σ2). The
least squares estimators are given by ˆ
β0= 3,ˆ
β1= 2, and the residuals are
ei={−1,0,1,2,−1}. Test the null hypothesis H0:β1= 1 against H1:β1= 1
at the 5% significance level.
Solution
Step 1: Compute the test statistic using the formula:
t=ˆ
β1−β1
SE(ˆ
β1)
where SE( ˆ
β1) is the standard error of ˆ
β1.
Step 2: First, we calculate the standard error:
SE(ˆ
β1) = sPn
i=1 e2
i
n−21
nPn
i=1(Xi−¯
X)2
Step 3: Given that n= 5, we substitute the values to find the standard
error:
SE(ˆ
β1) = v
u
u
t
(−1)2+ 02+ 12+ 22+ (−1)2
5−2 1
5P5
i=1(Xi−¯
X)2!
Step 4: Calculate ¯
X=1
nPn
i=1 Xi:
¯
X=1
5(1+2+3+4+5)=3
Step 5: Substitute the values into the standard error formula to get:
SE(ˆ
β1) = v
u
u
t
6
3 1
5P5
i=1(Xi−3)2!
Step 6: We know P5
i=1(Xi−3)2= 10, so the standard error simplifies to:
SE(ˆ
β1) = s21
50=1
5
Step 7: Calculate the test statistic:
t=2−1
1/5= 5
16
Step 8: Determine the critical values for a two-tailed test at the 5% signif-
icance level. For α= 0.05, degrees of freedom df =n−2 = 5 −2 = 3. The
critical values are ±2.776.
Step 9: Make a decision regarding the null hypothesis: Since 5>2.776, we
reject the null hypothesis. Therefore, we have sufficient evidence to conclude
that β1is not equal to 1.
Question 20
Question
Let Yidenote the response variable and X1i, X2i, . . . , Xpi denote the predictor
variables for the ith observation in a multiple linear regression model. Sup-
pose the model assumptions hold and that observations are independent. In
a study involving 15 observations and 5 predictor variables, the coefficient of
determination (R2) was found to be 0.85.
Test the null hypothesis H0:β1=β2=. . . =β5= 0 against the alternative
hypothesis Ha:at least one of β1, β2, . . . , β5is not equal to 0, using a significance
level of 0.01.
Solution
Step 1: The test statistic for testing the above hypothesis is based on the F-
distribution and it is calculated as
F∗=(R2/p)
(1 −R2)/(n−p−1),
where nis the number of observations and pis the number of predictor
variables.
Step 2: Given that R2= 0.85,n= 15, and p= 5, we can substitute these
values into the formula to find the test statistic:
F∗=(0.85/5)
(1 −0.85)/(15 −5−1) =0.17
0.03 = 5.6667.
Step 3: To decide whether we can reject the null hypothesis at the 0.01
significance level, we compare the test statistic with the critical value from the
F-distribution with pand n−p−1degrees of freedom.
Step 4: With p= 5 and n−p−1=9degrees of freedom, the critical value
of the F-distribution at a significance level of 0.01 is approximately 4.9437.
Step 5: Since the test statistic F∗= 5.6667 is greater than the critical value
4.9437, we reject the null hypothesis.
Step 6: Therefore, we have enough evidence to conclude that at least one of
β1, β2, , β5is not equal to 0.
17
Question 21
Question
Suppose we have a linear regression model given by Y=β0+β1X+ϵ, where ϵis
a random error term with mean 0 and variance σ2. Let n= 20,P20
i=1 Xi= 40,
P20
i=1 Yi= 60,P20
i=1 X2
i= 100,P20
i=1 Y2
i= 150, and P20
i=1 XiYi= 180.
(a) Find the least square estimates of β0and β1.
(b) Test at 5
(c) Compute the 95
Solution
(a) To find the least square estimates of β0and β1, we can use the formulas:
ˆ
β1=Pn
i=1(Xi−¯
X)(Yi−¯
Y)
Pn
i=1(Xi−¯
X)2
ˆ
β0=¯
Y−ˆ
β1¯
X
First, calculate the sample means ¯
Xand ¯
Y:
¯
X=1
n
n
X
i=1
Xi=40
20 = 2
¯
Y=1
n
n
X
i=1
Yi=60
20 = 3
Now, substitute the given values into the formulas to find ˆ
β1and ˆ
β0:
ˆ
β1=180 −20(2)(3)
100 =180 −120
100 = 0.6
ˆ
β0= 3 −0.6(2) = 3 −1.2 = 1.8
Therefore, the least square estimates are ˆ
β0= 1.8and ˆ
β1= 0.6.
(b) To test if there is a relationship between Xand Y, we can use the
hypothesis:
H0:β1= 0
H1:β1= 0
We can perform an F-test to test this hypothesis.
(c) To compute the 95
ˆ
β1±tα/2,n−2
s
qPn
i=1(Xi−¯
X)2
where s2=1
n−2Pn
i=1 Y2
i−ˆ
β0Pn
i=1 Yi−ˆ
β1Pn
i=1 XiYiand tα/2,n−2is the
t-value corresponding to a 95
18
Question 22
Question
Suppose we have performed a linear regression analysis and obtained the fol-
lowing information about the regression coefficients:
ˆ
β0= 12.4,ˆ
β1=−1.8,Var(ˆ
β0) = 2.5,Var(ˆ
β1) = 0.3,Cov(ˆ
β0,ˆ
β1) = −0.6.
Given this information, determine the standard error for estimating the slope
of the regression line.
Solution
Step 1: The standard error for estimating the slope of the regression line, de-
noted as SE(ˆ
β1), can be calculated using the formula:
SE(ˆ
β1) = qVar(ˆ
β1) = √0.3 = 0.5477.
Therefore, the standard error for estimating the slope of the regression line
is 0.5477.
Question 23
Question
Suppose we have a linear regression model given by ˆ
Y= 3X1−2X2+ 5X3
with n= 50 observations. The estimated standard errors for the coefficients are
SE(ˆ
β1) = 0.6,SE(ˆ
β2) = 0.4, and SE(ˆ
β3) = 0.8. Test the null hypothesis H0:
β1=β2=β3= 0 against the alternative hypothesis Ha:at least one βi= 0.
Use a significance level of α= 0.05.
Solution
Step 1: Calculate the test statistic for the given hypothesis test using the for-
mula:
F=(RSS0−RSS1)/q
RSS1/(n−p−1)
where - RSS0is the residual sum of squares under the null hypothesis, - RSS1is
the residual sum of squares under the alternative hypothesis, - qis the number
of restrictions (in this case, q= 3), - nis the number of observations (given as
n= 50), - pis the number of predictors in the model (in this case, p= 3).
Under the null hypothesis, RSS0=RSS where RSS is the residual sum of
squares from the model. Now we need to calculate RSS1by fitting the reduced
model with all coefficients set to zero.
19
Step 2: Calculate the test statistic. The F-statistic is given by:
F=(RSS −RSS1)/q
RSS1/(n−p−1)
Step 3: Determine the critical value of the F-distribution with qand n−p−1
degrees of freedom at the 0.05 significance level. If the test statistic is greater
than the critical value, we reject the null hypothesis.
Step 4: Make a decision. If the test statistic is greater than the critical value,
we reject the null hypothesis; otherwise, we fail to reject the null hypothesis.
This completes the hypothesis test.
Question 24
Question
Suppose we have a dataset of 50 observations and we fit a simple linear regression
model with one predictor variable. The regression sum of squares (RSS) is found
to be 300 and the residual sum of squares (RSS) is found to be 200. Perform a
hypothesis test to determine if the regression model is significant at the 5
Solution
Step 1: Calculate the degrees of freedom for the F-test. The degrees of freedom
for the regression model (numerator) is 1, and for the residuals (denominator)
is 50 −1−1 = 48.
Step 2: Set up the null and alternative hypotheses. Null hypothesis (H0):
The regression coefficients are all equal to zero, suggesting that the model is
not significant. Alternative hypothesis (Ha): At least one regression coefficient
is non-zero, suggesting that the model is significant.
Step 3: Calculate the F-statistic. The formula for the F-statistic is:
F=(RSSnull −RSSfull)/(dfnull −dffull)
RSSfull/dffull
In our case, RSSnull = 500 (just the intercept), RSSfull = 200 (includes the
predictor variable), dfnull = 49, and dffull = 48.
Plugging in the values, we get:
F=(500 −200)/(49 −48)
200/48 =300
200/48 = 1.44
Step 4: Determine the critical value. At the 5
Step 5: Make a decision. Since 1.44 < 4.11, we fail to reject the null hy-
pothesis. There is not enough evidence to conclude that the regression model
is significant at the 5
20
Question 25
Question
Let’s consider a linear regression model with one predictor variable. The follow-
ing table shows the data for a study conducted investigating the relationship
between the number of hours studied and the exam score obtained by a group
of students.
Hours Studied (x) Exam Score (y)
2 55
4 63
6 72
8 79
Calculate the coefficient of determination (R2) for this data set. Interpret
your result in the context of the study.
Solution
Step 1: Calculate the mean of hours studied (¯x), the mean of exam scores (¯y),
and the deviations from the mean for both variables.
The mean of hours studied is:
¯x=2+4+6+8
4=20
4= 5
The mean of exam scores is:
¯y=55 + 63 + 72 + 79
4=269
4= 67.25
The deviations from the mean are:
x y x −¯x y −¯y
2 55 −3−12.25
4 63 −1−4.25
6 72 1 4.75
8 79 3 11.75
Step 2: Calculate the total sum of squares (SST), regression sum of squares
(SSR), and residual sum of squares (SSE).
The total sum of squares (SST) is:
SST =X(yi−¯y)2= (−12.25)2+ (−4.25)2+ 4.752+ 11.752
The regression sum of squares (SSR) can be calculated using the formula:
SSR =ˆ
β1P(xi−¯x)2where ˆ
β1is the estimated slope coefficient.
The residual sum of squares (SSE) can be calculated as: SSE =SST −SSR
21
Step 3: Calculate the coefficient of determination (R2) using the formula:
R2=SSR
SST
Step 4: Interpret the coefficient of determination (R2) in the context of the
study.
The coefficient of determination (R2) helps to explain the proportion of
the variance in the dependent variable (exam scores) that can be explained by
the independent variable (hours studied). Just interpret the R2value in this
context.
22
Question 2
Question
Suppose we have a dataset with 100 observations where the response variable
Yand predictor variable Xare related by the linear regression model Y=
β0+β1X+ε, where εis the error term. We fit the model and obtain the
following results:
ˆ
β0= 5.2,ˆ
β1= 2.3, SE(ˆ
β1) = 0.4
Assuming that the standard errors of the estimated coefficients are correct, test
at the 5
Solution
Step 1: State the null and alternative hypotheses. The null hypothesis (H0)
states that there is no linear relationship between Xand Y, meaning β1= 0.
The alternative hypothesis (Ha) states that there is a linear relationship between
Xand Y, meaning β1= 0.
Step 2: Calculate the test statistic. The test statistic for testing the slope
coefficient β1is given by
t=ˆ
β1
SE(ˆ
β1)
Step 3: Determine the critical value. Since we are testing at the 5
Step 4: Make a decision. If the test statistic falls within the critical values,
we reject the null hypothesis. If it falls outside the critical values, we fail to
reject the null hypothesis.
Step 5: Calculate the test statistic:
t=2.3
0.4= 5.75
Step 6: Make a decision. Since the test statistic 5.75 falls outside the critical
values of -2.364 and 2.364, we reject the null hypothesis.
Step 7: Conclusion. There is enough evidence to conclude that there is a
linear relationship between the predictor variable Xand the response variable
Yat the 5
Question 4
Question
Consider a linear regression model with one predictor variable:
Y=β0+β1X+ϵ
2
where ϵ∼N(0, σ2). Suppose we have the following data:
X Y
1 3
2 5
3 6
4 8
Perform a hypothesis test at level α= 0.05 to determine if the slope of the
regression line is significantly different from zero. State the null and alternative
hypotheses, calculate the test statistic, and determine the conclusion of the test.
Solution
Step 1: Formulate the hypotheses
The null hypothesis H0and the alternative hypothesis H1are as follows: -
H0:β1= 0 (The slope of the regression line is not significantly different from
zero) - H1:β1= 0 (The slope of the regression line is significantly different
from zero)
Step 2: Calculate the test statistic
The test statistic for testing the slope of the regression line is given by:
t=b1
SE(b1)
where b1is the estimated slope coefficient and SE(b1)is the standard error of
the slope coefficient.
To calculate b1, first compute the sample means ¯
Xand ¯
Y:
¯
X=1+2+3+4
4= 2.5
¯
Y=3+5+6+8
4= 5.5
Then, compute the sample covariance SXY and sample variance S2
X:
SXY =Pn
i=1(Xi−¯
X)(Yi−¯
Y)
n−1=(1 −2.5)(3 −5.5) + (2 −2.5)(5 −5.5) + (3 −2.5)(6 −5.5) + (4 −2.5)(8 −5.5)
3= 2.25
S2
X=Pn
i=1(Xi−¯
X)2
n−1=(1 −2.5)2+ (2 −2.5)2+ (3 −2.5)2+ (4 −2.5)2
3= 1.25
Now, we can calculate the estimated slope coefficient b1:
b1=SXY
S2
X
=2.25
1.25 = 1.8
Next, calculate the standard error of the slope coefficient SE(b1):
SE(b1) = sMSE
S2
X
3
where MSE is the mean squared error (residual variance) and is given by:
MSE =Pn
i=1(Yi−ˆ
Yi)2
n−2
and the predicted values ˆ
Yiare obtained from the regression model.
Step 3: Make a decision
Using the calculated values and the test statistic formula, we find the test
statistic:
t=1.8
SE(b1)
We can compare this value to the critical values of the t-distribution with
n−2 = 2 degrees of freedom at α= 0.05 to make a decision about whether to
reject the null hypothesis or not.
Question 5
Question
Let Ybe a response variable and Xbe a predictor variable in a linear regression
model. Suppose the least squares regression line is given by ˆ
Y= 5 + 3X. If the
residual standard error is found to be 4.2, can we conclude that the regression
line is a good fit for the data at the 5
Solution
Step 1: State the null and alternative hypotheses. - Null hypothesis (H0): The
regression line is not a good fit for the data. - Alternative hypothesis (HA):
The regression line is a good fit for the data.
Step 2: Calculate the test statistic. The test statistic is given by:
t=b1
SE(b1)
where b1is the coefficient of the predictor variable in the regression model and
SE(b1)is the standard error of the coefficient.
In this case, b1= 3 and the standard error is equal to the residual standard
error, SE(b1) = 4.2. Therefore:
t=3
4.2≈0.7143
Step 3: Determine the critical value. Since we are conducting a hypothesis
test at the 5
Step 4: Make a decision. Since |0.7143|<2.306, we fail to reject the null
hypothesis. This means there is not enough evidence to conclude that the
regression line is a good fit for the data at the 5
4
Question 6
Question
Suppose we have a dataset with two variables, Xand Y, and we are inter-
ested in examining the relationship between them using linear regression. After
performing a simple linear regression analysis, we obtain the following results:
ˆ
Y= 2.5X+ 10
SE(ˆ
Y) = 3.2
Slope of the regression line, ˆ
β1= 2.5
Standard error of the slope, SE(ˆ
β1) = 0.6
Calculate the 95% confidence interval for the true slope parameter, β1.
Solution
Step 1: To calculate the 95% confidence interval for the true slope parameter,
β1, we will use the formula:
ˆ
β1±tα/2×SE(ˆ
β1)
where tα/2is the critical value for a t-distribution with n−2degrees of
freedom (where nis the sample size) at α/2significance level, and here α= 0.05
for a 95% confidence interval.
Step 2: Since we are not given the sample size, we cannot determine the
exact critical value tα/2. However, for a 95% confidence interval and a large
sample size, the critical value is approximately 2.
Step 3: Substituting the values into the formula, we have:
2.5±2×0.6
Step 4: Simplifying the expression, we get:
2.5±1.2
Step 5: Therefore, the 95% confidence interval for the true slope parameter,
β1, is approximately [1.3,3.7].
Question 7
Question
Let Ybe the dependent variable, Xbe the independent variable, and ˆ
Ybe
the predicted value of Yfrom a linear regression model. Consider the following
hypothesis test for the slope coefficient in a simple linear regression model:
H0:β1= 0 against H1:β1= 0
5
A random sample of 25 observations is taken, and the estimated regression
model is given by ˆ
Y= 10 + 3X. The estimated standard error of the slope
coefficient is s.e(ˆ
β1) = 1.2.
Perform a hypothesis test at a significance level of α= 0.05 and determine
if there is enough evidence to conclude that the independent variable is a sig-
nificant predictor of the dependent variable.
Solution
Step 1: Calculate the test statistic. The test statistic for testing the slope
coefficient in a simple linear regression model is given by:
t=ˆ
β1−0
s.e(ˆ
β1)
Given that ˆ
β1= 3 and s.e(ˆ
β1) = 1.2, we have:
t=3−0
1.2=3
1.2= 2.5
Step 2: Determine the critical value. Since we are performing a two-tailed
test at α= 0.05 significance level, the critical values can be found using a
t-distribution table with n−2degrees of freedom, where nis the sample size.
Since the sample size is 25, we have df = 25 −2 = 23. The critical values
can be found as tα/2,23 =±2.069.
Step 3: Make a decision. Since the calculated test statistic t= 2.5falls
outside the critical values −2.069 and 2.069, we reject the null hypothesis H0.
Therefore, there is enough evidence to conclude that the independent variable
is a significant predictor of the dependent variable at the α= 0.05 significance
level.
Question 8
Question
Let’s consider a linear regression model where Y=β0+β1X+ϵ, where ϵ∼
N(0, σ2). For a certain dataset, we obtain the estimated regression equation as
ˆ
Y= 3 + 2X. Now, we want to test the null hypothesis H0:β1= 0 against the
alternative hypothesis H1:β1= 0 at a significance level of 0.05. Can we reject
the null hypothesis based on this information?
Solution
Step 1: Calculate the t-statistic. The t-statistic for testing the slope coefficient
β1is given by:
t=ˆ
β1
SE(ˆ
β1)
6
Where ˆ
β1is the estimated value of β1and SE(ˆ
β1)is the standard error of the
estimated coefficient.
Here, ˆ
β1= 2 (given in the regression equation) and SE(ˆ
β1) = ˆσ
√∑(Xi−¯
X)2,
where ˆσis the estimated standard error of the regression and ¯
Xis the mean of
X values.
Step 2: Calculate the standard error of the regression. The estimated stan-
dard error of the regression ˆσcan be calculated using:
ˆσ=sP(Yi−ˆ
Yi)2
n−2
Given ˆ
Y= 3 + 2Xand Y=β0+β1X+ϵ, we can substitute these values
into the formula to get the sum of squared residuals.
Step 3: Calculate the degrees of freedom. The degrees of freedom for the
t-distribution in this case is n−2.
Step 4: Look up the critical t-value at a significance level of 0.05 with the
corresponding degrees of freedom and check if the calculated t-statistic falls
within the critical region.
If the calculated t-statistic falls within the critical region, we reject the null
hypothesis; otherwise, we fail to reject it.
Question 9
Question
Let’s consider a linear regression model where we are trying to predict a stu-
dent’s final exam score based on the number of hours spent studying, represented
by the following model: Yi=β0+β1Xi+εi, where Yiis the final exam score
of student i,Xiis the number of hours spent studying by student i,β0is the
intercept, β1is the coefficient of hours spent studying, and εiis the error term
for student i.
Suppose we have collected data from 20 students, and the least squares
estimated regression line is ˆ
Y= 70+3X. We also have the following information:
P(Yi−ˆ
Yi)2= 600 and PX2
i= 100. Using a significance level of α= 0.05, test
the null hypothesis H0:β1= 0 against the alternative hypothesis H1:β1= 0.
Solution
Step 1: Calculate the test statistic. The test statistic for testing whether the
slope coefficient is significantly different from zero is given by:
t=ˆ
β1
sP(Yi−ˆ
Yi)2
n−2/PX2
i
7
Substitute the given values into the formula:
t=3
r600
20 −2/100
=3
√30 ≈0.5477
Step 2: Determine the critical value. Since the alternative hypothesis is two-
sided (β1= 0), the critical values for a significance level of 0.05 and degrees of
freedom n−2 = 18 are tα/2,n−2=t0.025,18 ≈ ±2.101.
Step 3: Make a decision. Since −2.101 <0.5477 <2.101, we fail to reject
the null hypothesis.
Step 4: Conclusion. With a significance level of 0.05, there is not enough
evidence to conclude that the number of hours spent studying has a significant
effect on the student’s final exam score.
Question 10
Question
Suppose we have a multiple linear regression model with three predictors: x1,
x2, and x3. The estimated regression equation is given by ˆy= 2x1+ 3x2−x3.
The estimated variance of the error term is ˆσ2= 4.
Test the null hypothesis H0:β1=β2= 0 against the alternative hypothesis
Ha:not all βiare equal to zero using an F-test at the 5
Solution
Step 1: Calculate the F-statistic. The F-statistic is calculated as:
F=(SSR/q)
(SSE/(n−p−1)),
where: - SSR is the sum of squares due to regression, - qis the number of
restrictions (in this case, q= 2), - SSE is the sum of squared errors, and - nis
the total number of observations (sample size) and pis the number of predictors.
Given: - SSR = 40, - n= 50 (sample size), - p= 3 (number of predictors),
-q= 2 (number of restrictions), - ˆσ2= 4.
Substitute these values into the formula:
F=(40/2)
(4/(50 −3−1)) =20
(4/46) =20
0.0869565 ≈230.435.
Step 2: Determine the critical value. At the 5
Step 3: Make a decision. Since the calculated F-statistic of approximately
230.435 is greater than the critical value of 3.195, we reject the null hypothesis.
Conclusion: We have enough evidence to conclude that at least one of the
regression coefficients β1, β2is not equal to zero.
8
Question 11
Question
Suppose we have a linear regression model given by:
Yi=β0+β1Xi+ϵi
where Yirepresents the response variable, Xirepresents the predictor variable,
ϵirepresents the error term for the i-th observation, and β0and β1are the
intercept and slope coefficients respectively.
Given the following data points:
X Y
1 2
2 3
3 4
4 6
5 5
a) Calculate the least squares estimates for β0and β1.
b) Use the least squares estimates to predict the value of Ywhen X= 6.
Solution
a) To calculate the least squares estimates for β0and β1, we need to find the
values that minimize the sum of squared errors Pn
i=1(Yi−(ˆ
β0+ˆ
β1Xi))2.
Step 1: Calculate the means of Xand Y.
The mean of X:
¯
X=1+2+3+4+5
5= 3
The mean of Y:
¯
Y=2+3+4+6+5
5= 4
Step 2: Calculate the least squares estimate for β1.
ˆ
β1=Pn
i=1(Xi−¯
X)(Yi−¯
Y)
Pn
i=1(Xi−¯
X)2
Plugging in the given data:
ˆ
β1=(1 −3)(2 −4) + (2 −3)(3 −4) + (3 −3)(4 −4) + (4 −3)(6 −4) + (5 −3)(5 −4)
(1 −3)2+ (2 −3)2+ (3 −3)2+ (4 −3)2+ (5 −3)2
ˆ
β1=2+1+0+2+2
2+1+0+1+4 =5
8= 0.625
Step 3: Calculate the least squares estimate for β0.
9
ˆ
β0=¯
Y−ˆ
β1¯
X
ˆ
β0= 4 −0.625 ×3 = 4 −1.875 = 2.125
Therefore, the least squares estimates are:
ˆ
β0= 2.125 and ˆ
β1= 0.625
b) To predict the value of Ywhen X= 6, we will use the estimated regression
equation: ˆ
Y=ˆ
β0+ˆ
β1X
Plugging in X= 6:
ˆ
Y= 2.125 + 0.625 ×6 = 2.125 + 3.75 = 5.875
Thus, the predicted value of Ywhen X= 6 is 5.875.
Question 12
Question
Suppose we have a multiple linear regression model with three independent
variables: x1,x2, and x3. The model predicts the dependent variable yusing
the equation:
y=β0+β1x1+β2x2+β3x3+ϵ
where β0,β1,β2, and β3are the coefficients, and ϵis the error term.
Given the following information:
-ˆ
β0= 2.5-ˆ
β1= 1.8-ˆ
β2=−0.7-ˆ
β3= 0.3-SSR = 150.4-SSE = 75.2-
n= 50 - Var(ˆ
β1) = 0.04 - Var(ˆ
β2) = 0.01 - Var(ˆ
β3) = 0.02
Test at the 1
Solution
Step 1: Compute the degrees of freedom.
dfRegression =k= 3
dfError =n−k−1 = 50 −3−1 = 46
Step 2: Compute the Mean Sum of Squares Explained (MSR) and Mean
Sum of Squares Error (MSE).
MSR =SSR
k=150.4
3= 50.1333
MSE =SSE
dfError
=75.2
46 ≈1.6348
10
Step 3: Compute the F-statistic.
F=MSR
MSE =50.1333
1.6348 ≈30.6476
Step 4: Lookup the critical value from the F-distribution table. For dfRegression =
3and dfError = 46 at the 1
Step 5: Make a decision. Since the computed F-statistic (30.6476) is greater
than the critical value (4.8), we reject the null hypothesis.
Step 6: Conclusion. Therefore, we have enough evidence to conclude that
at least one of the coefficients β2and β3is not equal to zero in the model.
Question 13
Question
Suppose we have a dataset with 50 observations, where the dependent variable
yis related to two independent variables x1and x2through the multiple linear
regression model:
y=β0+β1x1+β2x2+ε
The following output from a statistical software summarizes the regression
results:
Variable Coefficient Standard Error T-statistic p-value
β07.52 1.34 5.61 <0.001
x12.31 0.87 2.66 0.012
x2−1.15 0.42 −2.74 0.009
Determine whether the independent variable x2has a significant effect on
the dependent variable yat the significance level of 0.01.
Solution
Step 1: Formulate the hypotheses. - Null hypothesis: H0:β2= 0 (The
coefficient of x2is not significantly different from zero). - Alternative hypothesis:
Ha:β2= 0 (The coefficient of x2is significantly different from zero).
Step 2: Identify the significance level. The significance level is α= 0.01.
Step 3: Determine the test statistic. The test statistic is the T-statistic
for x2, which is −2.74.
Step 4: Find the critical value. Since our significance level is α= 0.01
and we are conducting a two-tailed test, the critical values are ±2.68 from the
T-distribution.
Step 5: Make a decision. Since −2.74 lies outside the critical values of
±2.68, we reject the null hypothesis.
11
Step 6: State the conclusion. There is enough evidence to conclude that
the independent variable x2has a significant effect on the dependent variable y
at the significance level of 0.01.
Question 14
Question
Let Ybe a random variable representing the number of hours studied by a group
of students and Xbe a random variable representing the score they achieved
in an exam. A linear regression model was fitted to the data with the following
results:
ˆ
Y= 8 + 0.6Xand SE(ˆ
Y) = 0.75
Calculate the 95
Solution
Step 1: The formula for the confidence interval given a point estimate ˆ
Y, the
standard error SE(ˆ
Y), a critical value zα/2for a 95
Confidence Interval =ˆ
Y±zα/2·SE(ˆ
Y)
Since we need a 95
Step 2: Substituting the given values, we have:
Confidence Interval = 8 + 0.6·80 ±1.96 ·0.75
Solving the expression inside the parentheses:
Confidence Interval = 8 + 48 ±1.47
Step 3: Calculating the confidence interval:
Confidence Interval = [8 + 48 −1.47,8+48+1.47] = [54.53,55.47]
Therefore, the 95
Question 15
Question
Let Ybe a response variable and Xbe a predictor variable. Consider the simple
linear regression model Yi=β0+β1Xi+εi, where εiare independent and
identically distributed random errors with mean 0and variance σ2. Given the
sample data {(X1, Y1),(X2, Y2), . . . , (Xn, Yn)}, we have the following estimated
12
regression equation: ˆ
Y= 3 + 2X. Test the null hypothesis H0:β1= 2 against
the alternative hypothesis H1:β1= 2 at the 5% significance level. Assume that
the residuals are normally distributed.
Solution
Step 1: The test statistic for testing the null hypothesis H0:β1= 2 against the
alternative hypothesis H1:β1= 2 is given by:
t=ˆ
β1−β1,null
SE(ˆ
β1)
where ˆ
β1is the estimated coefficient for X,β1,null is the null value for the
coefficient (in this case, 2), and SE(ˆ
β1)is the standard error of the estimated
coefficient ˆ
β1.
Step 2: The standard error of the estimated coefficient ˆ
β1is given by:
SE(ˆ
β1) = sMSE
Pn
i=1(Xi−¯
X)2
where MSE is the mean squared error obtained from the ANOVA table.
Step 3: Calculate the t-statistic:
t=2−2
SE(ˆ
β1)=0
SE(ˆ
β1)= 0
Step 4: Determine the critical values for a two-tailed test at the 5% signifi-
cance level. For α= 0.05, with df =n−2, using a t-distribution table, we find
the critical values to be −tα/2and tα/2.
Step 5: Make a decision. Since t= 0 falls within the acceptance region
between −tα/2and tα/2, we do not reject the null hypothesis. Therefore, we
do not have enough evidence to suggest that the slope of the regression line is
different from 2at the 5% significance level.
Question 16
Question
Let ˆ
β1be the estimated coefficient for the variable X1in a linear regression
model with two predictors X1and X2. Suppose the variance of ˆ
β1is given by
Var(ˆ
β1)=0.04. If we want to construct a 95% confidence interval for β1(the
true coefficient), what is the length of the confidence interval?
13
Solution
Step 1: The confidence interval for β1can be calculated as ˆ
β1±tα
2,n−2·SE(ˆ
β1),
where tα
2,n−2is the critical value for a t-distribution with n−2degrees of
freedom at the α
2level, and SE(ˆ
β1)is the standard error of the estimate for ˆ
β1.
Step 2: Since we are looking to construct a 95% confidence interval, α= 0.05
and 1−α= 0.95. Therefore, α
2= 0.025.
Step 3: The length of the confidence interval is given by 2·tα
2,n−2·SE(ˆ
β1).
Step 4: Since we are not given the sample size n, we cannot determine the
exact value of tα
2,n−2. However, we can calculate the standard error of the
estimate as SE(ˆ
β1) = qVar(ˆ
β1) = √0.04 = 0.2.
Step 5: Therefore, the length of the confidence interval is 2·t0.025,n−2·0.2.
Step 6: The length of the confidence interval for β1depends on the sample
size nand the critical value t0.025,n−2.
Question 17
Question
Suppose we have a linear regression model given by Y=β0+β1X+ε, where ε∼
N(0, σ2)and β0,β1, and σ2are unknown parameters. Consider the following
hypothesis test:
H0:β1= 0 vs. H1:β1= 0
Suppose we collected a sample of size n= 30. The estimated regression
equation is ˆ
Y= 3 + 2X, and we found that the standard error of ˆ
β1is 0.5.
Conduct the hypothesis test at the 5
Solution
Step 1: Calculate the test statistic The test statistic for testing the slope
coefficient in simple linear regression is given by:
t=ˆ
β1−β1,Hypothesized
SE(ˆ
β1)
Given that ˆ
β1= 2 and SE(ˆ
β1) = 0.5, the test statistic is:
t=2−0
0.5= 4
Step 2: Determine the critical values Since the alternative hypothesis is
two-sided (β1= 0), we need to find the critical values for a two-tailed test at
the 5
For a two-tailed test at 5
Step 3: Look up the critical values Using a t-distribution table or soft-
ware, we find that t0.025,28 ≈ ±2.048.
14
Step 4: Make a decision Since the test statistic t= 4 >2.048, we reject
the null hypothesis H0:β1= 0 in favor of the alternative hypothesis H1:β1= 0
at the 5
Step 5: Conclusion There is sufficient evidence to suggest that there is
a linear relationship between the independent variable Xand the dependent
variable Yat the 5
Question 18
Question
Suppose we have a linear regression model given by Y=β0+β1X+ϵ, where
ϵ∼N(0, σ2). Given the following data and output from an analysis:
Variable Coefficient Standard Error
β03.24 0.62
β11.28 0.36
Test at the significance level of 0.05 whether the slope coefficient is signifi-
cantly different from zero. State the null and alternative hypotheses, calculate
the test statistic and p-value, and draw a conclusion.
Solution
Step 1: Null and Alternative Hypotheses
The null hypothesis H0and alternative hypothesis H1are given by: - H0:
β1= 0 (the slope coefficient is not significantly different from zero) - H1:β1= 0
(the slope coefficient is significantly different from zero)
Step 2: Calculate the Test Statistic
The test statistic is calculated as:
t=β1
SE(β1)=1.28
0.36 = 3.56
Step 3: Calculate the P-Value
Since the alternative hypothesis is two-sided (β1= 0), we need to find the
p-value for |t|>3.56 with df =n−2, where nis the number of observations.
Using a t-table or software, we find that the p-value is less than 0.001.
Step 4: Conclusion
Since the p-value is less than the significance level of 0.05, we reject the null
hypothesis. There is sufficient evidence to conclude that the slope coefficient is
significantly different from zero.
15
Question 19
Question
Suppose we have a linear regression model Y=β0+β1X+ϵ, where Yrepresents
the dependent variable, Xthe independent variable, and ϵ∼N(0, σ2). The
least squares estimators are given by ˆ
β0= 3,ˆ
β1= 2, and the residuals are
ei={−1,0,1,2,−1}. Test the null hypothesis H0:β1= 1 against H1:β1= 1
at the 5% significance level.
Solution
Step 1: Compute the test statistic using the formula:
t=ˆ
β1−β1
SE(ˆ
β1)
where SE( ˆ
β1) is the standard error of ˆ
β1.
Step 2: First, we calculate the standard error:
SE(ˆ
β1) = sPn
i=1 e2
i
n−21
nPn
i=1(Xi−¯
X)2
Step 3: Given that n= 5, we substitute the values to find the standard
error:
SE(ˆ
β1) = v
u
u
t
(−1)2+ 02+ 12+ 22+ (−1)2
5−2 1
5P5
i=1(Xi−¯
X)2!
Step 4: Calculate ¯
X=1
nPn
i=1 Xi:
¯
X=1
5(1+2+3+4+5)=3
Step 5: Substitute the values into the standard error formula to get:
SE(ˆ
β1) = v
u
u
t
6
3 1
5P5
i=1(Xi−3)2!
Step 6: We know P5
i=1(Xi−3)2= 10, so the standard error simplifies to:
SE(ˆ
β1) = s21
50=1
5
Step 7: Calculate the test statistic:
t=2−1
1/5= 5
16
Step 8: Determine the critical values for a two-tailed test at the 5% signif-
icance level. For α= 0.05, degrees of freedom df =n−2 = 5 −2 = 3. The
critical values are ±2.776.
Step 9: Make a decision regarding the null hypothesis: Since 5>2.776, we
reject the null hypothesis. Therefore, we have sufficient evidence to conclude
that β1is not equal to 1.
Question 20
Question
Let Yidenote the response variable and X1i, X2i, . . . , Xpi denote the predictor
variables for the ith observation in a multiple linear regression model. Sup-
pose the model assumptions hold and that observations are independent. In
a study involving 15 observations and 5 predictor variables, the coefficient of
determination (R2) was found to be 0.85.
Test the null hypothesis H0:β1=β2=. . . =β5= 0 against the alternative
hypothesis Ha:at least one of β1, β2, . . . , β5is not equal to 0, using a significance
level of 0.01.
Solution
Step 1: The test statistic for testing the above hypothesis is based on the F-
distribution and it is calculated as
F∗=(R2/p)
(1 −R2)/(n−p−1),
where nis the number of observations and pis the number of predictor
variables.
Step 2: Given that R2= 0.85,n= 15, and p= 5, we can substitute these
values into the formula to find the test statistic:
F∗=(0.85/5)
(1 −0.85)/(15 −5−1) =0.17
0.03 = 5.6667.
Step 3: To decide whether we can reject the null hypothesis at the 0.01
significance level, we compare the test statistic with the critical value from the
F-distribution with pand n−p−1degrees of freedom.
Step 4: With p= 5 and n−p−1=9degrees of freedom, the critical value
of the F-distribution at a significance level of 0.01 is approximately 4.9437.
Step 5: Since the test statistic F∗= 5.6667 is greater than the critical value
4.9437, we reject the null hypothesis.
Step 6: Therefore, we have enough evidence to conclude that at least one of
β1, β2, , β5is not equal to 0.
17
Question 21
Question
Suppose we have a linear regression model given by Y=β0+β1X+ϵ, where ϵis
a random error term with mean 0 and variance σ2. Let n= 20,P20
i=1 Xi= 40,
P20
i=1 Yi= 60,P20
i=1 X2
i= 100,P20
i=1 Y2
i= 150, and P20
i=1 XiYi= 180.
(a) Find the least square estimates of β0and β1.
(b) Test at 5
(c) Compute the 95
Solution
(a) To find the least square estimates of β0and β1, we can use the formulas:
ˆ
β1=Pn
i=1(Xi−¯
X)(Yi−¯
Y)
Pn
i=1(Xi−¯
X)2
ˆ
β0=¯
Y−ˆ
β1¯
X
First, calculate the sample means ¯
Xand ¯
Y:
¯
X=1
n
n
X
i=1
Xi=40
20 = 2
¯
Y=1
n
n
X
i=1
Yi=60
20 = 3
Now, substitute the given values into the formulas to find ˆ
β1and ˆ
β0:
ˆ
β1=180 −20(2)(3)
100 =180 −120
100 = 0.6
ˆ
β0= 3 −0.6(2) = 3 −1.2 = 1.8
Therefore, the least square estimates are ˆ
β0= 1.8and ˆ
β1= 0.6.
(b) To test if there is a relationship between Xand Y, we can use the
hypothesis:
H0:β1= 0
H1:β1= 0
We can perform an F-test to test this hypothesis.
(c) To compute the 95
ˆ
β1±tα/2,n−2
s
qPn
i=1(Xi−¯
X)2
where s2=1
n−2Pn
i=1 Y2
i−ˆ
β0Pn
i=1 Yi−ˆ
β1Pn
i=1 XiYiand tα/2,n−2is the
t-value corresponding to a 95
18
Question 22
Question
Suppose we have performed a linear regression analysis and obtained the fol-
lowing information about the regression coefficients:
ˆ
β0= 12.4,ˆ
β1=−1.8,Var(ˆ
β0) = 2.5,Var(ˆ
β1) = 0.3,Cov(ˆ
β0,ˆ
β1) = −0.6.
Given this information, determine the standard error for estimating the slope
of the regression line.
Solution
Step 1: The standard error for estimating the slope of the regression line, de-
noted as SE(ˆ
β1), can be calculated using the formula:
SE(ˆ
β1) = qVar(ˆ
β1) = √0.3 = 0.5477.
Therefore, the standard error for estimating the slope of the regression line
is 0.5477.
Question 23
Question
Suppose we have a linear regression model given by ˆ
Y= 3X1−2X2+ 5X3
with n= 50 observations. The estimated standard errors for the coefficients are
SE(ˆ
β1) = 0.6,SE(ˆ
β2) = 0.4, and SE(ˆ
β3) = 0.8. Test the null hypothesis H0:
β1=β2=β3= 0 against the alternative hypothesis Ha:at least one βi= 0.
Use a significance level of α= 0.05.
Solution
Step 1: Calculate the test statistic for the given hypothesis test using the for-
mula:
F=(RSS0−RSS1)/q
RSS1/(n−p−1)
where - RSS0is the residual sum of squares under the null hypothesis, - RSS1is
the residual sum of squares under the alternative hypothesis, - qis the number
of restrictions (in this case, q= 3), - nis the number of observations (given as
n= 50), - pis the number of predictors in the model (in this case, p= 3).
Under the null hypothesis, RSS0=RSS where RSS is the residual sum of
squares from the model. Now we need to calculate RSS1by fitting the reduced
model with all coefficients set to zero.
19
Step 2: Calculate the test statistic. The F-statistic is given by:
F=(RSS −RSS1)/q
RSS1/(n−p−1)
Step 3: Determine the critical value of the F-distribution with qand n−p−1
degrees of freedom at the 0.05 significance level. If the test statistic is greater
than the critical value, we reject the null hypothesis.
Step 4: Make a decision. If the test statistic is greater than the critical value,
we reject the null hypothesis; otherwise, we fail to reject the null hypothesis.
This completes the hypothesis test.
Question 24
Question
Suppose we have a dataset of 50 observations and we fit a simple linear regression
model with one predictor variable. The regression sum of squares (RSS) is found
to be 300 and the residual sum of squares (RSS) is found to be 200. Perform a
hypothesis test to determine if the regression model is significant at the 5
Solution
Step 1: Calculate the degrees of freedom for the F-test. The degrees of freedom
for the regression model (numerator) is 1, and for the residuals (denominator)
is 50 −1−1 = 48.
Step 2: Set up the null and alternative hypotheses. Null hypothesis (H0):
The regression coefficients are all equal to zero, suggesting that the model is
not significant. Alternative hypothesis (Ha): At least one regression coefficient
is non-zero, suggesting that the model is significant.
Step 3: Calculate the F-statistic. The formula for the F-statistic is:
F=(RSSnull −RSSfull)/(dfnull −dffull)
RSSfull/dffull
In our case, RSSnull = 500 (just the intercept), RSSfull = 200 (includes the
predictor variable), dfnull = 49, and dffull = 48.
Plugging in the values, we get:
F=(500 −200)/(49 −48)
200/48 =300
200/48 = 1.44
Step 4: Determine the critical value. At the 5
Step 5: Make a decision. Since 1.44 < 4.11, we fail to reject the null hy-
pothesis. There is not enough evidence to conclude that the regression model
is significant at the 5
20
Question 25
Question
Let’s consider a linear regression model with one predictor variable. The follow-
ing table shows the data for a study conducted investigating the relationship
between the number of hours studied and the exam score obtained by a group
of students.
Hours Studied (x) Exam Score (y)
2 55
4 63
6 72
8 79
Calculate the coefficient of determination (R2) for this data set. Interpret
your result in the context of the study.
Solution
Step 1: Calculate the mean of hours studied (¯x), the mean of exam scores (¯y),
and the deviations from the mean for both variables.
The mean of hours studied is:
¯x=2+4+6+8
4=20
4= 5
The mean of exam scores is:
¯y=55 + 63 + 72 + 79
4=269
4= 67.25
The deviations from the mean are:
x y x −¯x y −¯y
2 55 −3−12.25
4 63 −1−4.25
6 72 1 4.75
8 79 3 11.75
Step 2: Calculate the total sum of squares (SST), regression sum of squares
(SSR), and residual sum of squares (SSE).
The total sum of squares (SST) is:
SST =X(yi−¯y)2= (−12.25)2+ (−4.25)2+ 4.752+ 11.752
The regression sum of squares (SSR) can be calculated using the formula:
SSR =ˆ
β1P(xi−¯x)2where ˆ
β1is the estimated slope coefficient.
The residual sum of squares (SSE) can be calculated as: SSE =SST −SSR
21
Step 3: Calculate the coefficient of determination (R2) using the formula:
R2=SSR
SST
Step 4: Interpret the coefficient of determination (R2) in the context of the
study.
The coefficient of determination (R2) helps to explain the proportion of
the variance in the dependent variable (exam scores) that can be explained by
the independent variable (hours studied). Just interpret the R2value in this
context.
22
Question 2
Question
Suppose we have a dataset with 100 observations where the response variable
Yand predictor variable Xare related by the linear regression model Y=
β0+β1X+ε, where εis the error term. We fit the model and obtain the
following results:
ˆ
β0= 5.2,ˆ
β1= 2.3, SE(ˆ
β1) = 0.4
Assuming that the standard errors of the estimated coefficients are correct, test
at the 5
Solution
Step 1: State the null and alternative hypotheses. The null hypothesis (H0)
states that there is no linear relationship between Xand Y, meaning β1= 0.
The alternative hypothesis (Ha) states that there is a linear relationship between
Xand Y, meaning β1= 0.
Step 2: Calculate the test statistic. The test statistic for testing the slope
coefficient β1is given by
t=ˆ
β1
SE(ˆ
β1)
Step 3: Determine the critical value. Since we are testing at the 5
Step 4: Make a decision. If the test statistic falls within the critical values,
we reject the null hypothesis. If it falls outside the critical values, we fail to
reject the null hypothesis.
Step 5: Calculate the test statistic:
t=2.3
0.4= 5.75
Step 6: Make a decision. Since the test statistic 5.75 falls outside the critical
values of -2.364 and 2.364, we reject the null hypothesis.
Step 7: Conclusion. There is enough evidence to conclude that there is a
linear relationship between the predictor variable Xand the response variable
Yat the 5
Question 4
Question
Consider a linear regression model with one predictor variable:
Y=β0+β1X+ϵ
2
where ϵ∼N(0, σ2). Suppose we have the following data:
X Y
1 3
2 5
3 6
4 8
Perform a hypothesis test at level α= 0.05 to determine if the slope of the
regression line is significantly different from zero. State the null and alternative
hypotheses, calculate the test statistic, and determine the conclusion of the test.
Solution
Step 1: Formulate the hypotheses
The null hypothesis H0and the alternative hypothesis H1are as follows: -
H0:β1= 0 (The slope of the regression line is not significantly different from
zero) - H1:β1= 0 (The slope of the regression line is significantly different
from zero)
Step 2: Calculate the test statistic
The test statistic for testing the slope of the regression line is given by:
t=b1
SE(b1)
where b1is the estimated slope coefficient and SE(b1)is the standard error of
the slope coefficient.
To calculate b1, first compute the sample means ¯
Xand ¯
Y:
¯
X=1+2+3+4
4= 2.5
¯
Y=3+5+6+8
4= 5.5
Then, compute the sample covariance SXY and sample variance S2
X:
SXY =Pn
i=1(Xi−¯
X)(Yi−¯
Y)
n−1=(1 −2.5)(3 −5.5) + (2 −2.5)(5 −5.5) + (3 −2.5)(6 −5.5) + (4 −2.5)(8 −5.5)
3= 2.25
S2
X=Pn
i=1(Xi−¯
X)2
n−1=(1 −2.5)2+ (2 −2.5)2+ (3 −2.5)2+ (4 −2.5)2
3= 1.25
Now, we can calculate the estimated slope coefficient b1:
b1=SXY
S2
X
=2.25
1.25 = 1.8
Next, calculate the standard error of the slope coefficient SE(b1):
SE(b1) = sMSE
S2
X
3
where MSE is the mean squared error (residual variance) and is given by:
MSE =Pn
i=1(Yi−ˆ
Yi)2
n−2
and the predicted values ˆ
Yiare obtained from the regression model.
Step 3: Make a decision
Using the calculated values and the test statistic formula, we find the test
statistic:
t=1.8
SE(b1)
We can compare this value to the critical values of the t-distribution with
n−2 = 2 degrees of freedom at α= 0.05 to make a decision about whether to
reject the null hypothesis or not.
Question 5
Question
Let Ybe a response variable and Xbe a predictor variable in a linear regression
model. Suppose the least squares regression line is given by ˆ
Y= 5 + 3X. If the
residual standard error is found to be 4.2, can we conclude that the regression
line is a good fit for the data at the 5
Solution
Step 1: State the null and alternative hypotheses. - Null hypothesis (H0): The
regression line is not a good fit for the data. - Alternative hypothesis (HA):
The regression line is a good fit for the data.
Step 2: Calculate the test statistic. The test statistic is given by:
t=b1
SE(b1)
where b1is the coefficient of the predictor variable in the regression model and
SE(b1)is the standard error of the coefficient.
In this case, b1= 3 and the standard error is equal to the residual standard
error, SE(b1) = 4.2. Therefore:
t=3
4.2≈0.7143
Step 3: Determine the critical value. Since we are conducting a hypothesis
test at the 5
Step 4: Make a decision. Since |0.7143|<2.306, we fail to reject the null
hypothesis. This means there is not enough evidence to conclude that the
regression line is a good fit for the data at the 5
4
Question 6
Question
Suppose we have a dataset with two variables, Xand Y, and we are inter-
ested in examining the relationship between them using linear regression. After
performing a simple linear regression analysis, we obtain the following results:
ˆ
Y= 2.5X+ 10
SE(ˆ
Y) = 3.2
Slope of the regression line, ˆ
β1= 2.5
Standard error of the slope, SE(ˆ
β1) = 0.6
Calculate the 95% confidence interval for the true slope parameter, β1.
Solution
Step 1: To calculate the 95% confidence interval for the true slope parameter,
β1, we will use the formula:
ˆ
β1±tα/2×SE(ˆ
β1)
where tα/2is the critical value for a t-distribution with n−2degrees of
freedom (where nis the sample size) at α/2significance level, and here α= 0.05
for a 95% confidence interval.
Step 2: Since we are not given the sample size, we cannot determine the
exact critical value tα/2. However, for a 95% confidence interval and a large
sample size, the critical value is approximately 2.
Step 3: Substituting the values into the formula, we have:
2.5±2×0.6
Step 4: Simplifying the expression, we get:
2.5±1.2
Step 5: Therefore, the 95% confidence interval for the true slope parameter,
β1, is approximately [1.3,3.7].
Question 7
Question
Let Ybe the dependent variable, Xbe the independent variable, and ˆ
Ybe
the predicted value of Yfrom a linear regression model. Consider the following
hypothesis test for the slope coefficient in a simple linear regression model:
H0:β1= 0 against H1:β1= 0
5
A random sample of 25 observations is taken, and the estimated regression
model is given by ˆ
Y= 10 + 3X. The estimated standard error of the slope
coefficient is s.e(ˆ
β1) = 1.2.
Perform a hypothesis test at a significance level of α= 0.05 and determine
if there is enough evidence to conclude that the independent variable is a sig-
nificant predictor of the dependent variable.
Solution
Step 1: Calculate the test statistic. The test statistic for testing the slope
coefficient in a simple linear regression model is given by:
t=ˆ
β1−0
s.e(ˆ
β1)
Given that ˆ
β1= 3 and s.e(ˆ
β1) = 1.2, we have:
t=3−0
1.2=3
1.2= 2.5
Step 2: Determine the critical value. Since we are performing a two-tailed
test at α= 0.05 significance level, the critical values can be found using a
t-distribution table with n−2degrees of freedom, where nis the sample size.
Since the sample size is 25, we have df = 25 −2 = 23. The critical values
can be found as tα/2,23 =±2.069.
Step 3: Make a decision. Since the calculated test statistic t= 2.5falls
outside the critical values −2.069 and 2.069, we reject the null hypothesis H0.
Therefore, there is enough evidence to conclude that the independent variable
is a significant predictor of the dependent variable at the α= 0.05 significance
level.
Question 8
Question
Let’s consider a linear regression model where Y=β0+β1X+ϵ, where ϵ∼
N(0, σ2). For a certain dataset, we obtain the estimated regression equation as
ˆ
Y= 3 + 2X. Now, we want to test the null hypothesis H0:β1= 0 against the
alternative hypothesis H1:β1= 0 at a significance level of 0.05. Can we reject
the null hypothesis based on this information?
Solution
Step 1: Calculate the t-statistic. The t-statistic for testing the slope coefficient
β1is given by:
t=ˆ
β1
SE(ˆ
β1)
6
Where ˆ
β1is the estimated value of β1and SE(ˆ
β1)is the standard error of the
estimated coefficient.
Here, ˆ
β1= 2 (given in the regression equation) and SE(ˆ
β1) = ˆσ
√∑(Xi−¯
X)2,
where ˆσis the estimated standard error of the regression and ¯
Xis the mean of
X values.
Step 2: Calculate the standard error of the regression. The estimated stan-
dard error of the regression ˆσcan be calculated using:
ˆσ=sP(Yi−ˆ
Yi)2
n−2
Given ˆ
Y= 3 + 2Xand Y=β0+β1X+ϵ, we can substitute these values
into the formula to get the sum of squared residuals.
Step 3: Calculate the degrees of freedom. The degrees of freedom for the
t-distribution in this case is n−2.
Step 4: Look up the critical t-value at a significance level of 0.05 with the
corresponding degrees of freedom and check if the calculated t-statistic falls
within the critical region.
If the calculated t-statistic falls within the critical region, we reject the null
hypothesis; otherwise, we fail to reject it.
Question 9
Question
Let’s consider a linear regression model where we are trying to predict a stu-
dent’s final exam score based on the number of hours spent studying, represented
by the following model: Yi=β0+β1Xi+εi, where Yiis the final exam score
of student i,Xiis the number of hours spent studying by student i,β0is the
intercept, β1is the coefficient of hours spent studying, and εiis the error term
for student i.
Suppose we have collected data from 20 students, and the least squares
estimated regression line is ˆ
Y= 70+3X. We also have the following information:
P(Yi−ˆ
Yi)2= 600 and PX2
i= 100. Using a significance level of α= 0.05, test
the null hypothesis H0:β1= 0 against the alternative hypothesis H1:β1= 0.
Solution
Step 1: Calculate the test statistic. The test statistic for testing whether the
slope coefficient is significantly different from zero is given by:
t=ˆ
β1
sP(Yi−ˆ
Yi)2
n−2/PX2
i
7
Substitute the given values into the formula:
t=3
r600
20 −2/100
=3
√30 ≈0.5477
Step 2: Determine the critical value. Since the alternative hypothesis is two-
sided (β1= 0), the critical values for a significance level of 0.05 and degrees of
freedom n−2 = 18 are tα/2,n−2=t0.025,18 ≈ ±2.101.
Step 3: Make a decision. Since −2.101 <0.5477 <2.101, we fail to reject
the null hypothesis.
Step 4: Conclusion. With a significance level of 0.05, there is not enough
evidence to conclude that the number of hours spent studying has a significant
effect on the student’s final exam score.
Question 10
Question
Suppose we have a multiple linear regression model with three predictors: x1,
x2, and x3. The estimated regression equation is given by ˆy= 2x1+ 3x2−x3.
The estimated variance of the error term is ˆσ2= 4.
Test the null hypothesis H0:β1=β2= 0 against the alternative hypothesis
Ha:not all βiare equal to zero using an F-test at the 5
Solution
Step 1: Calculate the F-statistic. The F-statistic is calculated as:
F=(SSR/q)
(SSE/(n−p−1)),
where: - SSR is the sum of squares due to regression, - qis the number of
restrictions (in this case, q= 2), - SSE is the sum of squared errors, and - nis
the total number of observations (sample size) and pis the number of predictors.
Given: - SSR = 40, - n= 50 (sample size), - p= 3 (number of predictors),
-q= 2 (number of restrictions), - ˆσ2= 4.
Substitute these values into the formula:
F=(40/2)
(4/(50 −3−1)) =20
(4/46) =20
0.0869565 ≈230.435.
Step 2: Determine the critical value. At the 5
Step 3: Make a decision. Since the calculated F-statistic of approximately
230.435 is greater than the critical value of 3.195, we reject the null hypothesis.
Conclusion: We have enough evidence to conclude that at least one of the
regression coefficients β1, β2is not equal to zero.
8
Question 11
Question
Suppose we have a linear regression model given by:
Yi=β0+β1Xi+ϵi
where Yirepresents the response variable, Xirepresents the predictor variable,
ϵirepresents the error term for the i-th observation, and β0and β1are the
intercept and slope coefficients respectively.
Given the following data points:
X Y
1 2
2 3
3 4
4 6
5 5
a) Calculate the least squares estimates for β0and β1.
b) Use the least squares estimates to predict the value of Ywhen X= 6.
Solution
a) To calculate the least squares estimates for β0and β1, we need to find the
values that minimize the sum of squared errors Pn
i=1(Yi−(ˆ
β0+ˆ
β1Xi))2.
Step 1: Calculate the means of Xand Y.
The mean of X:
¯
X=1+2+3+4+5
5= 3
The mean of Y:
¯
Y=2+3+4+6+5
5= 4
Step 2: Calculate the least squares estimate for β1.
ˆ
β1=Pn
i=1(Xi−¯
X)(Yi−¯
Y)
Pn
i=1(Xi−¯
X)2
Plugging in the given data:
ˆ
β1=(1 −3)(2 −4) + (2 −3)(3 −4) + (3 −3)(4 −4) + (4 −3)(6 −4) + (5 −3)(5 −4)
(1 −3)2+ (2 −3)2+ (3 −3)2+ (4 −3)2+ (5 −3)2
ˆ
β1=2+1+0+2+2
2+1+0+1+4 =5
8= 0.625
Step 3: Calculate the least squares estimate for β0.
9
ˆ
β0=¯
Y−ˆ
β1¯
X
ˆ
β0= 4 −0.625 ×3 = 4 −1.875 = 2.125
Therefore, the least squares estimates are:
ˆ
β0= 2.125 and ˆ
β1= 0.625
b) To predict the value of Ywhen X= 6, we will use the estimated regression
equation: ˆ
Y=ˆ
β0+ˆ
β1X
Plugging in X= 6:
ˆ
Y= 2.125 + 0.625 ×6 = 2.125 + 3.75 = 5.875
Thus, the predicted value of Ywhen X= 6 is 5.875.
Question 12
Question
Suppose we have a multiple linear regression model with three independent
variables: x1,x2, and x3. The model predicts the dependent variable yusing
the equation:
y=β0+β1x1+β2x2+β3x3+ϵ
where β0,β1,β2, and β3are the coefficients, and ϵis the error term.
Given the following information:
-ˆ
β0= 2.5-ˆ
β1= 1.8-ˆ
β2=−0.7-ˆ
β3= 0.3-SSR = 150.4-SSE = 75.2-
n= 50 - Var(ˆ
β1) = 0.04 - Var(ˆ
β2) = 0.01 - Var(ˆ
β3) = 0.02
Test at the 1
Solution
Step 1: Compute the degrees of freedom.
dfRegression =k= 3
dfError =n−k−1 = 50 −3−1 = 46
Step 2: Compute the Mean Sum of Squares Explained (MSR) and Mean
Sum of Squares Error (MSE).
MSR =SSR
k=150.4
3= 50.1333
MSE =SSE
dfError
=75.2
46 ≈1.6348
10
Step 3: Compute the F-statistic.
F=MSR
MSE =50.1333
1.6348 ≈30.6476
Step 4: Lookup the critical value from the F-distribution table. For dfRegression =
3and dfError = 46 at the 1
Step 5: Make a decision. Since the computed F-statistic (30.6476) is greater
than the critical value (4.8), we reject the null hypothesis.
Step 6: Conclusion. Therefore, we have enough evidence to conclude that
at least one of the coefficients β2and β3is not equal to zero in the model.
Question 13
Question
Suppose we have a dataset with 50 observations, where the dependent variable
yis related to two independent variables x1and x2through the multiple linear
regression model:
y=β0+β1x1+β2x2+ε
The following output from a statistical software summarizes the regression
results:
Variable Coefficient Standard Error T-statistic p-value
β07.52 1.34 5.61 <0.001
x12.31 0.87 2.66 0.012
x2−1.15 0.42 −2.74 0.009
Determine whether the independent variable x2has a significant effect on
the dependent variable yat the significance level of 0.01.
Solution
Step 1: Formulate the hypotheses. - Null hypothesis: H0:β2= 0 (The
coefficient of x2is not significantly different from zero). - Alternative hypothesis:
Ha:β2= 0 (The coefficient of x2is significantly different from zero).
Step 2: Identify the significance level. The significance level is α= 0.01.
Step 3: Determine the test statistic. The test statistic is the T-statistic
for x2, which is −2.74.
Step 4: Find the critical value. Since our significance level is α= 0.01
and we are conducting a two-tailed test, the critical values are ±2.68 from the
T-distribution.
Step 5: Make a decision. Since −2.74 lies outside the critical values of
±2.68, we reject the null hypothesis.
11
Step 6: State the conclusion. There is enough evidence to conclude that
the independent variable x2has a significant effect on the dependent variable y
at the significance level of 0.01.
Question 14
Question
Let Ybe a random variable representing the number of hours studied by a group
of students and Xbe a random variable representing the score they achieved
in an exam. A linear regression model was fitted to the data with the following
results:
ˆ
Y= 8 + 0.6Xand SE(ˆ
Y) = 0.75
Calculate the 95
Solution
Step 1: The formula for the confidence interval given a point estimate ˆ
Y, the
standard error SE(ˆ
Y), a critical value zα/2for a 95
Confidence Interval =ˆ
Y±zα/2·SE(ˆ
Y)
Since we need a 95
Step 2: Substituting the given values, we have:
Confidence Interval = 8 + 0.6·80 ±1.96 ·0.75
Solving the expression inside the parentheses:
Confidence Interval = 8 + 48 ±1.47
Step 3: Calculating the confidence interval:
Confidence Interval = [8 + 48 −1.47,8+48+1.47] = [54.53,55.47]
Therefore, the 95
Question 15
Question
Let Ybe a response variable and Xbe a predictor variable. Consider the simple
linear regression model Yi=β0+β1Xi+εi, where εiare independent and
identically distributed random errors with mean 0and variance σ2. Given the
sample data {(X1, Y1),(X2, Y2), . . . , (Xn, Yn)}, we have the following estimated
12
regression equation: ˆ
Y= 3 + 2X. Test the null hypothesis H0:β1= 2 against
the alternative hypothesis H1:β1= 2 at the 5% significance level. Assume that
the residuals are normally distributed.
Solution
Step 1: The test statistic for testing the null hypothesis H0:β1= 2 against the
alternative hypothesis H1:β1= 2 is given by:
t=ˆ
β1−β1,null
SE(ˆ
β1)
where ˆ
β1is the estimated coefficient for X,β1,null is the null value for the
coefficient (in this case, 2), and SE(ˆ
β1)is the standard error of the estimated
coefficient ˆ
β1.
Step 2: The standard error of the estimated coefficient ˆ
β1is given by:
SE(ˆ
β1) = sMSE
Pn
i=1(Xi−¯
X)2
where MSE is the mean squared error obtained from the ANOVA table.
Step 3: Calculate the t-statistic:
t=2−2
SE(ˆ
β1)=0
SE(ˆ
β1)= 0
Step 4: Determine the critical values for a two-tailed test at the 5% signifi-
cance level. For α= 0.05, with df =n−2, using a t-distribution table, we find
the critical values to be −tα/2and tα/2.
Step 5: Make a decision. Since t= 0 falls within the acceptance region
between −tα/2and tα/2, we do not reject the null hypothesis. Therefore, we
do not have enough evidence to suggest that the slope of the regression line is
different from 2at the 5% significance level.
Question 16
Question
Let ˆ
β1be the estimated coefficient for the variable X1in a linear regression
model with two predictors X1and X2. Suppose the variance of ˆ
β1is given by
Var(ˆ
β1)=0.04. If we want to construct a 95% confidence interval for β1(the
true coefficient), what is the length of the confidence interval?
13
Solution
Step 1: The confidence interval for β1can be calculated as ˆ
β1±tα
2,n−2·SE(ˆ
β1),
where tα
2,n−2is the critical value for a t-distribution with n−2degrees of
freedom at the α
2level, and SE(ˆ
β1)is the standard error of the estimate for ˆ
β1.
Step 2: Since we are looking to construct a 95% confidence interval, α= 0.05
and 1−α= 0.95. Therefore, α
2= 0.025.
Step 3: The length of the confidence interval is given by 2·tα
2,n−2·SE(ˆ
β1).
Step 4: Since we are not given the sample size n, we cannot determine the
exact value of tα
2,n−2. However, we can calculate the standard error of the
estimate as SE(ˆ
β1) = qVar(ˆ
β1) = √0.04 = 0.2.
Step 5: Therefore, the length of the confidence interval is 2·t0.025,n−2·0.2.
Step 6: The length of the confidence interval for β1depends on the sample
size nand the critical value t0.025,n−2.
Question 17
Question
Suppose we have a linear regression model given by Y=β0+β1X+ε, where ε∼
N(0, σ2)and β0,β1, and σ2are unknown parameters. Consider the following
hypothesis test:
H0:β1= 0 vs. H1:β1= 0
Suppose we collected a sample of size n= 30. The estimated regression
equation is ˆ
Y= 3 + 2X, and we found that the standard error of ˆ
β1is 0.5.
Conduct the hypothesis test at the 5
Solution
Step 1: Calculate the test statistic The test statistic for testing the slope
coefficient in simple linear regression is given by:
t=ˆ
β1−β1,Hypothesized
SE(ˆ
β1)
Given that ˆ
β1= 2 and SE(ˆ
β1) = 0.5, the test statistic is:
t=2−0
0.5= 4
Step 2: Determine the critical values Since the alternative hypothesis is
two-sided (β1= 0), we need to find the critical values for a two-tailed test at
the 5
For a two-tailed test at 5
Step 3: Look up the critical values Using a t-distribution table or soft-
ware, we find that t0.025,28 ≈ ±2.048.
14
Step 4: Make a decision Since the test statistic t= 4 >2.048, we reject
the null hypothesis H0:β1= 0 in favor of the alternative hypothesis H1:β1= 0
at the 5
Step 5: Conclusion There is sufficient evidence to suggest that there is
a linear relationship between the independent variable Xand the dependent
variable Yat the 5
Question 18
Question
Suppose we have a linear regression model given by Y=β0+β1X+ϵ, where
ϵ∼N(0, σ2). Given the following data and output from an analysis:
Variable Coefficient Standard Error
β03.24 0.62
β11.28 0.36
Test at the significance level of 0.05 whether the slope coefficient is signifi-
cantly different from zero. State the null and alternative hypotheses, calculate
the test statistic and p-value, and draw a conclusion.
Solution
Step 1: Null and Alternative Hypotheses
The null hypothesis H0and alternative hypothesis H1are given by: - H0:
β1= 0 (the slope coefficient is not significantly different from zero) - H1:β1= 0
(the slope coefficient is significantly different from zero)
Step 2: Calculate the Test Statistic
The test statistic is calculated as:
t=β1
SE(β1)=1.28
0.36 = 3.56
Step 3: Calculate the P-Value
Since the alternative hypothesis is two-sided (β1= 0), we need to find the
p-value for |t|>3.56 with df =n−2, where nis the number of observations.
Using a t-table or software, we find that the p-value is less than 0.001.
Step 4: Conclusion
Since the p-value is less than the significance level of 0.05, we reject the null
hypothesis. There is sufficient evidence to conclude that the slope coefficient is
significantly different from zero.
15
Question 19
Question
Suppose we have a linear regression model Y=β0+β1X+ϵ, where Yrepresents
the dependent variable, Xthe independent variable, and ϵ∼N(0, σ2). The
least squares estimators are given by ˆ
β0= 3,ˆ
β1= 2, and the residuals are
ei={−1,0,1,2,−1}. Test the null hypothesis H0:β1= 1 against H1:β1= 1
at the 5% significance level.
Solution
Step 1: Compute the test statistic using the formula:
t=ˆ
β1−β1
SE(ˆ
β1)
where SE( ˆ
β1) is the standard error of ˆ
β1.
Step 2: First, we calculate the standard error:
SE(ˆ
β1) = sPn
i=1 e2
i
n−21
nPn
i=1(Xi−¯
X)2
Step 3: Given that n= 5, we substitute the values to find the standard
error:
SE(ˆ
β1) = v
u
u
t
(−1)2+ 02+ 12+ 22+ (−1)2
5−2 1
5P5
i=1(Xi−¯
X)2!
Step 4: Calculate ¯
X=1
nPn
i=1 Xi:
¯
X=1
5(1+2+3+4+5)=3
Step 5: Substitute the values into the standard error formula to get:
SE(ˆ
β1) = v
u
u
t
6
3 1
5P5
i=1(Xi−3)2!
Step 6: We know P5
i=1(Xi−3)2= 10, so the standard error simplifies to:
SE(ˆ
β1) = s21
50=1
5
Step 7: Calculate the test statistic:
t=2−1
1/5= 5
16
Step 8: Determine the critical values for a two-tailed test at the 5% signif-
icance level. For α= 0.05, degrees of freedom df =n−2 = 5 −2 = 3. The
critical values are ±2.776.
Step 9: Make a decision regarding the null hypothesis: Since 5>2.776, we
reject the null hypothesis. Therefore, we have sufficient evidence to conclude
that β1is not equal to 1.
Question 20
Question
Let Yidenote the response variable and X1i, X2i, . . . , Xpi denote the predictor
variables for the ith observation in a multiple linear regression model. Sup-
pose the model assumptions hold and that observations are independent. In
a study involving 15 observations and 5 predictor variables, the coefficient of
determination (R2) was found to be 0.85.
Test the null hypothesis H0:β1=β2=. . . =β5= 0 against the alternative
hypothesis Ha:at least one of β1, β2, . . . , β5is not equal to 0, using a significance
level of 0.01.
Solution
Step 1: The test statistic for testing the above hypothesis is based on the F-
distribution and it is calculated as
F∗=(R2/p)
(1 −R2)/(n−p−1),
where nis the number of observations and pis the number of predictor
variables.
Step 2: Given that R2= 0.85,n= 15, and p= 5, we can substitute these
values into the formula to find the test statistic:
F∗=(0.85/5)
(1 −0.85)/(15 −5−1) =0.17
0.03 = 5.6667.
Step 3: To decide whether we can reject the null hypothesis at the 0.01
significance level, we compare the test statistic with the critical value from the
F-distribution with pand n−p−1degrees of freedom.
Step 4: With p= 5 and n−p−1=9degrees of freedom, the critical value
of the F-distribution at a significance level of 0.01 is approximately 4.9437.
Step 5: Since the test statistic F∗= 5.6667 is greater than the critical value
4.9437, we reject the null hypothesis.
Step 6: Therefore, we have enough evidence to conclude that at least one of
β1, β2, , β5is not equal to 0.
17
Question 21
Question
Suppose we have a linear regression model given by Y=β0+β1X+ϵ, where ϵis
a random error term with mean 0 and variance σ2. Let n= 20,P20
i=1 Xi= 40,
P20
i=1 Yi= 60,P20
i=1 X2
i= 100,P20
i=1 Y2
i= 150, and P20
i=1 XiYi= 180.
(a) Find the least square estimates of β0and β1.
(b) Test at 5
(c) Compute the 95
Solution
(a) To find the least square estimates of β0and β1, we can use the formulas:
ˆ
β1=Pn
i=1(Xi−¯
X)(Yi−¯
Y)
Pn
i=1(Xi−¯
X)2
ˆ
β0=¯
Y−ˆ
β1¯
X
First, calculate the sample means ¯
Xand ¯
Y:
¯
X=1
n
n
X
i=1
Xi=40
20 = 2
¯
Y=1
n
n
X
i=1
Yi=60
20 = 3
Now, substitute the given values into the formulas to find ˆ
β1and ˆ
β0:
ˆ
β1=180 −20(2)(3)
100 =180 −120
100 = 0.6
ˆ
β0= 3 −0.6(2) = 3 −1.2 = 1.8
Therefore, the least square estimates are ˆ
β0= 1.8and ˆ
β1= 0.6.
(b) To test if there is a relationship between Xand Y, we can use the
hypothesis:
H0:β1= 0
H1:β1= 0
We can perform an F-test to test this hypothesis.
(c) To compute the 95
ˆ
β1±tα/2,n−2
s
qPn
i=1(Xi−¯
X)2
where s2=1
n−2Pn
i=1 Y2
i−ˆ
β0Pn
i=1 Yi−ˆ
β1Pn
i=1 XiYiand tα/2,n−2is the
t-value corresponding to a 95
18
Question 22
Question
Suppose we have performed a linear regression analysis and obtained the fol-
lowing information about the regression coefficients:
ˆ
β0= 12.4,ˆ
β1=−1.8,Var(ˆ
β0) = 2.5,Var(ˆ
β1) = 0.3,Cov(ˆ
β0,ˆ
β1) = −0.6.
Given this information, determine the standard error for estimating the slope
of the regression line.
Solution
Step 1: The standard error for estimating the slope of the regression line, de-
noted as SE(ˆ
β1), can be calculated using the formula:
SE(ˆ
β1) = qVar(ˆ
β1) = √0.3 = 0.5477.
Therefore, the standard error for estimating the slope of the regression line
is 0.5477.
Question 23
Question
Suppose we have a linear regression model given by ˆ
Y= 3X1−2X2+ 5X3
with n= 50 observations. The estimated standard errors for the coefficients are
SE(ˆ
β1) = 0.6,SE(ˆ
β2) = 0.4, and SE(ˆ
β3) = 0.8. Test the null hypothesis H0:
β1=β2=β3= 0 against the alternative hypothesis Ha:at least one βi= 0.
Use a significance level of α= 0.05.
Solution
Step 1: Calculate the test statistic for the given hypothesis test using the for-
mula:
F=(RSS0−RSS1)/q
RSS1/(n−p−1)
where - RSS0is the residual sum of squares under the null hypothesis, - RSS1is
the residual sum of squares under the alternative hypothesis, - qis the number
of restrictions (in this case, q= 3), - nis the number of observations (given as
n= 50), - pis the number of predictors in the model (in this case, p= 3).
Under the null hypothesis, RSS0=RSS where RSS is the residual sum of
squares from the model. Now we need to calculate RSS1by fitting the reduced
model with all coefficients set to zero.
19
Step 2: Calculate the test statistic. The F-statistic is given by:
F=(RSS −RSS1)/q
RSS1/(n−p−1)
Step 3: Determine the critical value of the F-distribution with qand n−p−1
degrees of freedom at the 0.05 significance level. If the test statistic is greater
than the critical value, we reject the null hypothesis.
Step 4: Make a decision. If the test statistic is greater than the critical value,
we reject the null hypothesis; otherwise, we fail to reject the null hypothesis.
This completes the hypothesis test.
Question 24
Question
Suppose we have a dataset of 50 observations and we fit a simple linear regression
model with one predictor variable. The regression sum of squares (RSS) is found
to be 300 and the residual sum of squares (RSS) is found to be 200. Perform a
hypothesis test to determine if the regression model is significant at the 5
Solution
Step 1: Calculate the degrees of freedom for the F-test. The degrees of freedom
for the regression model (numerator) is 1, and for the residuals (denominator)
is 50 −1−1 = 48.
Step 2: Set up the null and alternative hypotheses. Null hypothesis (H0):
The regression coefficients are all equal to zero, suggesting that the model is
not significant. Alternative hypothesis (Ha): At least one regression coefficient
is non-zero, suggesting that the model is significant.
Step 3: Calculate the F-statistic. The formula for the F-statistic is:
F=(RSSnull −RSSfull)/(dfnull −dffull)
RSSfull/dffull
In our case, RSSnull = 500 (just the intercept), RSSfull = 200 (includes the
predictor variable), dfnull = 49, and dffull = 48.
Plugging in the values, we get:
F=(500 −200)/(49 −48)
200/48 =300
200/48 = 1.44
Step 4: Determine the critical value. At the 5
Step 5: Make a decision. Since 1.44 < 4.11, we fail to reject the null hy-
pothesis. There is not enough evidence to conclude that the regression model
is significant at the 5
20
Question 25
Question
Let’s consider a linear regression model with one predictor variable. The follow-
ing table shows the data for a study conducted investigating the relationship
between the number of hours studied and the exam score obtained by a group
of students.
Hours Studied (x) Exam Score (y)
2 55
4 63
6 72
8 79
Calculate the coefficient of determination (R2) for this data set. Interpret
your result in the context of the study.
Solution
Step 1: Calculate the mean of hours studied (¯x), the mean of exam scores (¯y),
and the deviations from the mean for both variables.
The mean of hours studied is:
¯x=2+4+6+8
4=20
4= 5
The mean of exam scores is:
¯y=55 + 63 + 72 + 79
4=269
4= 67.25
The deviations from the mean are:
x y x −¯x y −¯y
2 55 −3−12.25
4 63 −1−4.25
6 72 1 4.75
8 79 3 11.75
Step 2: Calculate the total sum of squares (SST), regression sum of squares
(SSR), and residual sum of squares (SSE).
The total sum of squares (SST) is:
SST =X(yi−¯y)2= (−12.25)2+ (−4.25)2+ 4.752+ 11.752
The regression sum of squares (SSR) can be calculated using the formula:
SSR =ˆ
β1P(xi−¯x)2where ˆ
β1is the estimated slope coefficient.
The residual sum of squares (SSE) can be calculated as: SSE =SST −SSR
21
Step 3: Calculate the coefficient of determination (R2) using the formula:
R2=SSR
SST
Step 4: Interpret the coefficient of determination (R2) in the context of the
study.
The coefficient of determination (R2) helps to explain the proportion of
the variance in the dependent variable (exam scores) that can be explained by
the independent variable (hours studied). Just interpret the R2value in this
context.
22