gsm: Monte Carlo Integration

View source: R/gsm.R

gsmR Documentation

Monte Carlo Integration

Description

Monte Carlo Integration

Usage

gsm(h, f, rf, n = 1)

Arguments

h

function

f

function

rf

function

n

number of generated points

Examples

h=function(x) sqrt(1-x^2)
f=function(x) 2*x
rf=function(n) sqrt(runif(n))
gsm(h, f, rf, n = 1e5)*4

ferielachaibou/stat617course documentation built on May 9, 2022, 12:05 a.m.