Dilan
-
Upload
yessicacoley -
Category
Documents
-
view
10 -
download
2
Transcript of Dilan
1 2 3 4
10
15
20
trat
resp
Dilan Vergara. Actividad 21-11-2014
BANANAS
> #tratamiento empaques
> pok<-c(14.1,9.4,9.3,10.9,6.3);pok
[1] 14.1 9.4 9.3 10.9 6.3
> pol<-c(10.0,7.1,14.2,14.8,18.9);pol
[1] 10.0 7.1 14.2 14.8 18.9
> saco<-c(18.3,17.5,14.4,16.2,23.1);saco
[1] 18.3 17.5 14.4 16.2 23.1
> nada<-c(21,18,17.3,16.8,21.9)nada
nada<-c(21,18,17.3,16.8,21.9)nada
> spaq<-c(21.0,18.0,17.3,16.8,21.9);spaq
[1] 21.0 18.0 17.3 16.8 21.9
> resp<-c(pok,pol,saco,spaq)
> mean(resp)
[1] 14.975
> var(resp)
[1] 23.48092
> sd(resp)
[1] 4.845712
> boxplot(resp)
> trat<-c(1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4);trat
[1] 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4
> datos<-data.frame(trat,resp);datos
trat resp
1 1 14.1
2 1 9.4
3 1 9.3
4 1 10.9
5 1 6.3
6 2 10.0
7 2 7.1
8 2 14.2
9 2 14.8
10 2 18.9
11 3 18.3
12 3 17.5
13 3 14.4
14 3 16.2
15 3 23.1
16 4 21.0
17 4 18.0
18 4 17.3
19 4 16.8
20 4 21.9
> tapply(resp,trat,summary)
$`1`
Min. 1st Qu. Median Mean 3rd Qu. Max.
6.3 9.3 9.4 10.0 10.9 14.1
$`2`
Min. 1st Qu. Median Mean 3rd Qu. Max.
7.1 10.0 14.2 13.0 14.8 18.9
$`3`
Min. 1st Qu. Median Mean 3rd Qu. Max.
14.4 16.2 17.5 17.9 18.3 23.1
$`4`
Min. 1st Qu. Median Mean 3rd Qu. Max.
16.8 17.3 18.0 19.0 21.0 21.9
> tapply(resp,trat,var)
1 2 3 4
8.040 20.825 10.625 5.285
> tapply(resp,trat,mean)
1 2 3 4
10.0 13.0 17.9 19.0
> t.test(pok,mu=15)
One Sample t-test
data: pok
t = -3.943, df = 4, p-value = 0.01692
alternative hypothesis: true mean is not equal to 15
95 percent confidence interval:
6.479275 13.520725
sample estimates:
mean of x
10
> t.test(pol,mu=15)
One Sample t-test
data: pol
t = -0.98, df = 4, p-value = 0.3826
alternative hypothesis: true mean is not equal to 15
95 percent confidence interval:
7.333739 18.666261
sample estimates:
mean of x
13
> t.test(saco,mu=15)
One Sample t-test
data: saco
t = 1.9894, df = 4, p-value = 0.1175
alternative hypothesis: true mean is not equal to 15
95 percent confidence interval:
13.85267 21.94733
sample estimates:
mean of x
17.9
> t.test(spaq,mu=15)
One Sample t-test
data: spaq
t = 3.8907, df = 4, p-value = 0.01768
alternative hypothesis: true mean is not equal to 15
95 percent confidence interval:
16.14552 21.85448
sample estimates:
mean of x
19
> #analisis de varianza
> trat<-factor(trat)
> mod<-aov(resp~trat,data=datos);mod
Call:
aov(formula = resp ~ trat, data = datos)
Terms:
trat Residuals
Sum of Squares 254.4025 191.7350
Deg. of Freedom 1 18
Residual standard error: 3.263732
Estimated effects may be unbalanced
> anova(mod)
Analysis of Variance Table
Response: resp
Df Sum Sq Mean Sq F value Pr(>F)
trat 1 254.40 254.403 23.883 0.0001186 ***
Residuals 18 191.74 10.652
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> #boxplot de los tratamientos
> plot(resp~trat)
>
>
> #Kruskal Wallis
> comparacion<-kruskal(resp,trat,group=TRUE, main="Empaques")
Study: Empaques
Kruskal-Wallis test's
Ties or no Ties
Value: 11.48
degrees of freedom: 3
Pvalue chisq : 0.00939431
trat, means of the ranks
resp replication
1 4.2 5
2 8.4 5
3 14.0 5
4 15.4 5
t-Student: 2.119905
Alpha : 0.05
LSD : 5.437877
Means with the same letter are not significantly different
Groups, Treatments and mean of the ranks
a 4 15.4
a 3 14
b 2 8.4
b 1 4.2