Distribución Exponencial


#a) P(X < 6)
pexp(6,1/24,lower.tail = T)
## [1] 0.2211992
#b) P(X > 5*12)
pexp(5*12,1/24,lower.tail = F)
## [1] 0.082085


#a) P(X > 3)
pexp(3,1/2,lower.tail = F)
## [1] 0.2231302
#b) P(X > 7 | X > 4)
pexp(7,1/2,lower.tail = F)/pexp(4,1/2,lower.tail = F)
## [1] 0.2231302

x <- c(9242,19949,11041,34675,
9392,103302,55227,38305,
5693, 22538,15275,48041,
6271, 51727,18957,44099)
#Garantía 8000 horas
#a) P(x < 8000)
pexp(8000,rate = lambda_E3,lower.tail = T)
## [1] 0.2283691
#b) P(X < x) = 0.05
qexp(0.05, rate=lambda_E3,lower.tail = T)
## [1] 1582.828

Distribución Gamma







pgamma(20, shape = 2 , rate = 1/4, lower.tail = F)
## [1] 0.04042768

pgamma(1, shape = 2 , rate = 5, lower.tail = T)
## [1] 0.9595723

Distribución Weibull



# a)
pweibull(2, shape = 13, scale = 2, lower.tail = F)
## [1] 0.3678794
# b)
prob_w <- pweibull(2, shape = 13, scale = 2, lower.tail = T)
prob_w * 1000
## [1] 632.1206
n_reclamos <- prob_w * 1000
paste("Si se compran 1000 unidades se espera tener", round(n_reclamos,0), "reclamos")
## [1] "Si se compran 1000 unidades se espera tener 632 reclamos"
