Statistics Assignment: Exploring Linear Models and ANOVA Analysis
VerifiedAdded on 2023/06/05
|20
|1780
|305
Homework Assignment
AI Summary
This statistics assignment delves into the analysis of linear models using ANOVA techniques. It covers a range of topics, including the design matrix for different models, parameter estimation, residual standard errors, and hypothesis testing. The assignment also includes detailed ANOVA table construction, power calculations, and effect size analysis. Furthermore, it examines the significance of various factors, such as race and smoking habits, on outcome variables. The document provides a comprehensive exploration of statistical modeling and inference, offering insights into model selection, hypothesis validation, and the interpretation of statistical results. Desklib provides a platform for students to access such solved assignments and enhance their understanding of complex statistical concepts.

Running Head: STATISTICS
Statistics
Name of the student:
Name of the university:
Course ID:
Statistics
Name of the student:
Name of the university:
Course ID:
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

1STATISTICS
Table of Contents
Answer 1..........................................................................................................................................3
1.a)................................................................................................................................................3
1.a.i)..........................................................................................................................................3
1. a.ii)........................................................................................................................................3
1.a.iii)........................................................................................................................................3
1. b)..............................................................................................................................................4
1.b.i)..........................................................................................................................................4
1.b.ii)........................................................................................................................................4
1.b.iii).......................................................................................................................................5
1.c)................................................................................................................................................6
1.c.i)..........................................................................................................................................7
1.c.ii).........................................................................................................................................7
1.c.iii)........................................................................................................................................7
1.d.................................................................................................................................................7
1.d.i)..........................................................................................................................................7
1.d.ii)........................................................................................................................................7
1.e)................................................................................................................................................8
1. f)...............................................................................................................................................9
1. f. i)........................................................................................................................................9
1. f. ii).....................................................................................................................................11
Answer 2........................................................................................................................................12
2.a)..............................................................................................................................................12
2.b).............................................................................................................................................13
2.b.i)........................................................................................................................................13
2.b.ii)......................................................................................................................................13
Answer 3........................................................................................................................................13
3.a)..............................................................................................................................................13
3.b).............................................................................................................................................13
Table of Contents
Answer 1..........................................................................................................................................3
1.a)................................................................................................................................................3
1.a.i)..........................................................................................................................................3
1. a.ii)........................................................................................................................................3
1.a.iii)........................................................................................................................................3
1. b)..............................................................................................................................................4
1.b.i)..........................................................................................................................................4
1.b.ii)........................................................................................................................................4
1.b.iii).......................................................................................................................................5
1.c)................................................................................................................................................6
1.c.i)..........................................................................................................................................7
1.c.ii).........................................................................................................................................7
1.c.iii)........................................................................................................................................7
1.d.................................................................................................................................................7
1.d.i)..........................................................................................................................................7
1.d.ii)........................................................................................................................................7
1.e)................................................................................................................................................8
1. f)...............................................................................................................................................9
1. f. i)........................................................................................................................................9
1. f. ii).....................................................................................................................................11
Answer 2........................................................................................................................................12
2.a)..............................................................................................................................................12
2.b).............................................................................................................................................13
2.b.i)........................................................................................................................................13
2.b.ii)......................................................................................................................................13
Answer 3........................................................................................................................................13
3.a)..............................................................................................................................................13
3.b).............................................................................................................................................13

2STATISTICS
3.b.i)........................................................................................................................................14
3.b.ii)......................................................................................................................................14
Answer 4........................................................................................................................................14
Answer 5........................................................................................................................................14
5.a)..............................................................................................................................................14
5. b)............................................................................................................................................14
5.b.i)........................................................................................................................................15
5.b.ii)......................................................................................................................................15
5.b.iii).....................................................................................................................................15
5.b.iv)......................................................................................................................................15
5.c)..............................................................................................................................................15
5.d).............................................................................................................................................16
5.d.i)........................................................................................................................................17
5.d.ii)......................................................................................................................................17
5.d.iii).....................................................................................................................................17
5.d.iv)......................................................................................................................................17
5.e)..............................................................................................................................................17
References:....................................................................................................................................19
3.b.i)........................................................................................................................................14
3.b.ii)......................................................................................................................................14
Answer 4........................................................................................................................................14
Answer 5........................................................................................................................................14
5.a)..............................................................................................................................................14
5. b)............................................................................................................................................14
5.b.i)........................................................................................................................................15
5.b.ii)......................................................................................................................................15
5.b.iii).....................................................................................................................................15
5.b.iv)......................................................................................................................................15
5.c)..............................................................................................................................................15
5.d).............................................................................................................................................16
5.d.i)........................................................................................................................................17
5.d.ii)......................................................................................................................................17
5.d.iii).....................................................................................................................................17
5.d.iv)......................................................................................................................................17
5.e)..............................................................................................................................................17
References:....................................................................................................................................19
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

