Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3.2 Evaluation of integral Back to our Example 1, we write a= E[X] = E[h(Y)], where X = h(Y) and Y ~ U(0,1). In other

image text in transcribed

3.2 Evaluation of integral Back to our Example 1, we write a= E[X] = E[h(Y)], where X = h(Y) and Y ~ U(0,1). In other words, although X-sampling is not directly available in python, one can use U(0,1) random generator (see numpy.random.uniform) to produce Y, then compute h(Y) for the sample Xi. DN is total number of samples Ds is the sum of samples Algorithm 1 Integral by MC - Example 1 1: procedure MCINTEGRAL(N) sto 3: for i = 1...N do 4: generate two numbers Y from U(0,1) sts+h(Y) 6: return D use numpy.random.uniform 5: Sastb D return the average Example 2 Implement Algo 1 for estimator n; Estimate MSEn) for N = 25 ..., 210 and plot log-log chart. 3.2 Evaluation of integral Back to our Example 1, we write a= E[X] = E[h(Y)], where X = h(Y) and Y ~ U(0,1). In other words, although X-sampling is not directly available in python, one can use U(0,1) random generator (see numpy.random.uniform) to produce Y, then compute h(Y) for the sample Xi. DN is total number of samples Ds is the sum of samples Algorithm 1 Integral by MC - Example 1 1: procedure MCINTEGRAL(N) sto 3: for i = 1...N do 4: generate two numbers Y from U(0,1) sts+h(Y) 6: return D use numpy.random.uniform 5: Sastb D return the average Example 2 Implement Algo 1 for estimator n; Estimate MSEn) for N = 25 ..., 210 and plot log-log chart

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Demystifying Databases A Hands On Guide For Database Management

Authors: Shiva Sukula

1st Edition

8170005345, 978-8170005346

More Books

Students also viewed these Databases questions

Question

Prove with an example, that for a boolean function mj bar = Mj

Answered: 1 week ago