powered by
Convolution between two discrete probability mass functions with support on 0:K.
convolve_up(x, y)
The first probability vector. The ith element is the probability of i - 1.
The second probability vector. The ith element is the probability of i - 1.
A vector that is the convolution of x and y. The ith element is the probability of i - 1.
x
y
convolve for a more generic convolution function.
convolve
# NOT RUN { x <- c(1 / 6, 2 / 6, 3 / 6) y <- c(1 / 9, 2 / 9, 6 / 9) convolve_up(x, y) stats::convolve(x, rev(y), type = "o") # }
Run the code above in your browser using DataLab