3STATISTICS
Answer 1.
1.a)
1.a.i)
M0: yij = α + Ԑij.
For model M0, the design matrix X and vector parameter β in the matrix are-
Race (i) and β = 1.5319.
1. a.ii)
M1: yij =a +β1xij +β2wij +eij
For model M1, the design matrix X are-
Smoke (xij) and Lwtkg (wij)
The vector parameters (β) in the matrix are respectively-
β1 = -0.44314 and β2 = 0.00556.
1.a.iii)
M2: yij =a + β1xij + β2wij + τi + eij
Answer 1.
1.a)
1.a.i)
M0: yij = α + Ԑij.
For model M0, the design matrix X and vector parameter β in the matrix are-
Race (i) and β = 1.5319.
1. a.ii)
M1: yij =a +β1xij +β2wij +eij
For model M1, the design matrix X are-
Smoke (xij) and Lwtkg (wij)
The vector parameters (β) in the matrix are respectively-
β1 = -0.44314 and β2 = 0.00556.
1.a.iii)
M2: yij =a + β1xij + β2wij + τi + eij
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

4STATISTICS
For model M2, the design matrix X are-
Smoke (xij), Lwtkg (wij) and interaction effect of ‘Smoke (xij) and Lwtkg (wij)’.
The vector parameters (β) in the matrix are respectively-
β1 = 0.13856, β2 = 0.01246 and β3 = -0.00978.
1. b)
1.b.i)
1.b.ii)
For model M2, the design matrix X are-
Smoke (xij), Lwtkg (wij) and interaction effect of ‘Smoke (xij) and Lwtkg (wij)’.
The vector parameters (β) in the matrix are respectively-
β1 = 0.13856, β2 = 0.01246 and β3 = -0.00978.
1. b)
1.b.i)
1.b.ii)

5STATISTICS
1.b.iii)
Better model than M0, M1 and M2:
1.b.iii)
Better model than M0, M1 and M2:
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

6STATISTICS
The new model (multiple linear regression model) has higher predictability (43.92%) where
Bwtkg is assumed to be the dependent variable and rest of all the variables (Race, Observations,
Smoke and Lwtkg.) as predictors.
1.c)
The new model (multiple linear regression model) has higher predictability (43.92%) where
Bwtkg is assumed to be the dependent variable and rest of all the variables (Race, Observations,
Smoke and Lwtkg.) as predictors.
1.c)
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

7STATISTICS
1.c.i)
The co-efficient of estimates are 2.63445, (0.13856), 0.01246 and (-0.00978).
1.c.ii)
The residual standard errors are shown in following table.
1.c.iii)
The co-efficient of residual standard error are – 1.48641, 1.77848, 0.02464 and 0.02933
respectively.
1.d.
1.d.i)
The uncorrected SSR = 8.6954, SST = (0.8769+0.094+0.0604+8.6954) = 9.7267 and SSE
= 0.7372.
1.d.ii)
1.c.i)
The co-efficient of estimates are 2.63445, (0.13856), 0.01246 and (-0.00978).
1.c.ii)
The residual standard errors are shown in following table.
1.c.iii)
The co-efficient of residual standard error are – 1.48641, 1.77848, 0.02464 and 0.02933
respectively.
1.d.
1.d.i)
The uncorrected SSR = 8.6954, SST = (0.8769+0.094+0.0604+8.6954) = 9.7267 and SSE
= 0.7372.
1.d.ii)

