ejercicio 1

library(BSDA)
## Loading required package: lattice
## 
## Attaching package: 'BSDA'
## The following object is masked from 'package:datasets':
## 
##     Orange
zsum.test(mean.x=82,
          sigma.x=10,
          n.x=49,
          conf.level=.95)
## 
##  One-sample z-Test
## 
## data:  Summarized x
## z = 57.4, p-value < 2.2e-16
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
##  79.20005 84.79995
## sample estimates:
## mean of x 
##        82

ejercicio 2

prop.test(x = 185,
          n = 250,
          conf.level = 0.95)
## 
##  1-sample proportions test with continuity correction
## 
## data:  185 out of 250, null probability 0.5
## X-squared = 56.644, df = 1, p-value = 5.223e-14
## alternative hypothesis: true p is not equal to 0.5
## 95 percent confidence interval:
##  0.6801849 0.7922865
## sample estimates:
##    p 
## 0.74

ejercicio 3

tsum.test(mean.x = 18.5,
          s.x = 3.2,
          n.x = 40,
          conf.level = 0.95)
## Warning in tsum.test(mean.x = 18.5, s.x = 3.2, n.x = 40, conf.level = 0.95):
## argument 'var.equal' ignored for one-sample test.
## 
##  One-sample t-Test
## 
## data:  Summarized x
## t = 36.564, df = 39, p-value < 2.2e-16
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
##  17.47659 19.52341
## sample estimates:
## mean of x 
##      18.5

ejercicio 4

tiempos <- c(18, 22, 21, 20, 19, 24, 23, 21, 20, 19, 18, 22, 21, 20, 23)

t.test(tiempos,
       conf.level = 0.95)
## 
##  One Sample t-test
## 
## data:  tiempos
## t = 43.857, df = 14, p-value < 2.2e-16
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
##  19.71939 21.74728
## sample estimates:
## mean of x 
##  20.73333

ejercicio 5

viajes <- c(41, 39, 42, 40, 43, 38, 41, 40, 39, 42, 40, 41)

z.test(viajes,
       sigma.x = 5,
       conf.level = 0.99)
## 
##  One-sample z-Test
## 
## data:  viajes
## z = 28.059, p-value < 2.2e-16
## alternative hypothesis: true mean is not equal to 0
## 99 percent confidence interval:
##  36.78211 44.21789
## sample estimates:
## mean of x 
##      40.5