Professional Documents
Culture Documents
santiago rodriguez
2023-10-25
2.estaciones meteorologicas.
enero <- c(139, 122, 126, 64, 78)
abril <- c(104, 113, 100, 88, 61)
alpha <- 0.01
## P-Value: 0.2443422
3. suero en leucemia.
con_tratamiento <- c(2.1, 5.3, 1.4, 4.6, 0.9)
sin_tratamiento <- c(1.9, 0.5, 2.8, 3.1)
alpha <- 0.01
1.
p1<-0.36
p2<-0.60
p1
## [1] 0.36
p2
## [1] 0.6
NORMALIDAD n1=50=n2
n1<-50
n1*p1
## [1] 18
n1*(1-p1)
## [1] 32
n2<-50
n2*p2
## [1] 30
n2*(1-p2)
## [1] 20
Estadistico de prueba
z<-(18-30)/sqrt((pmedia*qmedia)/50+(pmedia*qmedia)/50)
z
## [1] -120.0961
prop.test(c(18,30), c(50,50), conf.level = 0.95, alternative = "two.sided", correct = F)
##
## 2-sample test for equality of proportions without continuity correction
##
## data: c(18, 30) out of c(50, 50)
## X-squared = 5.7692, df = 1, p-value = 0.01631
## alternative hypothesis: two.sided
## 95 percent confidence interval:
## -0.4301064 -0.0498936
## sample estimates:
## prop 1 prop 2
## 0.36 0.60
0.016 < 0.05 si hay evidencia para ser un buen medicamento
2.
Enero<-c(139, 122, 126, 64, 78)
Abril<-c(104, 113, 100, 88, 61)
E
## [1] 139 122 126 64 78
A
## [1] 104 113 100 88 61
d<-(E-A)
d
## [1] 35 9 26 -24 17
shapiro.test(d)
##
## Shapiro-Wilk normality test
##
## data: d
## W = 0.91387, p-value = 0.4912