Rejection Method, Direct Sampling Method, Metropolis Algorithm-Computational Physics (Stochastic Methods)-Assignment, Exercises of Computational Physics

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

2011/2012

Uploaded on 07/04/2012

aliya
aliya 🇮🇳

4.4

(12)

86 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
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:
10)2exp(4)( 2<<= yyyyf
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 =
10000. Draw both the exact and sampled distribution function.
(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
Docsity.com

Partial preview of the text

Download Rejection Method, Direct Sampling Method, Metropolis Algorithm-Computational Physics (Stochastic Methods)-Assignment and more Exercises Computational Physics in PDF only on Docsity!

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 =

  1. Draw both the exact and sampled distribution function.

(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

Docsity.com