The "percentage bias" of an estimator is given by the formula 100*(average estimator value - paramater value)/(parameter value) where the "parameter value" is the value of the quantity being estimated.
For the question, draw samples from the set "ranvals" generated by the code below.
import numpy as np
ranvals = np.random.exponential(scale=20, size=1000000)
Select 500,000 random samples of size 10 from ranvals and record the mean of each. Compute the average of the means and the mean for all of ranvals, then compute the estimated percentage bias. Here the "average estimator value" is estimated by the average of the sample means, and the "parameter value" is the mean for all of ranvals. The sample mean is an unbiased estimator, so you should get a small estimated percentage bias.
Get Answers For Free
Most questions answered within 1 hours.