H0: Studenci studiując online nie spędzają więcej czasu na nauce. H1: Studenci studiując online spędzają więcej czasu na nauce.
Kampus<-c(28,16,42,29,31,22,50,42,23,16)
Online<-c(26, 42, 65, 38, 29, 32, 59, 42, 27, 41, 46, 18)
shapiro.test(Kampus)
##
## Shapiro-Wilk normality test
##
## data: Kampus
## W = 0.92876, p-value = 0.4358
shapiro.test(Online)
##
## Shapiro-Wilk normality test
##
## data: Online
## W = 0.95465, p-value = 0.7057
var.test(Kampus,Online)
##
## F test to compare two variances
##
## data: Kampus and Online
## F = 0.7147, num df = 9, denom df = 11, p-value = 0.6242
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
## 0.1991985 2.7959759
## sample estimates:
## ratio of variances
## 0.7147042
t.test(Kampus,Online, alternative="greater",var.equal=TRUE, conf.level=0.95)
##
## Two Sample t-test
##
## data: Kampus and Online
## t = -1.6216, df = 20, p-value = 0.9397
## alternative hypothesis: true difference in means is greater than 0
## 95 percent confidence interval:
## -18.26258 Inf
## sample estimates:
## mean of x mean of y
## 29.90 38.75