| +.dist | R Documentation |
dist objects, or shifting a distribution by a scalar.Creates an expression distribution and automatically simplifies to closed form when possible (e.g., normal + normal = normal, normal + scalar = normal with shifted mean).
## S3 method for class 'dist'
x + y
x |
A |
y |
A |
A simplified distribution or edist if no closed form exists
# Sum of two normals simplifies to a normal
z <- normal(0, 1) + normal(2, 3)
z # Normal(mu = 2, var = 4)
# Shift a distribution by a constant
normal(0, 1) + 5 # Normal(mu = 5, var = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.