![]() |
Professor of Stochastic Modelling |
School of Mathematics & Statistics | |
Newcastle University |
with(stats); tpdf:=(x,v)->statevalf[pdf,studentst[v]](x); scpdf:=x->1/(4+x^2); plot({scpdf(x)/scpdf(0),tpdf(x,2)/tpdf(0,2)},x=-6..6);The t density is proportional to (1+(x^2)/v)^(-(v+1)/2), where v is the degrees of freedom. Include overlay plots demonstrating that the envelope works for a range of degrees of freedom. You may wish to demonstrate theoretically that the envelope is valid. Assuming that the envelope is valid, describe how the rejection algorithm is implemented. Implement the algorithm in R (for general v), and compare a histogram of roughly 20000 simulated values for v=2 with the actual density - the R commands lines and dt may be useful here. Include your actual R functions in your report. What is your empirical acceptance probability for the v=2 case? Also work out the theoretical acceptance probability for this scheme (you may wish to use Maple to help with the integrals), and make sure your empirical value is very close to this.
Your report should be coherent - not just a list of answers. It should be 5-10 sides of A4, including all plots, tables and code, and produced in Word or LaTeX. The submission deadline is the end of week 11, but bear in mind that you will get another project in two weeks time.
![]() |
![]() |
|
darren.wilkinson@ncl.ac.uk | ||
http://www.staff.ncl.ac.uk/d.j.wilkinson/ |