\[ 30.0 ~~~39.0 ~~~34.5 ~~~32.4 ~~~30.9 ~~~37.1 ~~~31.3 ~~~31.0 ~~~30.9 ~~~32.4 ~~~29.2 ~~~31.7 ~~~33.7 \\ ~~~31.2 ~~~29.1 ~~~28.7 ~~~34.1 ~~~37.5 ~~~34.3 ~~~26.7 ~~~29.8 ~~~31.5 ~~~29.5 ~~~28.4 ~~~29.9 \]
\[ H_{0}: \mu = 30 \\ H_{1}: \mu > 30 \]
nic <- c(30.0, 39.0, 34.5, 32.4, 30.9, 37.1,
31.3, 31.0, 30.9, 32.4, 29.2, 31.7,
33.7, 31.2, 29.1, 28.7, 34.1, 37.5,
34.3, 26.7, 29.8, 31.5, 29.5, 28.4,
29.9)
alpha = 0.05
t.test(nic,
mu = 30, # Hipotese a ser testada
alternative = "greater",
conf.level = 1 - alpha)
##
## One Sample t-test
##
## data: nic
## t = 2.9872, df = 24, p-value = 0.003198
## alternative hypothesis: true mean is greater than 30
## 95 percent confidence interval:
## 30.76566 Inf
## sample estimates:
## mean of x
## 31.792
\[ H_{0}: \mu = 1229 \\ H_{1}: \mu > 1229 \]
rec <- c(1230, 582, 576, 2093, 2621, 1045,
1439, 717, 1838, 1359)
alpha = 0.05
t.test(rec,
mu = 1229, # Hipotese a ser testada
alternative = "greater",
conf.level = 1 - alpha)
##
## One Sample t-test
##
## data: rec
## t = 0.56618, df = 9, p-value = 0.2926
## alternative hypothesis: true mean is greater than 1229
## 95 percent confidence interval:
## 958.2372 Inf
## sample estimates:
## mean of x
## 1350
\[ H_0: \sigma_{A}^{2} = \sigma_{B}^{2} \\ H_1: \sigma_{A}^{2} \neq \sigma_{B}^{2} \]
usi1 <- c(18.80, 20.50, 18.62, 19.92, 21.12, 20.84,
17.53, 17.08, 17.62, 21.43, 18.75, 19.20,
18.42, 20.76, 21.06, 17.59, 18.76, 18.98,
20.31, 18.90, 19.17, 19.29, 22.06, 18.59,
17.89)
usi2 <- c(21.16, 26.14, 21.47, 30.99, 22.84, 24.41,
20.41, 25.55, 21.88, 22.67, 24.75, 25.72,
22.64, 26.23, 26.80, 28.47, 26.99, 25.15,
24.62, 27.02, 25.06, 22.11, 20.31, 23.68,
27.12, 29.61, 25.99, 18.22, 23.73, 22.42)
alpha = 0.05
var.test(usi1, usi2,
ratio=1,
alternative = "two.sided", #Bilateral
conf.level = 1-alpha)
##
## F test to compare two variances
##
## data: usi1 and usi2
## F = 0.22271, num df = 24, denom df = 29, p-value = 0.0003595
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
## 0.1033945 0.4938520
## sample estimates:
## ratio of variances
## 0.2227124
Liberais | 6,6 | 10,3 | 10,8 | 12,9 | 9,2 | 12,3 | 7,0 | |
---|---|---|---|---|---|---|---|---|
Administradores | 8,1 | 9,8 | 8,7 | 10,0 | 10,2 | 8,2 | 8,7 | 10,1 |
lib <- c(6.6, 10.3, 10.8, 12.9, 9.2, 12.3, 7.0)
adm <- c(8.1, 9.8, 8.7, 10.0, 10.2, 8.2, 8.7, 10.1)
summary(lib)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 6.600 8.100 10.300 9.871 11.550 12.900
sd(lib)
## [1] 2.432909
summary(adm)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 8.100 8.575 9.250 9.225 10.025 10.200
sd(adm)
## [1] 0.8876132
alpha=0.05
var.test(lib, adm,
alternative = "two.sided",
conf.level = 1-alpha)
##
## F test to compare two variances
##
## data: lib and adm
## F = 7.5128, num df = 6, denom df = 7, p-value = 0.01768
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
## 1.467755 42.789180
## sample estimates:
## ratio of variances
## 7.512844
alpha=0.05
t.test(lib, adm,
var.equal = F,
conf.level = 1-alpha)
##
## Welch Two Sample t-test
##
## data: lib and adm
## t = 0.6653, df = 7.393, p-value = 0.5261
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -1.626575 2.919433
## sample estimates:
## mean of x mean of y
## 9.871429 9.225000
Operário | 1 | 2 | 3 | 4 | 5 | 6 |
---|---|---|---|---|---|---|
Sem Intervalo | 23 | 35 | 29 | 33 | 43 | 32 |
Com Intervalo | 28 | 38 | 29 | 37 | 42 | 30 |
sem <- c(23, 35, 29, 33, 43, 32)
com <- c(28, 38, 29, 37, 42, 30)
diff_AB <- sem - com
summary(diff_AB)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -5.00 -3.75 -1.50 -1.50 0.75 2.00
\[ H_0: \mu_{sem} = \mu_{com} \\ H_0: \mu_{sem} < \mu_{com} \]
alpha = 0.05
t.test(sem, com,
alternative = "less",
paired = TRUE,
conf.level = 1 - alpha)
##
## Paired t-test
##
## data: sem and com
## t = -1.2753, df = 5, p-value = 0.1291
## alternative hypothesis: true difference in means is less than 0
## 95 percent confidence interval:
## -Inf 0.870003
## sample estimates:
## mean of the differences
## -1.5