all( c(1,2,3,4,5) > 0)
Solutions to Midterm 1 Extra Questions
Ch. 8, Extra Question 1
Consistency is a large sample property for an estimator. It says that, if we have a large sample, then our estimator should be close to the population quantity that we are trying to estimate.
An unbiased estimator is one that, if we could repeatedly draw samples of size
Ch. 8, Extra Question 2
No, an unbiased estimator does not necessarily have to be consistent. Consider estimating
Ch. 8, Extra Question 3
No, consistent estimators can be biased. Consider estimating
Ch. 8, Extra Question 4
Since
grows faster than , diverges (i.e., the absolute value goes to infinity as )Since
grows slower than , converges to 0 as
Solutions to Additional Questions
What would be the result from running the following code?
Answer:
TRUE
, this checks if all elements of the vector1,2,3,4,5
are greater than 0. Since they all are, it returnsTRUE
Consider the following function
<- function(n) { a_function <- 0 out for (i in 1:n) { <- out + i^2 out } out }
If you run the following code, what will it output?
a_function(5)
Answer: It will output
55
which comes from adding up
Suppose there are two random variables
and .If you know that
and are independent, do you know what their covariance is equal to? Explain. If yes, what is the covariance equal to?Answer: Yes, their covariance is 0. Independent random variables have 0 covariance.
If you know that
, are and independent? Explain.Answer: Not necessarily, random variables can have 0 covariance without being fully independent.
If you know that
, are and independent? Explain.Answer:
and are not independent in this case. If they were, their covariance would be equal to 0.
Suppose that
and are two random variables such that , , , and . Suppose that .What is
?Answer:
where the second equality holds because expectations can pass through sumsWhat is
?Answer:
Consider a random variable
that is equal to a firm’s profits (in thousands of dollars) and another random variable that is equal to firm’s number of employees. Suppose you know thatExplain how to interpret
.Answer: This is the conditional expectation of
given takes the particular value . In the context of the problem, it is the mean profit’s of firms that have number of employees. The value can change for different numbers of employees.What is
?Answer:
Suppose that
, , and , calculate .Answer:
Suppose that we have a random sample of
observations of and .Suppose that you want to estimate the covariance between
and using the data that we have. Propose an estimator for the covariance. Hint: Try using the analogy principle and the expression .Answer:
Alternatively, the definition of covariance is
. Propose an estimator for the covariance based on this expression. Would you expect this to give you the same estimate of the covariance as in part a?Answer: To conserve on notation, let
and denote the sample averages of and , respectively. Then,