piest2: Estimation of Pi by Monte Carlo Integration

Description Usage Arguments Value References Examples

Description

Uses integration to estimate pi given a sample size. See example 4.8.4 on page 295 and 296 of the book.

Usage

1
piest2(n)

Arguments

n

Sample size.

Value

Tuple containing estimate value of pi and the standard error.

References

Hogg, R. McKean, J. Craig, A (2018) Introduction to Mathematical Statistics, 8th Ed. Boston: Pearson

Examples

1
2
3
4
5
6
# Example where parameters are passed in as variables.
n <- 1000
result <- piest2(n)

# Example where parameters are passed in as values.
result <- piest2(1000)

joemckean/mathstat documentation built on May 30, 2019, 2:01 p.m.