0% found this document useful (0 votes)
38 views1 page

Homework 2: Written Homework (Submmite To Gradescope Through Course Code MKRWWE)

This document provides instructions for Homework 2 that is due on March 27. It includes two problems for written homework on probability concepts and properties of random variables to be submitted to Gradescope. It also includes coding homework in R to compare estimators of the parameter λ for a Poisson distribution using sample mean and sample variance based on generated random variables. Students are asked to generate distributions of the estimators from 1000 replications and comment on the difference in their dispersion.

Uploaded by

James Dakota
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views1 page

Homework 2: Written Homework (Submmite To Gradescope Through Course Code MKRWWE)

This document provides instructions for Homework 2 that is due on March 27. It includes two problems for written homework on probability concepts and properties of random variables to be submitted to Gradescope. It also includes coding homework in R to compare estimators of the parameter λ for a Poisson distribution using sample mean and sample variance based on generated random variables. Students are asked to generate distributions of the estimators from 1000 replications and comment on the difference in their dispersion.

Uploaded by

James Dakota
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Homework 2

Due Data: Friday, March 27

Written Homework (submmite to Gradescope through course code MKRWWE)

Problem 1
Suppose you are rolling a fair (balance) die with 6 faces. Your payoff R = (x − 3)2 where the outcome of the
die. For example, if you see number 6, you can get $9. What is your expected payoff? Compute it in two
ways.
1.1 Find the distribution of R directly and then compute the expectation.
1.2 Use LOTUS.
Problem 2
2.1 Prove the memoryless property for geometric random variable X where its pmf is P(X = k) = (1−p)k−1 p.
P(X = k + i | X > k) = P(X = i)

2.2 Prove the memoryless property for exponential random variable Y where its pdf is f (x) = λe−λx for x ≥
0.
P(X > s + t | X > s) = P(X > t)

Coding Homework (submmite the pdf file to Canvas)

Let X be a Possion(λ) random variable. We have seen in class that


E(X) = Var(X) = λ.
Suppose that we do not know the true value of λ and want to estimate it from observed data {x1 , x2 , . . . , xn }.
There are two possible ways to do estimate λ:
Pn
• use the sample mean x̄ = n1 i=1 xi
Pn
• use the sample variance S 2 = n−11
i=1 (xi − x̄)
2

Please note that in sample variance, the denominator is n − 1 instead of n.


In this assignment, you will compare the two estimators. In the following questions, we assume that
λ = 10.
1. Generate n = 10 independent Poisson(λ) random variables, calculate the sample mean (you can use
rpois(n = ,lambda = ) function in R, where n is the total number of random varables generated and
lambda is the parameter λ). Do the above 1000 times, then you have 1000 observations of the sample
mean (each of them is calculated from n = 10 independent Poisson (λ) random variables.) Generate
the boxplot and histogram of the 1000 observation of sample means.
2. For n = 10, repeat Part 1 with the sample variance.
3. Compare the boxplot and histogram you obtained from Part 1 and 2. Comment on the difference
between them. (Hint: measure of dispersion)

You might also like