8STATISTICS
The corrected SSR = 9.0241, SST = (0.7027+9.0241) = 9.7267 and SSE = 0.7081.
1.e)
The F-statistic = 0.6326 with degrees of freedom 3 and 16. The p-value of F-statistic =
0.6047 (Lenth 2016).
The p-values of all the test-statistics are – 0.9389, 0.6199 and 0.7431.
The corrected SSR = 9.0241, SST = (0.7027+9.0241) = 9.7267 and SSE = 0.7081.
1.e)
The F-statistic = 0.6326 with degrees of freedom 3 and 16. The p-value of F-statistic =
0.6047 (Lenth 2016).
The p-values of all the test-statistics are – 0.9389, 0.6199 and 0.7431.
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

9STATISTICS
1. f)
1. f. i)
Race 1 Race 2 Race 3
2 .0 2 .5 3 .0 3 .5 4 .0 4 .5
Between Kg. vs. Race
Race
B e tw e e n K g .
The means of Between Kg. are not equal for different levels of Races. No outliers are
present in each distribution of Between Kg. according to the different races. The distribution of
between kg. has greater median with respect to Race 2 rather than Race 1 and Race 3.
1. f)
1. f. i)
Race 1 Race 2 Race 3
2 .0 2 .5 3 .0 3 .5 4 .0 4 .5
Between Kg. vs. Race
Race
B e tw e e n K g .
The means of Between Kg. are not equal for different levels of Races. No outliers are
present in each distribution of Between Kg. according to the different races. The distribution of
between kg. has greater median with respect to Race 2 rather than Race 1 and Race 3.
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

10STATISTICS
No Yes
2 .0 2 .5 3 .0 3 .5 4 .0 4 .5
Bwteen Kg. vs. Smoke
Between Kg.
S m o k e
4
7
The means of Between Kg. are not equal for different levels of Smoking habit. The
distribution of Between Kg. with the presence of smoking habit has outliers. The distribution of
between kg. has greater median for absence of smoke rather than the presence of smoke.
No Yes
2 .0 2 .5 3 .0 3 .5 4 .0 4 .5
Bwteen Kg. vs. Smoke
Between Kg.
S m o k e
4
7
The means of Between Kg. are not equal for different levels of Smoking habit. The
distribution of Between Kg. with the presence of smoking habit has outliers. The distribution of
between kg. has greater median for absence of smoke rather than the presence of smoke.

11STATISTICS
50 60 70 80
-1 .0 -0 .5 0.0 0.5 1.0
Scatterplot of Lwtkg. vs. Residuals
Lwtkg.
R esid ua ls
The scatterplot of Lwtkg. vs. residuals refers that regression assumptions are not satisfied
here. The scatter ness of Lwtkg. vs. residuals is pretty high.
1. f. ii)
In M2, the value of β1 = 0.13856. We are eager to find the significance of hypothesis at
5% level of significance. The test statistic is T-statistic. The calculated value of test-statistic =
0.078 with two-tailed p-value = 0.9389. With respect to the hypothesis β1 = (-1), the calculated p-
value is around 0.01. The p-value is less than 5%. Hence, we can reject the null hypothesis of β1
= (-1).
50 60 70 80
-1 .0 -0 .5 0.0 0.5 1.0
Scatterplot of Lwtkg. vs. Residuals
Lwtkg.
R esid ua ls
The scatterplot of Lwtkg. vs. residuals refers that regression assumptions are not satisfied
here. The scatter ness of Lwtkg. vs. residuals is pretty high.
1. f. ii)
In M2, the value of β1 = 0.13856. We are eager to find the significance of hypothesis at
5% level of significance. The test statistic is T-statistic. The calculated value of test-statistic =
0.078 with two-tailed p-value = 0.9389. With respect to the hypothesis β1 = (-1), the calculated p-
value is around 0.01. The p-value is less than 5%. Hence, we can reject the null hypothesis of β1
= (-1).
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

12STATISTICS
0.00
0.02
0.04
0.06
0 20 40 60 80
x
y
Answer 2.
2.a)
The linear model and ANOVA table is given as-
0.00
0.02
0.04
0.06
0 20 40 60 80
x
y
Answer 2.
2.a)
The linear model and ANOVA table is given as-
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

