| Arith-distributionH | R Documentation |
Sum, difference and product of distributionH objects and numbers,
consistent with the L2 Wasserstein metric: the operations are applied to the
quantile functions of the distributions.
e1 + e2: the sum of the quantile functions. A number is treated as
an impulse distribution, so x + a shifts x by a.
e1 - e2: the difference of the quantile functions. The difference
of two distributions is a distribution only if e1 is more variable
than e2 (the result must be a non-decreasing quantile function);
otherwise it may not be valid. x - a shifts x by -a.
a * x or x * a: the product of a distribution and a number,
i.e. a rescaling of x.
## S4 method for signature 'distributionH,distributionH'
e1 + e2
## S4 method for signature 'distributionH,distributionH'
e1 - e2
## S4 method for signature 'distributionH,distributionH'
e1 * e2
e1, e2 |
Two |
A distributionH object.
d1 <- distributionH(x = c(1, 2, 3), p = c(0, 0.4, 1))
d2 <- distributionH(x = c(7, 8, 10, 15), p = c(0, 0.2, 0.7, 1))
d1 + d2
d2 + 10
2 * d1
d2 - d1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.