| exp_series | R Documentation |
Constructs a dist_structure representing a series system whose
components are independent exponentials. The system lifetime is itself
an Exp(sum(rates)) distribution; all dist-level queries have
closed-form expressions that bypass the general default methods.
exp_series(rates)
## S3 method for class 'exp_series'
surv(x, ...)
## S3 method for class 'exp_series'
sampler(x, ...)
## S3 method for class 'exp_series'
mean(x, ...)
## S3 method for class 'exp_series'
density(x, ...)
## S3 method for class 'exp_series'
hazard(x, ...)
rates |
Positive numeric vector of length |
x |
An |
... |
Ignored. |
exp_series() returns an object of class
c("exp_series", "series_dist", "coherent_dist", "dist_structure", "univariate_dist", "continuous_dist", "dist").
The associated S3 methods return:
surv(), density(), hazard(): a closure function(t, ...)
evaluating the named quantity at t.
cdf() is derived via the dist_structure default and returns
a closure function(t, ...) equal to 1 - surv(x)(t).
sampler(): a closure function(n, ...) returning n random
variates from the system lifetime distribution.
mean(): a numeric scalar (the mean system lifetime).
sys <- exp_series(c(0.5, 0.3, 0.2))
algebraic.dist::surv(sys)(1) # equals exp(-sum(rates) * 1)
mean(sys) # equals 1 / sum(rates)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.