Changes

Jump to navigation Jump to search
Line 12: Line 12:  
load('waitingtimes2.Rdata')
 
load('waitingtimes2.Rdata')
 
par(mfrow=c(2,1))
 
par(mfrow=c(2,1))
hist(unlist(wt[1]))
+
x = wt[[1]]
hist(unlist(wt[2]))
+
y = wt[[2]]
 +
hist(x)
 +
hist(y)
 
</syntaxhighlight>
 
</syntaxhighlight>
   −
b) TBD
+
b)  
   −
c) TBD
+
<syntaxhighlight lang=r>
 +
semx = sd(x)^2/length(x)
 +
semy = sd(y)^2/length(y)
 +
 
 +
t = (mean(x) - mean(y))/sqrt(semx + semy)
 +
t
 +
 
 +
pnorm(t)*2
 +
</syntaxhighlight>
 +
 
 +
c)
 +
<syntaxhighlight lang=r>
 +
t.test(x,y)
 +
</syntaxhighlight>

Navigation menu