Cviko v R - testovanie hypotez
Created: 2012-04-16 - 11:48
x = c(1.6,1.88,2.1,1.66,1.93,1.73,1.74,2.07)
x
t.test(x,y=NULL, alternative = "greater", mu = 1.75)
#ci je p hodnota mensia ako alfa = 0.05
?t.test
y1 = c(8.6,8.8,8.4,8.6,8.7,8.5,8.5)
y2 = c(8.6,8.9,8.8,8.9,8.7,8.6,9,8.5,8.6,8.7,8.7)
varEqual <- var(y1) == var(y2)
varEqual
?f.test
var(y1)
var(y2)
left <- Max(var(y1),var(y2)) / Min(var(y1),var(y2);
left <- Max(var(y1),var(y2)) / Min(var(y1),var(y2));
left <- max(var(y1),var(y2)) / Min(var(y1),var(y2));
left <- max(var(y1),var(y2)) / min(var(y1),var(y2));
?fisher.test
mean(y1);mean(y2);
?var.test
var.test(y1,y2)
t.test(y1,y2,var.equal=TRUE,alternative="less")
y1 = c(8.0,9.4,8.4,8.6,8.7,8.5,8.5)
y2 = c(8.6,8.9,8.8,8.9,8.7,8.6,9,8.5,8.6,8.7,8.7)
var.test(y1,y2)
t.test(y1,y2,var.equal=FALSE,alternative="less")