首页 > > 详细

Math 309作业代写、代做techniques留学生作业、代写R程序设计作业、R编程语言作业调试帮做Haskell程序|代做R语言程序

Math 309 Extra-Credit Project 4 Fall, 2019
The amount of extra-credit will depend on the overall quality of your work. You
must submit a formal Report to show your work. The Report must be typed
and if possible prepare the Report with RMarkdown and submit both the .Rmd
file and the .html files. It is essential that you include proper comments in
your R script so the read can easily read and understand the code lines. I do
expect mathematical expressions, tables, plots, with proper explanations, interpretations,
and meaning summary of your work in the report. A work with
just plugging in numbers and plain numerical answers will get very little credit
or no extra credit at all. You must work independently and require to comply
with the university policy on academic integrity found in the Code of Student
Conduct found at
http://www.lehigh.edu/lts/official/Academic_Integrity_Vignettes.pdf.
1. (a) Show how to use Monte Carlo techniques to approximate the following
sum.∑∞k=0
cos(cos(k))/k!
(b) Use R to implement the Monte Carlo approximation of the sum in
part (a); use at least 10,000 runs.
(c) Show how to use Monte Carlo techniques to approximate the following
integration.
∫ π0cos(x/2)sin(2x)dx
(d) Use R to implement the Monte Carlo approximation of the integration
in part (c); use at least 10,000 runs.
2. (a) Show how to use Monte Carlo techniques to approximate the following
double integration.
(b) Use R to implement the Monte Carlo approximation of the double
integration in part (a); use at least 10,000 runs.
3. Let f(x) = 4/(π(1 + x2)), 0 ≤ x ≤ 1. (a) Explain how can we use the
acceptance-rejection method to generate sample from this distribution.
(b) Use R to implement the proposed algorithm in (a).
(c) Obtain the relative-frequency histogram and overly the true pdf on it.
4. We want to use the acceptance-rejection method to generate continuous
random variable X from a distribution with probability density function
f(x) = (m+n+1)!m!n!
xn(1 − x)
m for 0 ≤ x ≤ 1, n ≥ 1, n ≥ 1 and are integers;
and f(x) is zero otherwise. Suppose we use the pdf of Uniform(0,1) as the
proposal pdf (i.e., g(x) = 1, for 0 ≤ x ≤ 1).
(a) Find an appropriate constant c > 1 (i.e., as small as possible) such
that f(x)/(cg(x)) < 1 for 0 ≤ x ≤ 1.
(b) For n = m = 2, carry out the simulation with at least 5,000 runs.
Find the theoretical values of E(X) and V ar(X) and then compare with
their simulated values.
(c) Obtain the relative-frequency histogram of the simulated values; then
overlay the theoretical pdf.
(d) Repeat (b) and (c) for m = 2 and n = 4.

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codehelp
热点文章
程序代写更多图片

联系我们 - QQ: 99515681 微信:codinghelp
© 2014 www.7daixie.com
程序代写网!