Question: PLEASE HELP ME WITH Q4 MATLAB - I NEED TO UNDERSTAND HOW TO MAKE A PDF USING MATLAB Using a large number of random walks

PLEASE HELP ME WITH Q4 MATLAB - I NEED TO UNDERSTAND HOW TO MAKE A PDF USING MATLAB

Using a large number of random walks (e.g. n = 5000) create histograms of the distance from the origin of the random walkers at three different time points (e.g. t = 100, 200, 300). [Use the same axis limits on the three graphs for easier comparison.]

Matlab hints: use hist() for plotting the histograms; it is useful to explicitly specify the bins (e.g 1:2:50) in the second argument of the hist() command. Use subplot() to create the three plots together in a single figure.

4. (2 marks) Compare graphically the results from part 3. with the theoretical prediction for the probability density function of the distance from the origin p(d) = (2d/t) exp(d 2/t). [Note that the probability density can be converted to a discrete set of frequency of occurrences by multiplying it with the number of random walkers and with the size of the bins used in the histogram.]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!