0% found this document useful (0 votes)
17 views2 pages

Ps 5

This document provides instructions for problem set 5 in a statistics course. Students can work in groups of up to three and will submit their R code. The problem set involves estimating parameters of a uniform distribution based on random samples. Students are asked to determine if various estimators are biased or consistent, derive their expected values, and write an R function to estimate the range of a uniform distribution based on a sample. Simulations are used to validate the theoretical results.

Uploaded by

Adriana Garcia
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)
17 views2 pages

Ps 5

This document provides instructions for problem set 5 in a statistics course. Students can work in groups of up to three and will submit their R code. The problem set involves estimating parameters of a uniform distribution based on random samples. Students are asked to determine if various estimators are biased or consistent, derive their expected values, and write an R function to estimate the range of a uniform distribution based on a sample. Simulations are used to validate the theoretical results.

Uploaded by

Adriana Garcia
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/ 2

PS 5

Due: Thursday, 10 November

You may work in groups of up to three. Within groups, you may copy code.
Across groups, please do not copy code. You will submit your R code on Canvas.
I should be able to run your R code without changing anything (e.g. please do
not hardcode paths such as /Users/YourName/...) and without error. Note
that the readability and organization of your R file(s) is part of the grade.

This problem set is related to a well-known problem called the German Tank
Problem1 , but we will allow for the case where the the serial numbers of the
tanks might not start with 0.

Let X1 , . . . Xn be i.i.d draws from a continuous uniform distribution on [a, b].


Let θ̂ = X(n) = max(X1 , . . . , Xn ). Throughout the problem set we use common
notation, such as X(1) = min(X1 , . . . , Xn ), X(n) = max(X1 , . . . , Xn ). Suppose
that β̂ is an estimator of β. The bias of β̂ is bias(β̂) = E(β̂) − β. An estimator
β̂ is unbiased if bias(β̂) = 0.

1. Do you think that θ̂ is a biased or unbiased estimator for b? Argue intu-


itively (that is, without solving for E(θ̂)) for why you think it is biased or
unbiased for b.
2. Intuitively, do you think it is possible to create an unbiased estimator of
b as a function of only X(n) ? (If you find out later in the problem set you
were wrong with your guess, don’t worry about editing your answer. I will
grade this question very easily. I just want to see your thought process.)

3. Do you think that θ̂ is a consistent estimator for b? You may argue


intuitively or with math. Hint: see notes from class.
4. What is the pdf of θ̂?
5. Find E(θ̂). Note that you might need one iteration of integration by parts
to solve this.

6. Propose an unbiased estimator of b if we knew a.


1 https://en.wikipedia.org/wiki/German_tank_problem

1
7. What would you guess is E(X(1) )? (Do not solve this using brute-force
math. Use only intuition. You may check with math if you prefer, though.)
8. Find E(X(n) − X(1) ).
9. Propose an unbiased estimator for the range, b − a.

10. Propose an unbiased estimator of a and an unbiased estimator of b. Note


that this is not actually straightforward and requires some thinking. Please
describe your thought process for how you found the estimator.
11. Create an R function that takes a vector of draws from a continuous
h iuni-
0

form distribution with unknown range [a, b] and returns a vector â, b̂ of
unbiased estimates. Please call this function est_unif_range or estUnifRange.
The rest of the questions discuss the specific case of a = 75, b = 200, n = 5. It is
often useful to (1) use simulations by setting the parameters a and b to numbers
to generate the data; (2) pretend that we don’t know what a and b are and try
to estimate them; and finally to (3) look and see how we did at estimating them
by comparing them to the true values (the ones used to generate the data).
12. Suppose that a = 75, b = 200, n = 5. Based on your answer in (8), what
is the bias of X(n) − X(1) in this particular case?
13. Provide R code to confirm that your answer in (11) produces results that
you expected. That is, using simulations show that the R function you
created does indeed produce unbiased results. (The purpose of this ques-
tion is that it’s always a good idea to check theory with simulations to
confirm your theoretical result and also to confirm that you did not make
a mistake in writing the R function.)
h i0
14. Using simulations, estimate the variance-covariance matrix of â, b̂ .

15. Using simulations, estimate the variance of b̂ − â. Is there a relationship


between this variance and the variance-covariance matrix in (14)?

You might also like