100% satisfaction guarantee Immediately available after payment Read online or as PDF No strings attached 4.6 TrustPilot
logo-home
Other

Statistics Assignment Solution

Rating
-
Sold
-
Pages
6
Uploaded on
09-05-2023
Written in
2022/2023

Factors and the number of levels for each factor indicating any nesting present Response Variable = Student Test Scores Factor A = School Factor A Levels = {Lowton, Westleigh, Bedford}, a = 3 Factor B = Teacher (nested within School), b=2 levels per school Factor B Levels = Lowton - {T1, T2}, Westleigh - {T3,T4}, Bedford - {T5, T6}

Show more Read less
Institution
Course

Content preview

1


Statistics Assignment Solution

Question 1(a)

Factors and the number of levels for each factor indicating any nesting present

Response Variable = Student Test Scores Factor A = School

Factor A Levels = {Lowton, Westleigh, Bedford}, a = 3

Factor B = Teacher (nested within School), b=2 levels per school

Factor B Levels = Lowton -> {T1, T2}, Westleigh -> {T3,T4}, Bedford -> {T5, T6}

Question 1(b)

𝑌𝑖𝑗𝑘 = 𝜇 + 𝛼𝑖 + 𝐵𝑗(𝑖) + 𝜖𝑘(𝑖𝑗)

where 𝐵𝑗(𝑖) ~ 𝑁(0, 𝜎𝐵2), 𝜖𝑘(𝑖𝑗) ~ 𝑁(0, 𝜎2)

And constraint Σ𝛼𝑖=03𝑖=1 for i = 1 to 3, j = 1,2 and k = 1 to 8

Question 1(c)

𝐸[ 𝑌𝑖𝑘𝑗 ] = 𝐸 [ 𝜇 + 𝛼𝑖 + 𝐵𝑗(𝑖) + 𝜖𝑘(𝑖𝑗) ]

= 𝐸 [ 𝜇 ] + 𝐸 [ 𝛼𝑖 ] + 𝐸 [ 𝐵𝑗(𝑖)] + 𝐸 [ 𝜖𝑘(𝑖𝑗) ]

= 𝜇 + 𝛼𝑖 + 0 + 0

= 𝜇 + 𝛼𝑖

= 𝜇𝑖

And

𝑉𝑎𝑟[ 𝑌𝑖𝑘𝑗 ] = 𝑉𝑎𝑟 [ 𝜇 + 𝛼𝑖 + 𝐵𝑗(𝑖) + 𝜖𝑘(𝑖𝑗) ]

= 𝑉𝑎𝑟 [ 𝜇 ] + 𝑉𝑎𝑟 [ 𝛼𝑖 ] + 𝑉𝑎𝑟 [ 𝐵𝑗(𝑖)] + 𝑉𝑎𝑟 [ 𝜖𝑘(𝑖𝑗) ]

= 0 + 0 + 𝜎𝐵2 + 𝜎2

= 𝜎𝐵2 + 𝜎2

, 2


Question 1(d)

> # 1.1a - Read in the 'School.csv' data set

> Sch1a <- read.csv("F:\\Lecture Courses\\STAT 293\\Additional Material\\Assignments &

Tests\\Assignments & Tests Data\\School.csv")

> str(Sch1a)

'data.frame': 48 obs. of 3 variables:

$ School : chr "Lowton" "Lowton" "Lowton" "Lowton" ...

$ Teacher: chr "Teacher1" "Teacher1" "Teacher1" "Teacher1" ...

$ Score : int 89 96 113 100 88 85 91 113 79 90 ...

> # 1.1b - Fitting the model.

> library(nlme)

> Sch1b <- lme(Score ~ School, random=~1|Teacher, data=Sch1a)

> # 1.1c - Obtaining the ANOVA table

> anova(Sch1b)

numDF denDF F-value p-value

(Intercept) 1 42 419.0479 <.0001

School 2 3 9.2664 0.052

Testing the null hypothesis H0: αi = 0 for all i = 1 to 3

Vs H1: αi ≠ 0 for some i = 1 to3

Fobs = 9.2664 and a p-value of 0.052 therefore there is weak evidence against the null

hypothesis.

Question 1(e)

> summary(Sch1b)

Written for

Institution
Course

Document information

Uploaded on
May 9, 2023
Number of pages
6
Written in
2022/2023
Type
OTHER
Person
Unknown

Subjects

$15.99
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Read online or as PDF
No strings attached

Get to know the seller
Seller avatar
anneguda

Get to know the seller

Seller avatar
anneguda Kalimoni
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
2 year
Number of followers
0
Documents
9
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Trending documents

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions