Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

AMS 580.1 Homework #2 with code Stony Brook University 2026

Rating
-
Sold
-
Pages
6
Grade
A+
Uploaded on
22-04-2026
Written in
2025/2026

AMS 580.1 Homework #2 with code Stony Brook University 2026/AMS 580.1 Homework #2 with code Stony Brook University 2026

Institution
AMS580
Course
AMS580

Content preview

AMS 580.1 Homework #2 Name: ID:


Dear all, this homework is due before class on Tuesday, February 25, 2024. Please
submit it to SBU Brightspace. Quiz 2 of similar content (please review the entire lecture
notes 4 and 6), will be given in class, and in-person, on Thursday, February 27. It will be
a close book exam – but you can have 3 pages (8x11) of double-sided formula sheet, plus
a non-programmable calculator. (Most of our quizzes will be on R programming and will
be open book exams – only the first few quizzes will be close book exams. At least the 3
lowest 3 quiz scores will be dropped for each student when computing the final quiz
scores – so no worries if you did not do well in a few quizzes.)

1. To determine whether glaucoma affects the corneal thickness, measurements were
made in 8 people affected by glaucoma in one eye but not in the other. The corneal
thickness data (in microns) were as follows:

Person 1 2 3 4 5 6 7 8
Eye affected 488 478 480 426 440 410 458 460
Eye not affected 484 478 492 444 436 398 464 476

(a) According to the data, can you conclude, at the significance level of 0.10, that the
corneal thickness is not equal for affected versus unaffected eyes? Calculate a 90%
confidence interval for the mean difference in thickness.

(b) Please answer the same question in (a) using R programming. Please be sure to
include the Shapiro-Wilk test for the normality of the paired differences.

Solution: This problem involves a paired sample – and once we take the paired
difference, it will reduce to the inference on one population mean, here being the mean
difference of corneal thickness for those affected versus those not affected.

The paired difference is calculated as follows:
Person 1 2 3 4 5 6 7 8
Eye affected 488 478 480 426 440 410 458 460
Eye not affected 484 478 492 444 436 398 464 476
Difference (d) 4 0 -12 -18 4 12 -6 -16

(a) Using the paired differences, this reduce to a one population mean problem. The
sample statistics are: d = −4 and s d = 10.744 . Assuming the paired differences follow
a normal distribution. We are performing a two-sided t-test (per the context of this
question): 𝐻0 : 𝜇𝑑 = 0 versus 𝐻𝑎 : 𝜇𝑑 ≠ 0

The test statistic (this is the pivotal quantity with the null value for the parameter
of interest, 𝜇𝑑 = 0, plugged in) is
d −0 −4−0
t= = = −1.053
s d n 10.744 8




Page 1 of 6

, AMS 580.1 Homework #2 Name: ID:


Since t  t8−1,0.05 = 1.895 , we can NOT reject H 0 at  = 0.10 . That is, we do NOT have
enough evidence to support the claim that the average corneal thicknesses are affected by
glaucoma.

Under the same normality assumption, a 90% CI for 𝜇𝑑 = 𝜇1 − 𝜇2 is given by
d  tn−1, 2  sd n = −4  1.895  10.744 8
That is, [−11.198, 3.198]
(In fact, since 𝜇𝑑 = 0 is inside this 90% CI, we can not reject the corresponding two-
sided null hypothesis 𝐻0 : 𝜇𝑑 = 0 versus 𝐻𝑎 : 𝜇𝑑 ≠ 0 at the same significance level 𝛼 =
0.1).

(b)

data_affected = c(488, 478, 480, 426, 440, 410, 458, 460)
data_not_affected = c(484, 478, 492, 444, 436, 398, 464, 476)
difference = data_affected - data_not_affected
shapiro.test(difference)

##
## Shapiro-Wilk normality test (*the null hypothesis is the population
is normal)
##
## data: difference
## W = 0.94404, p-value = 0.6512 (*We reject the null hypothesis if the
p-value is smaller than the significance level given.)

# p-value = 0.6512, which is larger than 0.05, so we can not reject the
null hypothesis that the difference is normally distributed


# Method 1: step by step

mean_diff = mean(difference)
std_diff = sd(difference)
t_stat = mean_diff / (std_diff / sqrt(length(difference)))
t_stat

## [1] -1.053048

alpha = 0.10
t_critical = qt(1 - alpha/2, df = length(difference) - 1)
margin_of_error = t_critical * (std_diff / sqrt(length(difference)))
ci_lower = mean_diff - margin_of_error
ci_upper = mean_diff + margin_of_error
ci_lower

## [1] -11.19655

ci_upper


Page 2 of 6

Written for

Institution
AMS580
Course
AMS580

Document information

Uploaded on
April 22, 2026
Number of pages
6
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$31.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
VEVA2K Self
Follow You need to be logged in order to follow users or courses
Sold
2854
Member since
5 year
Number of followers
2413
Documents
4304
Last sold
1 day ago
Affordable, Up-to-date-Quality Nursing Papers

Here, you'll find a wide range of Nursing Papers at an affordable rate. Every student deserves a friendly environment for study. Always message me for any concern and help. My email is

4.1

688 reviews

5
378
4
128
3
101
2
24
1
57

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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions