Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

AMS 580.1 Homework #2 with code Stony Brook University 2026

Beoordeling
-
Verkocht
-
Pagina's
6
Cijfer
A+
Geüpload op
22-04-2026
Geschreven 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

Instelling
AMS580
Vak
AMS580

Voorbeeld van de inhoud

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

Geschreven voor

Instelling
AMS580
Vak
AMS580

Documentinformatie

Geüpload op
22 april 2026
Aantal pagina's
6
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

€27,91
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
VEVA2K Self
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
2854
Lid sinds
5 jaar
Aantal volgers
2413
Documenten
4328
Laatst verkocht
1 week geleden
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 beoordelingen

5
378
4
128
3
101
2
24
1
57

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen