Académique Documents
Professionnel Documents
Culture Documents
Universidad de sucre
Facultad: Educacin y ciencias
Programa: Biologa
Docente: Melba Morrison
Estudiante: Neider Lozano Cabrales
po
13
saco
18
19
> tapply(resp,trat,var)
nada
pokmno2
po
saco
nada
po
65
saco
90
nada
95
> tapply(resp,trat,length)
pokmno2
5
po
5
saco
nada
data: X[[i]]
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
$po
data: X[[i]]
t = -0.97999, df = 4, p-value = 0.3826
alternative hypothesis: true mean is not equal to 15
20
15
10
pokmno2
po
> # aplicacion 1
> #datos
> T45<-c(1.39,1.19,1.01,0.99);T45
[1] 1.39 1.19 1.01 0.99
> T90<-c(1.19,0.91,1.15,1.05);T90
[1] 1.19 0.91 1.15 1.05
> T135<-c(1.10,1.18,1.14,1.34);T135
[1] 1.10 1.18 1.14 1.34
> T180<-c(1.07,1.25,0.85,1.23);T180
[1] 1.07 1.25 0.85 1.23
> T225<-c(1.03,1.40,0.97,1.20);T225
[1] 1.03 1.40 0.97 1.20
> T270<-c(1.03,1.12,1.17,1.36);T270
saco
nada
T190
T135
T180
T225
T270
> mean(resp)
[1] 1.138333
> tapply(resp,trat,t.test,ma=1.138333)
$T45
data: X[[i]]
t = 16.8, df = 3, p-value = 0.0004592
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
0.9483683 1.3916317
sample estimates:
mean of x
1.17
> #prueba de normalidad
> shapiro.test(resp)
Shapiro-Wilk normality test
data: resp
W = 0.97638, p-value = 0.821
> #prueba de homogeneidad de varianza
> bartlett.test(resp~trat)
Bartlett test of homogeneity of variances
data: resp by trat
Bartlett's K-squared = 1.5685, df = 5, p-value = 0.905
0.9
1.0
1.1
1.2
1.3
1.4
> boxplot(resp~trat)
T45
T190
T135
T180
T225
T270
> # Aplicacin 2
># Datos
> Ticopor<-c(5.33,4.95,5.10,7.14,7.84);Ticopor
[1] 5.33 4.95 5.10 7.14 7.84
> t.test(Ticopor,mu=5.05)
data: Ticopor
t = 1.7249, df = 4, p-value = 0.1596
alternative hypothesis: true mean is not equal to 5.05
95 percent confidence interval:
4.427008 7.716992
sample estimates:
mean of x
6.072
> Tbiopak<-c(6.59,7.90,4.48,7.32,6.41);Tbiopak
[1] 6.59 7.90 4.48 7.32 6.41
> t.test(Tbiopak,mu=5.05)
data: Tbiopak
t = 2.5703, df = 4, p-value = 0.06196
alternative hypothesis: true mean is not equal to 5.05
95 percent confidence interval:
4.9305 8.1495
sample estimates:
mean of x
6.54
> TCryvac<-c(4.95,4.44,3.48,3.92,8.62);TCryvac
[1] 4.95 4.44 3.48 3.92 8.62
> t.test(TCryvac,mu=5.05)
data: TCryvac
t = 0.0348, df = 4, p-value = 0.9739
alternative hypothesis: true mean is not equal to 5.05
95 percent confidence interval:
2.532528 7.631472
sample estimates:
mean of x
5.082
> TShopak<-c(2.41,2.83,2.97,2.38,2.11);TShopak
[1] 2.41 2.83 2.97 2.38 2.11
> t.test(TShopak,mu=5.05)
data: TShopak
t = -15.9321, df = 4, p-value = 9.073e-05
alternative hypothesis: true mean is not equal to 5.05
95 percent confidence interval:
2.102589 2.977411
sample estimates:
mean of x
2.54
> resp<-c(Ticopor,Tbiopak,TCryvac,TShopak);resp
[1] 5.33 4.95 5.10 7.14 7.84 6.59 7.90 4.48 7.32 6.41 4.95 4.44 3.48 3.92
trat resp
1 Ticopor 5.33
2 Ticopor 4.95
3 Ticopor 5.10
4 Ticopor 7.14
5 Ticopor 7.84
1 Tbiopak 6.59
2 Tbiopak 7.90
3 Tbiopak 4.48
4 Tbiopak 7.32
10
5 Tbiopak 6.41
11
1 TCryvac 4.95
12
2 TCryvac 4.44
13
3 TCryvac 3.48
14
4 TCryvac 3.92
15
5 TCryvac 8.62
16
1 TShopar 2.41
17
2 TShopar 2.83
18
3 TShopar 2.97
19
4 TShopar 2.38
20
5 TShopar 2.11
> tapply(resp,trat,length)
Ticopor Tbiopak TCryvac TShopar
5
> tapply(resp,trat,sum)
data: resp
W = 0.9463, p-value = 0.3139
> bartlett.test(resp~trat)
> modelo<-aov(resp~trat)
> anova(modelo)
Analysis of Variance Table
Response: resp
Df Sum Sq Mean Sq F value Pr(>F)
trat
2.8
3.0
3.2
3.4
boxplot(resp~trat)
H1
H2
H3
> #aplicacin 3
>#datos
> RC<-c(4,2,5,2,2,1,2,3,2,4);RC
[1] 4 2 5 2 2 1 2 3 2 4
> t.test(RC,mu=2.7)
One Sample t-test
data: RC
t = 0, df = 9, p-value = 1
alternative hypothesis: true mean is not equal to 2.7
H4
> PP<-c(1,1,2,3,1,1,2,2,3);PP
[1] 1 1 2 3 1 1 2 2 3
> t.test(PP,mu=1.7)
One Sample t-test
data: PP
t = 0.28, df = 8, p-value = 0.7866
alternative hypothesis: true mean is not equal to 1.7
95 percent confidence interval:
1.137221 2.418334
sample estimates:
mean of x
1.777778
> BSA<-c(8,9,9,5,7,8,7,4,12,9);BSA
[1] 8 9 9 5 7 8 7 4 12 9
> t.test(BSA,mu=7.8)
One Sample t-test
data: BSA
t = 0, df = 9, p-value = 1
alternative hypothesis: true mean is not equal to 7.8
95 percent confidence interval:
6.189785 9.410215
sample estimates:
mean of x
7.8
> resp<-c(RC,BSN,PP,BSA);resp
[1] 4 2 5 2 2 1 2 3 2 4 10 10 12 11 10 12 14 12 14 11 1 1 2 3
[25] 1 1 2 2 3 8 9 9 5 7 8 7 4 12 9
> trat<-gl(4,10,labels=c("RC","BSN","PP","BSA"))
> trat<-rep(1:4,c(10,10,9,10));trat
[1] 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4
[38] 4 4
> trat<-factor(trat,labels=c("RC","BSN","PP","BSA"));trat
[1] RC RC RC RC RC RC RC RC RC RC BSN BSN BSN BSN BSN BSN BSN
BSN
[19] BSN BSN PP PP PP PP PP PP PP PP PP BSA BSA BSA BSA BSA BSA BSA
[37] BSA BSA BSA
Levels: RC BSN PP BSA
> split(resp,trat)
$RC
[1] 4 2 5 2 2 1 2 3 2 4
$BSN
[1] 10 10 12 11 10 12 14 12 14 11
$PP
[1] 1 1 2 3 1 1 2 2 3
$BSA
[1] 8 9 9 5 7 8 7 4 12 9
> repet<c(1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,10)
;repet
[1] 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4
[25] 5 6 7 8 9 1 2 3 4 5 6 7 8 9 10
> datos<-data.frame(repet,trat,resp);datos
repet trat resp
1
1 RC
2 RC
3 RC
4 RC
5 RC
6 RC
7 RC
8 RC
9 RC
10
10 RC
11
1 BSN 10
12
2 BSN 10
13
3 BSN 12
14
4 BSN 11
15
5 BSN 10
16
6 BSN 12
17
7 BSN 14
18
8 BSN 12
19
9 BSN 14
20
10 BSN 11
21
1 PP
22
2 PP
23
3 PP
24
4 PP
25
5 PP
26
6 PP
27
7 PP
28
8 PP
29
9 PP
30
1 BSA
31
2 BSA
32
3 BSA
33
4 BSA
34
5 BSA
35
6 BSA
36
7 BSA
37
8 BSA
38
9 BSA 12
39
10 BSA
RC BSN PP BSA
27 116 16 78
> tapply(resp,trat,mean)
RC
BSN
PP
BSA
BSN
PP
BSA
Pr(>F)
RC
BSN
PP
BSA
poblacion de aves
10
12
14
> #Aplicacin 4
>datos
>
fondoarenoso<c(4.09,4.14,3.85,4.04,3.21,4.27,3.81,4.02,3.08,4.72,4.03,4.07,3.
83);fondoarenoso
[1] 4.09 4.14 3.85 4.04 3.21 4.27 3.81 4.02 3.08 4.72 4.03 4.07 3.83
>manglar<c(3.80,3.96,4.05,3.47,3.89,3.46,3.94,3.58,4.03,3.68,3.76,3.91,3.32,
4.21,3.86,4.02);manglar
[1] 3.80 3.96 4.05 3.47 3.89 3.46 3.94 3.58 4.03 3.68 3.76 3.91 3.32 4.21 3.86
[16] 4.02
>pastomarino<c(3.78,4.19,4.27,3.65,3.99,3.61,3.55,3.41,3.82,4.11,3.60,3.90,3
.99,3.94,3.35);pastomarino
[1] 3.78 4.19 4.27 3.65 3.99 3.61 3.55 3.41 3.82 4.11 3.60 3.90 3.99 3.94 3.35
> resp<-c(fondoarenoso,manglar,pastomarino);resp
[1] 4.09 4.14 3.85 4.04 3.21 4.27 3.81 4.02 3.08 4.72 4.03 4.07 3.83 3.80 3.96
[16] 4.05 3.47 3.89 3.46 3.94 3.58 4.03 3.68 3.76 3.91 3.32 4.21 3.86 4.02
3.78
[31] 4.19 4.27 3.65 3.99 3.61 3.55 3.41 3.82 4.11 3.60 3.90 3.99 3.94 3.35
> trat<c(1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3)
> trat<-factor(trat)
> #ANALISIS DE VARIANZA
> modelo<-aov(resp~trat)
> anova(modelo)
Analysis of Variance Table
Response: resp
Df Sum Sq Mean Sq F value Pr(>F)
trat
> tapply(resp,trat,t.test,mu=3.84)
$`1`
One Sample t-test
data: X[[i]]
t = 0.8162, df = 12, p-value = 0.4303
alternative hypothesis: true mean is not equal to 3.84
95 percent confidence interval:
3.680760 4.190009
sample estimates:
mean of x
3.935385
$`2`
One Sample t-test
data: X[[i]]
t = -0.50501, df = 15, p-value = 0.6209
alternative hypothesis: true mean is not equal to 3.84
95 percent confidence interval:
3.676857 3.940643
sample estimates:
mean of x
3.80875
$`3`
One Sample t-test
data: X[[i]]
t = -0.40796, df = 14, p-value = 0.6895
alternative hypothesis: true mean is not equal to 3.84
95 percent confidence interval:
3.656451 3.964882
sample estimates:
mean of x
3.810667
> mean(resp)
[1] 3.846818
> shapiro.test(resp)
Shapiro-Wilk normality test
data: resp
W = 0.97206, p-value = 0.3571
> bartlett.test(resp~trat)
Bartlett test of homogeneity of variances
data: resp by trat
Bartlett's K-squared = 4.2319, df = 2, p-value = 0.1205
> boxplot(resp~trat,horizontal=TRUE,main="longitud estandar de las sardinas
azulitas")
3.5
4.0
> #Aplicacin 5
> h1<-c(3.28,3.52,2.88,3.34);h1
[1] 3.28 3.52 2.88 3.34
> h2<-c(3.09,3.48,2.80,3.38);h2
[1] 3.09 3.48 2.80 3.38
4.5
> h3<-c(3.03,3.38,2.81,3.23);h3
[1] 3.03 3.38 2.81 3.23
> h4<-c(3.03,3.38,2.76,3.26);h4
[1] 3.03 3.38 2.76 3.26
> resp<-c(h1,h2,h3,h4);resp
[1] 3.28 3.52 2.88 3.34 3.09 3.48 2.80 3.38 3.03 3.38 2.81 3.23 3.03 3.38 2.76
[16] 3.26
> trat<-gl(4,4,labels=c("h1","h2","h3","h4"))
> #analisis de varianza
> modelo<-aov(resp~trat)
> anova(modelo)
Analysis of Variance Table
Response: resp
Df Sum Sq Mean Sq F value Pr(>F)
trat
h2
h3
h4
h2
h3
h4
h2
h3
h4
> tapply(resp,trat,t.test,mu=3.16)
$h1
data: X[[i]]
t = 0.7037, df = 3, p-value = 0.5323
alternative hypothesis: true mean is not equal to 3.16
95 percent confidence interval:
2.82537 3.68463
sample estimates:
mean of x
3.255
$h2
data: X[[i]]
t = 0.1793, df = 3, p-value = 0.8691
alternative hypothesis: true mean is not equal to 3.16
95 percent confidence interval:
2.699402 3.675598
sample estimates:
mean of x
3.1875
$h3
data: X[[i]]
t = -0.38394, df = 3, p-value = 0.7266
alternative hypothesis: true mean is not equal to 3.16
95 percent confidence interval:
2.718773 3.506227
sample estimates:
mean of x
3.1125
$h4
data: X[[i]]
t = -0.38402, df = 3, p-value = 0.7266
alternative hypothesis: true mean is not equal to 3.16
95 percent confidence interval:
2.672428 3.542572
sample estimates:
mean of x
3.1075
> mean(resp)
[1] 3.165625
> #prueba de normalidad
> shapiro.test(resp)
data: resp
W = 0.9177, p-value = 0.1549
h1
h2
h3
h4
lectura dehojas
2.8
3.0
3.2
3.4