TU Wien:Statistik und Wahrscheinlichkeitstheorie UE (Bura)/Übungen 2019W/8.2

Aus VoWi
Zur Navigation springen Zur Suche springen
Two-sample t-test using normal approximation

Messages are frequently sent from a sender to either receiver 1 or receiver 2. For both receivers, several times for the transfer were measured (in seconds) and stored in the file waitingtimes2.Rdata.

(a) Plot both data sets. Is their distribution approximately bell-shaped?
(b) Test the null-hypothesis of equal mean transfer times for both receivers on the 1%-level with a two sample t-test (using the normal approximation).
(c) Compare your result to the output of t.test()

Lösungsvorschlag von Gittenburg[Bearbeiten | Quelltext bearbeiten]

--Gittenburg 11:18, 3. Dez. 2019 (CET)

a)

load('waitingtimes2.Rdata')
par(mfrow=c(2,1))
x = wt[[1]]
y = wt[[2]]
hist(x)
hist(y)

b)

semx = sd(x)^2/length(x)
semy = sd(y)^2/length(y)

t = (mean(x) - mean(y))/sqrt(semx + semy)
t

pnorm(t)*2

c)

t.test(x,y)