13STATISTICS
2.b)
2.b.i)
The power of the test is found to be 0.3898645.
For α1= 1, 1.5, 2, 2.5 and 3, the effect sizes of the test (for α2 = 0) are 6.72, 3.70, 2.69,
2.24 and 2.01 (Searle and Gruber 2016).
2.b.ii)
For α1= 1, 1.5, 2, 2.5 and 3, the effect sizes of the test (for α2 = 0) are 4.54, 2.62 and 2.02.
Answer 3.
3.a)
Source SS df MS F p-value
Treatments 16.810 1 16.8100 4.2822 0.1303
Blocks 12.042 1 12.0417 3.0675 0.1782
Error 11.777 3 3.9256
Total 40.629 5
3.b)
2.b)
2.b.i)
The power of the test is found to be 0.3898645.
For α1= 1, 1.5, 2, 2.5 and 3, the effect sizes of the test (for α2 = 0) are 6.72, 3.70, 2.69,
2.24 and 2.01 (Searle and Gruber 2016).
2.b.ii)
For α1= 1, 1.5, 2, 2.5 and 3, the effect sizes of the test (for α2 = 0) are 4.54, 2.62 and 2.02.
Answer 3.
3.a)
Source SS df MS F p-value
Treatments 16.810 1 16.8100 4.2822 0.1303
Blocks 12.042 1 12.0417 3.0675 0.1782
Error 11.777 3 3.9256
Total 40.629 5
3.b)

14STATISTICS
For the hypothesis (H0): αi =0, the power of the test is found to be 0.5434955.
3.b.i)
If α2 =0, α1 ≠0, for α1 = 1, 1.5, 2, 2.5 and 3, we have the effect size of the test at 5% level
of significance respectively- 9.61, 4.95, 3.38, 2.69 and 2.33.
3.b.ii)
If α2 =0, α1 ≠0, for α1 = 1, 1.5, 2 and 2.5, we have the effect size of the test at 10% level of
significance respectively- 6.93, 3.63, 2.55 and 2.10. For, α1 = 3, the effect size of the test is absent.
Answer 4.
In both Question 2 and question 3, the powers for different values of α1 at 5% level of
significance are available for α1 = 1, 1.5, 2 and 2.5. For, completely randomized block design, the
power of Treatments is significant as for randomized complete block design (Hemming, Lilford
and Girling 2015).
Answer 5.
5.a)
The model matrix is given as ( School A , School B , SchoolC ¿= ( 52 , 19 ,29.67 ) .
5. b)
For the hypothesis (H0): αi =0, the power of the test is found to be 0.5434955.
3.b.i)
If α2 =0, α1 ≠0, for α1 = 1, 1.5, 2, 2.5 and 3, we have the effect size of the test at 5% level
of significance respectively- 9.61, 4.95, 3.38, 2.69 and 2.33.
3.b.ii)
If α2 =0, α1 ≠0, for α1 = 1, 1.5, 2 and 2.5, we have the effect size of the test at 10% level of
significance respectively- 6.93, 3.63, 2.55 and 2.10. For, α1 = 3, the effect size of the test is absent.
Answer 4.
In both Question 2 and question 3, the powers for different values of α1 at 5% level of
significance are available for α1 = 1, 1.5, 2 and 2.5. For, completely randomized block design, the
power of Treatments is significant as for randomized complete block design (Hemming, Lilford
and Girling 2015).
Answer 5.
5.a)
The model matrix is given as ( School A , School B , SchoolC ¿= ( 52 , 19 ,29.67 ) .
5. b)
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

15STATISTICS
5.b.i)
μ= intercept = 52. It means that for the absence of effect of School A, the estimated mean
score of all students is 52.
5.b.ii)
αA = 0. It indicates that for the absence of effect of School A, the estimated mean score of
students of School A is assumed to be 0.
5.b.iii)
αB = 19. It refers that for the effect of School B, the estimated mean score of students of
School B is assumed to be 19.
5.b.iv)
αB – αC = (-10.667). It refers that for this model, the estimated mean score of test in
School B is greater than School A (Kuznetsova, Brockhoff and Christensen 2017).
5.c)
XTX =
(XTX)-1 =
5.b.i)
μ= intercept = 52. It means that for the absence of effect of School A, the estimated mean
score of all students is 52.
5.b.ii)
αA = 0. It indicates that for the absence of effect of School A, the estimated mean score of
students of School A is assumed to be 0.
5.b.iii)
αB = 19. It refers that for the effect of School B, the estimated mean score of students of
School B is assumed to be 19.
5.b.iv)
αB – αC = (-10.667). It refers that for this model, the estimated mean score of test in
School B is greater than School A (Kuznetsova, Brockhoff and Christensen 2017).
5.c)
XTX =
(XTX)-1 =
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

