Discrete math home work 5, Assignments of Discrete Mathematics

homework 5 of discrete math Docsity homework 5 of discrete math

Typology: Assignments

2020/2021

Uploaded on 05/12/2021

unknown user
unknown user 🇺🇸

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
MATH 563. HOMEWORK 5
SONJAPETROVICSTATS.COM/TEACHING/563SP21
Solve any 5 of problems 1-6, and problem 7.
If you solve all 6 of the first 6 problems, then you may earn up to 5 points of homework extra
credit.
Re-read the course homework policies written in the syllabus of this course.
All problems require explicit and detailed proofs/ arguments/ reasons. Solutions should be written
clearly, legibly, and concisely, and will be graded for both mathematical correctness and presen-
tation. Points will be deducted for sloppiness, incoherent or insufficient explanation, or for lack
of supporting rationale.
You are allowed to discuss the homework problems with no one except your classmates, the TA,
and the instructor. However, the solutions should be written by you and you alone in your own
words. Any incident of plagiarism/ cheating (from a person or from any online resource) will
be strictly dealt with.
If you discuss the problems with anyone, please note their name at the top of your HW submis-
sion under a subtitle ‘Collaborator:’ or ’Discussed with:’.
1. Exercise 7.24 from the textbook.
2. Let X1, . . . , Xndenote a random sample from a Poisson distribution that has the mean θ > 0.
Show that the MLE of θis an efficient estimator of θ.
3. Exercise 7.44.
4. Exercise 7.49.
5. Consider the following two Monte Carlo strategies for estimating π, the area of a unit circle.
The two estimates are computed like this:
ˆπ1=4
n
n
X
i=1
Xi,where Xi=(1 if U2
i1+U2
i2<1
0 otherwise;
and
ˆπ2=4
n
n
X
i=1
Yi,where Yi= (1 V2
i)1/2, i = 1, . . . , n,
and the Ui1, U1,2, Viare all independent Unif(0,1) random variables1
If smaller variance is better, which of ˆπ1and ˆπ2is best? Also explain why the two estimators
do estimate π.
(Hints: Pn
i=1 Xiis a binomial random variable, and V ar(Pn
i=1 Yi) = Pn
i=1 V ar(Yi).)
Date: Spring 2021. For due dates, see Campuswire/Google Classroom.
1See last page for code!
1
pf2

Partial preview of the text

Download Discrete math home work 5 and more Assignments Discrete Mathematics in PDF only on Docsity!

MATH 563. HOMEWORK 5

SONJAPETROVICSTATS.COM/TEACHING/563SP

Solve any 5 of problems 1-6, and problem 7. If you solve all 6 of the first 6 problems, then you may earn up to 5 points of homework extra credit.

Re-read the course homework policies written in the syllabus of this course.

All problems require explicit and detailed proofs/ arguments/ reasons. Solutions should be written clearly, legibly, and concisely, and will be graded for both mathematical correctness and presen- tation. Points will be deducted for sloppiness, incoherent or insufficient explanation, or for lack of supporting rationale.

You are allowed to discuss the homework problems with no one except your classmates, the TA, and the instructor. However, the solutions should be written by you and you alone in your own words. Any incident of plagiarism/ cheating (from a person or from any online resource) will be strictly dealt with.

If you discuss the problems with anyone, please note their name at the top of your HW submis- sion under a subtitle ‘Collaborator:’ or ’Discussed with:’.

  1. Exercise 7.24 from the textbook.
  2. Let X 1 ,... , Xn denote a random sample from a Poisson distribution that has the mean θ > 0. Show that the MLE of θ is an efficient estimator of θ.
  3. Exercise 7.44.
  4. Exercise 7.49.
  5. Consider the following two Monte Carlo strategies for estimating π, the area of a unit circle. The two estimates are computed like this:

ˆπ 1 =

n

∑^ n

i=

Xi, where Xi =

1 if U (^) i^21 + U (^) i^22 < 1 0 otherwise; and ˆπ 2 =

n

∑^ n

i=

Yi, where Yi = (1 − V (^) i^2 )^1 /^2 , i = 1,... , n,

and the Ui 1 , U 1 , 2 , Vi are all independent U nif (0, 1) random variables^1 If smaller variance is better, which of ˆπ 1 and ˆπ 2 is best? Also explain why the two estimators do estimate π. (Hints:

∑n i=1 Xi^ is a binomial random variable, and^ V ar(

∑n i=1 Yi) =^

∑n i=1 V ar(Yi).)

Date: Spring 2021. For due dates, see Campuswire/Google Classroom. (^1) See last page for code! 1

  1. Exercise 10.
  2. Solve one of the following two examples: the non-uniqueness of the MLE or the non-existence of the MLE. Non-uniqueness of MLE.. Let X 1 ,... , Xn be iid with density pθ(x) = 2e−|x−θ|, x ∈ R, θ ∈ R. This is called a shifted Laplace (or double-exponential) distribution. (a) Argue that the MLE of θ is not unique. (b) To verify this, take θ = 0, simulate n = 100 observations from the Laplace distribution, plot the likelihood, and identify the flat peak. [Hint: To simulate from the standard Laplace distribution, simulate a standard exponential and then flip a fair coin to decide if the sign should be positive or negative.] Non-existence of MLE.. Consider a mixture of two normal distributions, i.e., πN (μ 1 , σ^21 ) + (1 − π)N (μ 2 , σ^22 ). Suppose X 1 ,... , xn are iid from the above mixture. Argue that the MLE of θ = (μ 1 , μ 2 , σ 1 , σ 2 , π) does not exist. [Hint: what happens to the likelihood, as a function of σ 1 , if μ 1 = X 1 , say?]

Other suggested study problems (no need to submit): 7.26, 7.38, 7.40, 7.47, 7.48.

R code for problem 5:

##-------------------------------------------------------

R code for the Monte Carlo simulations in HW5 math 563

##-------------------------------------------------------

GOAL: To estimate pi = 3.14159..., the area of the unit circle.

Strategy 1

pi.est1 <- function(n, reps) { pi.hat <- numeric(reps) for(i in 1:reps) pi.hat[i] <- 4 * mean((runif(n)2 + runif(n)2) < 1) return(pi.hat) }

TO RUN:

out1 <- pi.est1(n=10000, reps=1000) print(c(mean(out1), var(out1)))

Strategy 2

pi.est2 <- function(n, reps) { pi.hat <- numeric(reps) for(i in 1:reps) pi.hat[i] <- 4 * mean(sqrt(1 - runif(n)**2)) return(pi.hat) }

TO RUN:

myOutput <- pi.est2(n=10000, reps=1000) print(c(mean(myOutput), var(myOutput)))

You should try to run these commands in R for yourself. The results will also help you see which of ˆπ 1 and ˆπ 2 is better. Code details: the function pi.est1 returns the vector containing the sequence of estimates ˆπ 1 , and the function pi.est2 returns the sequence of estimates ˆπ 2.

2