Sometimes I find the usage of unbiased estimator quite confusing. For example, the unbiased estimator of variance:$$S^2=\frac{\sum (X_i-\bar{X})^2}{n-1}\,.$$
True, it is the expectation of variance. But when should we use it? I mean, there are other ways to estimate $\sigma^2$, such as MLE. How can I know when I should use MLE and when I should use unbaised estimator?
Secondly, some books(such as A-level and AP syllabus and textbooks) uses $S$ as an estimation of standard deviation. However, $S$ is NOT an unbiased estimation. This perplexes me a lot because I don't know what they are trying to do. Why don't they use an unbiased estimator of standard deviation instead? Here are some unbiased estimators of standard deviation. https://en.wikipedia.org/wiki/Unbiased_estimation_of_standard_deviation#Background
So I have two questions:
When should we use unbiased estimator? How can I choose between Maximum Likelyhood Estimation and Unbiased Estimation?
Why in some books, unbiased estimator are used in such a way that it end up with bias?
There is no unanimous criterion. All you need to know is that given certain criterion, you prefer this one to that one, and so.
Unbiased estimators don't assure a good estimate per se. Sometimes between an unbiased estimator with a very large variance and another one with a little bias and a much smaller variance, you will prefer the second one. The MSE criterion, which chooses between several estimators $\hat \theta_k$ of the parameter $\theta$ that with lesser MSE (if there is one), uses that same idea, since $$MSE_\theta(\hat \theta)=E(\theta-\hat\theta)^2$$ and its easy to prove that $$MSE_\theta(\hat \theta)=(Bias(\hat \theta))^2+Var(\hat \theta).$$
But even so, it's not a universal truth that $MSE$ is the measure of accuracy. Why squaring instead of absolute value? Why expectation instead of median...?
The best criterion (if there's such a thing) depends on the real world problem you analize; given that criterion, there might be (or not) a best estimator. The mathematical background is not enough to give an absolute answer.