Description Usage Arguments Value Examples
This function is designed to calculate the probabilities realted to X or X and Y.
1 |
cd |
the given conditions |
data |
the samples obtained from rejection sampling |
the value of probability realted to X or X and Y
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | f <- function(x) {ifelse(0 < x & x < 1, 4*x^3, 0)}
x1 = oneDsample(f,10000)
c1 = function(x){x<0.4}
Gprob(c1,x1)
f <- function(x){
x1 = x[1]
x2 = x[2]
ifelse(x2>0, 1/pi/(1+x1^2) * 0.05*exp(-0.05*x2), 0)}
x2 = twoDsample(f = f, N=10000)
c2 = function(x,y){
x<0.5 & y<0.2}
Gprob(c2,x2)
<<<<<<< HEAD
=======
>>>>>>> cdbb79a12f539e6c21a1ac083fd355a5f60e8def
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.