Monte Carlo approximation for an expected value is given as:
Where,
- → Total number of samples generated
- →Random sample input which are independent and identically distributed (i.i.d.) realizations of the input random variable .
- Model, , when evaluated at the th random input sample,
Note:
Multi-dimensional Case
\mu=\mathbb{E}[\gamma] \approx \tilde{\mu}_K=\frac{1}{K} \sum_{i=1}^K y^{(i)}=\frac{1}{K} \sum_{i=1}^K \mathcal{M}\left(\mathbf{x}^{(i)}\right)}The sample now contains vectors.
- If are independent: Generate independently of each other
- If are dependent: Draw directly from the joint PDF
Calculation Steps
- Generate a sample of model inputs .
- Compute the corresponding model output sample .
- Estimate the expected value using the mean of the output sample.