
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This assignment is by Badrinath Parveen at Alagappa University for Computational Physics course. Its main points are: Stochastic, Methods, Pdf, MATLAB, Direct, Sampling, Comparison, Efficiency, Metropolis, Algorithm
Typology: Exercises
1 / 1
This page cannot be seen from the preview
Don't miss anything!

M.Phil Physics Course: Computational Physics (Stochastic Methods) Home Work # 3
This assignment is based on Random Sampling of pdfs
Due date: One Week after this distribution in class.
Question 1 (a) Suppose that a given pdf for y is shown below:
f ( y )= 4 y exp(− 2 y^2 ) 0 < y < 1
Then first normalize this pdf and then using Direct sampling method find out a proper formula to sample this distribution.
(b) Use MATLAB program and sample the pdf for N = 10000. Draw both the exact and sampled distribution functions as histograms. (c) What happens when N is increased to 100000? Show results as graphs and give some sort of comparison.
Question 2
(a) For above pdf use rejection method and sample randomly for N = 10000. Draw both the exact and sampled distribution function.
(a) Find out the efficiency of this technique. What happens when N is increased to 100000? Show results as graphs and give some sort of comparison.
Question 3
(b) For above pdf use Metropolis Algorithm and sample randomly for N =
(c) Find out the efficiency of this technique. What happens when N is increased to 100000? Show results as graphs and give some sort of comparison.
Home Work # 3 (^) 1