<- c(_____, _____, _____, _____, _____, _____)
homes <- sum(_____) / length(_____)
avg avg
2.2 Estimators
Exercise 1: Understanding Estimators Let’s start with the basics! Given sample data, write down the formulas for:
- The best estimator of a random variable’s expectation.
- The best estimator of a random variable’s variance.
Answers:
- Estimator for a RV’s expectation: ___
- Estimator for a RV’s variance: ___
Exercise 2: Estimating Expected Value A real estate analyst collected data on the percentage change in home values over one year for six properties:
{5.2%, -1.8%, 7.5%, 4.9%, 6.1%, 3.2%}
Your task: What is the best estimate for the expected value of the random variable “annual percentage change in home value”? Use R code to solve this problem.
Answer:
Exercise 3: Estimating Variance Using the same data from Exercise 2, what is the best estimate for the variance of the random variable “annual percentage change in home value”? Use R code to solve this problem.
Answer:
sum((_____ - _____)^2) / (length(_____) - 1)
Exercise 4: Checking Your Work Let’s verify your answers to Exercises 2 and 3 using R’s built-in functions:
mean()
estimates the expected value of a RV.var()
estimates the variance of a RV.
Answer:
mean(_____)
var(_____)