exp_series: Series of exponential components (closed form)

View source: R/exp_series.R

exp_seriesR Documentation

Series of exponential components (closed form)

Description

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.

Usage

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, ...)

Arguments

rates

Positive numeric vector of length m: per-component exponential rates.

x

An exp_series object.

...

Ignored.

Value

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).

Examples

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)

dist.structure documentation built on May 13, 2026, 1:07 a.m.