The convolution density at z, times the strip width dz.
Usage
SumDensP(grid_x, density_x, grid_y, density_y, z, dz)
Arguments
- grid_x, density_x, grid_y, density_y
the two densities.
- z
strip centre.
- dz
strip width.
Value
list(probability, rho_z).
References
Morin, D. J. (2016). Probability: For the Enthusiastic
Beginner. Createspace. Eq (6.66).
Examples
g <- seq(-8, 8, length.out = 1601)
SumDensP(g, stats::dnorm(g), g, stats::dnorm(g), 1, 0.01)$probability
#> [1] 0.002196956