Description Usage Arguments Details Value Author(s) References Examples
Computes the probability for a standard Brownian motion to stay in a wedge of the plane limited by two straight lines, given by their slopes and intercepts.
1 |
a1 |
vector of numeric: slopes of lower boundaries |
b1 |
vector of numeric: intercepts of lower boundaries |
a2 |
vector of numeric: slopes of upper boundaries |
b2 |
vector of numeric: intercepts of upper boundaries |
N |
integer: number of terms to be computed in each series |
lower.tail |
logical: if |
type |
character: type of function to wrap |
nb.threads |
integer: number of threads |
Wedge probabilities are invariant through symmetry:
wedge(a1,b1,a2,b2)
returns the same as
wedge(b1,a1,b2,a2)
and
wedge(a2,b2,a1,b1)
.
Depending on N
a threshold is computed. If
(a1
+a2
)*(b1
+b2
)/4 is above the threshold, N
terms of Doob's formula are computed. If it is below the threshold, N
terms
of the theta-function transform are computed.
a vector of wedge probabilities.
R\'emy Drouilhet and Bernard Ycart
B. Ycart and R. Drouilhet (2016) Computing wedge probabilities. arXiv:1612.05764
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # random wedges
a1 <- 10*runif(10^6)^2
b1 <- 10*runif(10^6)^2
a2 <- 10*runif(10^6)^2
b2 <- 10*runif(10^6)^2
# wedge probabilities, 3 term approximation
pw3 <- wedge(a1,b1,a2,b2)
summary(pw3)
# wedge probabilities, 4 term approximation
pw4 <- wedge(a1,b1,a2,b2,N=4)
summary(abs(pw3-pw4))
# exit probabilities, 3 term approximation
length(which(pw3==1))
pw3m <- wedge(a1,b1,a2,b2,lower.tail=FALSE)
summary(pw3+pw3m)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.