Description Usage Arguments Value References See Also Examples
log_convolve_power
returns the logarithm of an approximation
of the convolution of exp(log_pmf)
with itself L
times. The approximation has relative error bounded by beta
,
along with the subtractive factor of delta
. If p
is the exact convolution and v
is the
approximation, then it satisfies p[i] * (1 - beta) -
delta <= v[i] <= p[i] * (1 + beta)
for all i
.
1 | log_convolve_power(log_pmf, L, beta, delta)
|
log_pmf |
a numeric vector, the logarithm of a pmf. |
L |
a positive integer giving the the number of times to convolve
|
beta |
a number less than 0.5, to control the relative error. |
delta |
a non-negative number, to act as a lower bound on elements needed. |
A vector that is the logarithm of the approximation to the convolution.
Huon Wilson, Uri Keich, Accurate small tail probabilities of sums of iid lattice-valued random variables via FFT, Submitted.
1 2 3 4 | pmf <- c(0.5, 0.5)
convolve <- log_convolve_power(log(pmf), 3, 1e-3, 0)
exact <- c(0.125, 0.375, 0.375, 0.125)
(exact * (1 - 1e-3) <= pmf) & (pmf <= exact * (1 + 1e-3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.