Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please write code in python programming language. please let me know what additional information is needed. 3 Monte Carlo Integration The exponential integral, En(x), is
Please write code in python programming language.
please let me know what additional information is needed.
3 Monte Carlo Integration The exponential integral, En(x), is an important function in engineering and health physics applications. This function is defined as One way to compute this integral is via a Monte Carlo procedure for a general integral, i-1 where yi U[a, b] or in words, y, is a uniform random number between a and b. For this problem you may use the random or numpy modules. 3.a Substitution Make the substitution in the integral to get an integral with finite bounds. 3.b Approximate the integral Write a Python function to compute the exponential integral. The inputs should be n, z, and N in the notation above. Give estimates for E1 (1) using N 1, 10, 100, 1000, and 104. 3.c Approximation Variability Write a Python function that estimates the standard deviation of several estimates of the exponential integral function from the function you wrote in the previous part. The formula for the standard deviation of a quantity g given L samples is I=1 where g is the mean of the L samples. Using your function and L of at least 10, estimate the standard deviation of the Monte Carlo estimate of E, (1) using N= 1, 10, 100, 1000, 104, and 105Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started