16STATISTICS
5.d)
50
60
70
80
90
A B C
School
Test Scores
School..i. A B C
Grouped boxplot
5.d)
50
60
70
80
90
A B C
School
Test Scores
School..i. A B C
Grouped boxplot

17STATISTICS
5.d.i)
Null hypothesis (H0): αB = 0.
Alternative hypothesis (HA): αB ≠ 0.
Here, calculated t-statistic (-3.4513) provides p-value = 0.07467. The calculated p-value
is greater than 5%. Hence, the null hypothesis of equality of means of 0 cannot be rejected at 5%
level of significance.
5.d.ii)
To test the hypothesis αB = αC, as per t-test no coefficient is equal to each other. Hence, αB =
αC, could be rejected.
5.d.iii)
H0: {α B=0
α C=0
Here, the hypothesis of all the coefficients equal to 0 cannot be rejected with 95%
confidence. Therefore, this hypothesis could be accepted.
5.d.iv)
H0: { α B=α C
α C= 1
2 μ+5
Here, α B=α C could be accepted as all the coefficients are equal to each other. Also, the
mean of all the coefficients equal to ( 1
2 μ+5 ¿could be rejected with 95% confidence as the mean
(μ ¿ is found unequal to 5.
5.e)
5.d.i)
Null hypothesis (H0): αB = 0.
Alternative hypothesis (HA): αB ≠ 0.
Here, calculated t-statistic (-3.4513) provides p-value = 0.07467. The calculated p-value
is greater than 5%. Hence, the null hypothesis of equality of means of 0 cannot be rejected at 5%
level of significance.
5.d.ii)
To test the hypothesis αB = αC, as per t-test no coefficient is equal to each other. Hence, αB =
αC, could be rejected.
5.d.iii)
H0: {α B=0
α C=0
Here, the hypothesis of all the coefficients equal to 0 cannot be rejected with 95%
confidence. Therefore, this hypothesis could be accepted.
5.d.iv)
H0: { α B=α C
α C= 1
2 μ+5
Here, α B=α C could be accepted as all the coefficients are equal to each other. Also, the
mean of all the coefficients equal to ( 1
2 μ+5 ¿could be rejected with 95% confidence as the mean
(μ ¿ is found unequal to 5.
5.e)
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

18STATISTICS
In both the cases (ANOVA model and summary of linear model) show similarly that each
school and overall schools have significant effect on the test scores. Both models are highly
significant and well fitted.
In both the cases (ANOVA model and summary of linear model) show similarly that each
school and overall schools have significant effect on the test scores. Both models are highly
significant and well fitted.
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

19STATISTICS
References:
Hemming, K., Lilford, R. and Girling, A.J., 2015. Stepped‐wedge cluster randomised controlled
trials: a generic framework including parallel and multiple‐level designs. Statistics in
medicine, 34(2), pp.181-196.
Kuznetsova, A., Brockhoff, P.B. and Christensen, R.H.B., 2017. lmerTest package: tests in linear
mixed effects models. Journal of Statistical Software, 82(13).
Lenth, R.V., 2016. Least-squares means: the R package lsmeans. Journal of statistical
software, 69(1), pp.1-33.
Searle, S.R. and Gruber, M.H., 2016. Linear models. John Wiley & Sons.
References:
Hemming, K., Lilford, R. and Girling, A.J., 2015. Stepped‐wedge cluster randomised controlled
trials: a generic framework including parallel and multiple‐level designs. Statistics in
medicine, 34(2), pp.181-196.
Kuznetsova, A., Brockhoff, P.B. and Christensen, R.H.B., 2017. lmerTest package: tests in linear
mixed effects models. Journal of Statistical Software, 82(13).
Lenth, R.V., 2016. Least-squares means: the R package lsmeans. Journal of statistical
software, 69(1), pp.1-33.
Searle, S.R. and Gruber, M.H., 2016. Linear models. John Wiley & Sons.
1 out of 20