Distribution Calculus
Usage
# S4 method for class 'Norm,Norm'
e1 + e2
# S4 method for class 'numeric,Norm'
e1 + e2
# S4 method for class 'Norm,numeric'
e1 + e2
# S4 method for class 'Norm,Norm'
e1 - e2
# S4 method for class 'numeric,Norm'
e1 - e2
# S4 method for class 'Norm,numeric'
e1 - e2
# S4 method for class 'numeric,Norm'
e1 * e2
# S4 method for class 'Norm,numeric'
e1 * e2
# S4 method for class 'Norm,numeric'
e1/e2
# S4 method for class 'Norm,logical'
sum(x, ..., na.rm = FALSE)
# S4 method for class 'Norm'
exp(x)Value
All calculations return Distribution objects (specifically, objects
of a class that is a subclass of Distribution), accordingly to the property
at hand.
Examples
# -----------------------------------------------------
# Distribution Calculus Example
# -----------------------------------------------------
library(estim)
# Normal location - scale transformation
x <- Norm(mean = 2, sd = 3)
y <- 3 * x + 1 # Norm(mean = 7, sd = 9)
# Addition of two independent Normal random variables
x1 <- Norm(mean = 1, sd = 3)
x2 <- Norm(mean = 2, sd = 4)
x3 <- x1 + x2 # Norm(mean = 3, sd = 5)