summary.simulation

# S3 method for simulation
summary(x, print = T)

Arguments

x

A result vector from a simulation algorithm

Value

A summary of the input vector, containing mean, variance, relative error and confidence interval

Examples

x <- MC_pi summary(x)
#> $Mean #> [1] 3.1398 #> #> $Variance #> [1] 2.7008 #> #> $`Relative Error` #> [1] 0.001 #> #> $`Confidence interval` #> [1] "[ 3.1345 ; 3.1451 ]" #>
#> $Mean #> [1] 3.1398 #> #> $Variance #> [1] 2.7008 #> #> $`Relative Error` #> [1] 0.001 #> #> $`Confidence interval` #> [1] "[ 3.1345 ; 3.1451 ]" #>