Dane = read.table(file.choose(), header = TRUE) #średnia mean(Dane$BMD) #wariancja var(Dane$BMD) #odchylenie standardowe sd(Dane$BMD) #bład standardowy średniej sd(Dane$BMD)/sqrt(length(Dane$BMD)) #Jednostrony test t t_onesample = t.test(Dane$BMD, mu = 1) t_onesample #wartość krytyczna dla alfa = 0.05 qt(1-0.05 / 2, df = 39) t_twosamples = t.test(Dane$BMD ~ Dane$SEX, var.equal = TRUE) t_twosamples oczy = read.table(file.choose(), header = TRUE) t_pared = t.test(oczy$Low_CCT,oczy$High_CCT, paired = TRUE) t_pared #test Manna-Whitney'a srednie <- c(5.5, 6.0, 5.0, 7.0, 5.5, 6.0, 7.0, 6.0, 8.0, 7.0, 6.0, 7.0, 6.0, 8.0, 6.0, 7.0) wysokie <- c(6.0, 7.0, 7.5, 6.0, 7.5, 8.0, 11.0, 9.0, 8.0, 11.0, 8.0, 8.0, 7.0, 7.0, 7.0, 9.0) wilcox.test(srednie, wysokie, alternative = "two.sided") #test wilcoxona bez_jagn <- c(72, 62.35, 55.77, 59.98, 51.6, 61.48, 52.57, 52.5, 56.43, 60.13, 48.6, 42.9, 53.5, 70.43, 47.1, 50.08) z_jagn <- c(55.5, 43.8, 66.8, 68, 57.88, 61.9, 45.4, 56.67, 73.3, 77.5, 63.53, 54.5, 55.58, 91.1, 64.05, 71.4) wilcox.test(bez_jagn, z_jagn, paired = TRUE, alternative = "two.sided")