首页 >
> 详细

University of Toronto Mississauga

STA312 H5S: Computational Statistics - Winter 2020

Final Project.

Instructions:

❼ Solve only ONE question.

❼ You can solve this project either individually or by a group of two. The solution that comes from a

group is expected to have a higher quality of work.

❼ There are some questions in the project that require your input. For

example, choosing the importance function, the set-up of control variate

or target density, etc. I don’t have answers for such questions. Do your

best to answer with quality, justify your work and with details.

❼ In this project, you should use R only when it is required. Any other software will

not be accepted.

❼ Start your R codes with the following information: Course Number, Final Project,

Question #, Your Last Name, First Name, Student Number. For Example,

# Course: STA312

# Final Project: # 1

# Last Name: ABCD, First Name: XYZW

# St. #: 0123456789

❼ You may not alter the output (by typing or handwriting anything). Output should

be directly copied and pasted to the project where needed. If you do not follow these

rules, your assignment will not be accepted.

❼ Your project should be presented neatly. Use the following format:

– Theoretical questions can be hand-written or typed. Though, I recommend

typed!

– Attach the cover page (provided) at the front of your project. (Be sure to fill

in/circle all the information required).

– Include the question numbers/part letters (1a,b,c, etc.) in your answers.

– Do not simply hand in pages of R output without further explanation. Only

include the relevant tables or plots that are asked in each question. Make sure

to interpret the results in plain English in terms of the problem, quote relevant

numbers from the output, and give justifications as a part of your solutions.

– Do not include unnecessary code or output in the body of the project. At the

end, include an appendix with ALL your R code and output.

STA312- Instructor: Dr. Luai Al Labadi Page 1 of 5

Only general discussion is permitted between students. You

must hand in solutions in your own words. Do not let others

see your solutions or your selected article. It is plagiarism (a

serious academic offence) to submit solutions in other people’s

words (including but not limited to other students, the instructor’s,

solutions from previous years or courses, websites, etc).

You are responsible for knowing and adhering to the University

of Toronto’s Code of Behaviour on Academic Matters (see course

outline).

STA312- Instructor: Dr. Luai Al Labadi Page 2 of 5

Answer any ONE of the following questions.

1. Consider the following two probability density functions:

f(x) = 2(x − c1)(c2 − c1)2

for c1 < x < c2

and

g(x) = 2(c2 − x)(c2 − c1)2for c1 < y < c2,

where c1 and c2 are finite real numbers.

(a) Show that R c2.

(b) Find the cumulative distribution functions F(x) and G(x).

(c) Write an algorithm to generate a sample from f(x) using the Inverse-Transform algorithm.

(d) Show that if X ∼ f(x), then 1 − X ∼ g(x). Explain how you can use this relationship to generate

a sample from g.

(e) Show that if X ∼ h(x) = 2x, for 0 < x < 1, then Y = c1 + (c2 − c1)X ∼ f.

(f) Derive the inverse-transform algorithm for generating from a sample from h.

(g) Explain how you extend the algorithm in (f) to generate a sample form f and a sample from g.

(h) Show that if U1 and U2 are two independent random variable from Uniform[0, 1]. Show that Z =

max(U1, U2) has the density h.

(i) Use part (h) to propose an algorithm to sample from f and from g.

(j) Using R, generate a sample of size 104

from f (set c1 = 1, c2 = 5) using the two algorithms in (c) (or

(g)) and (i). For the generated samples, plot the relative frequency histogram and the corresponding

density on the same picture. Report the mean and the variance for each case.

(k) Repeat part (j) by replacing f by g.

(l) Propose an Acceptance-Rejection algorithm to generate a sample from f for c1 = 1, c2 = 5. Using R,

compare this method with the previous two methods. Use an appropriate method for comparison.

Which one you recommend and why?

STA312- Instructor: Dr. Luai Al Labadi Page 3 of 5

be the probability density function of a random variable X and k is a positive constant.

(a) Find a Monte Carlo estimation to k. denote this estimator by ˆk. Hint: use importance sampling.

Compare with the following densities on −∞ < x < ∞:

You need to write the explicit formula of the estimator for each case.

(b) Using R, for each of the above densities, provide the numerical value of the estimator.

(c) Find a Monte Carlo estimation estimate for E[X] and E[X2

]. You may use ˆk based on f3. You

need to write the explicit formula of the estimator. Use R to obtain the numerical values. Estimate

the error in the estimation. Report 95% confidence intervals.

(d) Use another variance reduction technique to estimate k. You need to write the explicit formula of

the estimator. Using R, provide the numerical value of this estimator in (e). Compute the mean

squared error of the estimator.

(f) Use the Acceptance-Rejection algorithm to generate a sample from f. Plot the relative frequency

histogram and the corresponding density on the same picture.

(j) Find the exact value of k. Hint: Γ(z) = R ∞0xz−1e−xdx.

(k) Plot the true density on the same picture in (f).

STA312- Instructor: Dr. Luai Al Labadi Page 4 of 5

3. Consider the data given in the file lifetime.txt.

(a) Let X denote the lifetime. Estimate E(X) (provide a confidence interval).

(b) Apply nonparametric bootstrap procedure to estimate med(X) and kurtosis(X). Estimate 95%-

quantile. Provide appropriate confidence intervals.

(c) Verify that data follow an exponential distribution. Find λb¸ , an estimator of λ.

(d) Apply parametric bootstrap procedure to estimate med(X), kurtosis(X) and 95%-quantile.

(e) Compare values obtained via bootstrap to the theoretical values (based on the estimated λb).

Good Luck

STA312- Instructor: Dr. Luai Al Labadi Page 5 of 5

联系我们

- QQ：99515681
- 邮箱：99515681@qq.com
- 工作时间：8:00-23:00
- 微信：codinghelp2

- Program课程作业代做、Python语言作业代写、Python编程作业调 2020-06-01
- 代做stats762作业、代写r编程设计作业、R课程设计作业代做、代写dat 2020-06-01
- Cosc 2666作业代写、C++程序设计作业调试、Programming作 2020-06-01
- Stats 731作业代写、代做c+,Java程序语言作业、代写python 2020-06-01
- Etf5952课程作业代写、Risk Analysis作业代做、Python 2020-06-01
- 41889留学生作业代做、代写ios Application作业、Java， 2020-06-01
- Sta2202作业代做、代写data课程作业、R程序语言作业调试、代写r课程 2020-06-01
- You Have Implemented A Simple Web Serv... 2020-05-31
- Stat 5511 Homework 4 2020-05-31
- Lab 7 2020-05-31
- 代写cosc 363作业、代做computer Graphics作业、代写c 2020-05-31
- Eie111课程作业代写、C++程序设计作业调试、代做c/C++语言作业、代 2020-05-31
- Math502作业代做、Mathematics课程作业代做、Java，Pyt 2020-05-31
- 代写sit114课程作业、代做data留学生作业、代写r编程设计作业、代做r 2020-05-31
- Envx3002作业代写、R程序语言作业调试、R课程设计作业代做、代写dat 2020-05-31
- Ee6435 Programming Homework 2020-05-30
- Computer Architecture Homework 3 2020-05-30
- Infs7450作业代做、Media Analytics作业代写、Pytho 2020-05-29
- 代写stats 782作业、代做r编程设计作业、代写data留学生作业、R课 2020-05-29
- 代写math223作业、R课程设计作业代做、代写data课程作业、R程序语言 2020-05-28