{ From user Lonnie, Model Explicit_samples at 13-May-2010 11:50:26 AM }
Softwareversion 4.2.3
{ System Variables with non-default values: }
Typechecking := 1
Checking := 1
Saveoptions := 2
Savevalues := 0
{!40000|Att_contlinestyle Graph_primary_valdim: 1}
Model Explicit_samples
Title: explicit samples
Description: Developed during the Analytica Webinar on Monte Carlo.~
~
Two examples here. The product of normals was used during the webinar to demonstrate the concept of sampling error.~
~
The example of estimating Pi was used to compare the precision obtained from pure Monte Carlo to that of Latin Hypercube sampling.
Author: Lonnie
Date: Thu, May 13, 2010 9:58 AM
Saveauthor: Lonnie
Savedate: Thu, May 13, 2010 11:50 AM
Defaultsize: 48,24
Diagstate: 2,90,22,550,300,17
Windstate: 2,98,83,476,224
Fontstyle: Arial, 15
Fileinfo: 0,Model Explicit_samples,2,2,0,0,W:\Training\User Group Webinars\Representing Uncertainty 3 - Misc.ana
Chance Product_of_normals
Title: product of normals
Definition: ( Normal(0,1) * Normal(0,1) )
Nodelocation: 80,40,1
Nodesize: 48,24
Valuestate: 2,697,56,416,303,0,STAT
Chance X
Title: x
Definition: Uniform( -1, 1, , over:Trial )
Nodelocation: 216,40,1
Nodesize: 48,24
Chance Y
Title: y
Definition: Uniform( -1, 1, , over:Trial )
Nodelocation: 328,40,1
Nodesize: 48,24
Objective Pi_est
Title: Pi est
Definition: Probability( x^2 + y^2 < 1 ) * 4
Nodelocation: 216,104,1
Nodesize: 48,24
Variable Err
Title: err
Definition: abs(pi_est - Pi) / Pi
Nodelocation: 328,104,1
Nodesize: 48,24
Valuestate: 2,148,155,307,424,0,MIDM
Numberformat: 2,%,4,2,0,0,4,0,$,0,"ABBREV",0
Index Trial
Title: Trial
Definition: 1..10000
Nodelocation: 440,40,1
Nodesize: 48,24
Variable Ave_err
Title: ave err
Definition: average(err,trial)
Nodelocation: 216,176,1
Nodesize: 48,24
Valuestate: 2,576,128,416,303,0,MIDM
Numberformat: 2,%,4,2,0,0,4,0,$,0,"ABBREV",0
Objective Comparison_of_sampli
Title: Comparison of sampling methods
Description: Compares how the different sampling methods compare in the precison of the computed Pi value.~
~
The sample size (press Ctrl+U to change sample size from the uncertainty dialog) controls how many samples are used in the computation of Pi). You can increase that to see how rapidly each type of sampling improves with increased sample size.~
~
The Trial index controls how many repeated experiments are performed with each sampling method to obtain the average error.
Definition: Table(Self)(~
WhatIf(ave_err,sampleType,0),WhatIf(ave_err,sampleType,1),WhatIf(ave_err,sampleType,2))
Indexvals: ['Median Latin Hypercube','Random Latin Hypercube','Pure Monte Carlo']
Nodelocation: 368,176,1
Nodesize: 68,31
Defnstate: 2,629,251,416,303,0,MIDM
Numberformat: 2,%,4,2,0,0,4,0,$,0,"ABBREV",0
Chance Repeated_product_of
Title: repeated product of normals
Definition: normal(0,1,over:trial) * Normal(0,1,over:trial)
Nodelocation: 80,121,1
Nodesize: 48,31
Variable Average_error_in_pro
Title: average error in product of normals
Definition: average(abs(mean(Repeated_product_of)), trial)
Nodelocation: 80,208,1
Nodesize: 48,40
Close Explicit_samples