TU Wien:Statistik und Wahrscheinlichkeitstheorie UE (Levajkovic)/Übungen 2023W/HW09.3

Aus VoWi
Zur Navigation springen Zur Suche springen
Corneal thickness

To determine whether glaucoma affects the corneal thickness, measurements were made in nine people affected by glaucoma in one eye but not in the other. The corneal thicknesses (in microns) were as follow (See Table 1)

Assume the corneal thicknesses are normally distributed with expectation and variance for eyes affected by glaucoma, and expectation and variance for eyes not affected by glaucoma. Test against using . What kind of test will you

perform? Base your conclusion on a 90% confidence interval.

Dieses Beispiel ist als solved markiert. Ist dies falsch oder ungenau? Aktualisiere den Lösungsstatus (Details: Vorlage:Beispiel)


Table 1
Person 1 2 3 4 5 6 7 8 9
Eye affected by glaucoma 448 478 480 426 440 410 458 460 468
Eye not affected by glaucoma 484 478 492 444 436 398 464 476 420

Lösungsvorschlag von Lessi[Bearbeiten | Quelltext bearbeiten]

--Lessi 2024-02-07T13:04:11Z

# To determine whether glaucoma affects the corneal thickness, measurements were made in nine 
# people affected by glaucoma in one eye but not in the other. The corneal thicknesses (in microns) were as follow

affected <- c(488, 478, 480, 426, 440, 410, 458, 460, 468)
not_affected <- c(484, 478, 492, 444, 436, 398, 464, 476, 420)


hist(affected, col = rgb(0, 0, 1, 0.5), main = "Hist of Corneal thickness", xlab = "thickness")
hist(not_affected, col = rgb(1, 0, 0, 0.5), add=TRUE)
legend("topright", legend = c("affected", "not affected"),
       col = c("blue", "red"), pch = 16)

#Assume the corneal thicknesses are normally distributed with expectation µ1 and variance σ1^2
# for eyes affected by glaucoma, and expectation µ2 and variance σ2^2
# for eyes not affected by glaucoma. 
# Test H0 : µ1 = µ2 against HA : µ1 < µ2 using α = 10%. What kind of test will you
# perform? Base your conclusion on a 90% confidence interval.

# since we can assume different variances we use a welch-test
t.test(affected, not_affected, conf.level=0.9, alternative="less")

?t.test

# looking at the 90% CI we conclude, that since the difference is within the interval so we don't reject the null hypothesis