The MLE estimates calculated above are estimates and do not reflect the true value. We expect the true value of the parameter to be close to the estimate, but not exactly equal to it. Hence, it makes sense to give an interval instead of a single estimate to reflect our confidence in the estimated value of the parameter.
Suppose the parameter is denoted by \(\theta\) and lies in a set \(\Omega\). For some \(0 < \alpha < 1\), and statistics \(L\) and \(U\) of the sample of random variables, the \((1-\alpha)100%\) confidence interval is \((L,U)\) if
implying that if the experiment is repeated several times (draw the sample and calculate the interval), \((1 - \alpha)100%\) times, the constructed interval will contain the true value of the parameter \(\theta\).
NOTE: The calculations of intervals do not imply that \(\theta\) is contained in the interval with \((1-\alpha)100%\) confidence. We calculate an interval that falls on \(\theta\) or traps \(\theta\) rather than telling the interval that \(\theta\) falls in.
Usually, to obtain the interval, we will first find a pivot (or central) point of our interval using an existing statistic (say MLE) and then construct an interval using statistical properties of the estimate/random variables.
Confidence interval for Mean of Normal Distribution when Variance is Known¶
Consider the problem of estimation of the mean of a normal distribution with known variance \(\sigma^{2}\). Since we know that the MLE for mean is just the sample mean, and the sample mean follows a normal distribution,
where \(\overline{x}\) is the observed value of \(\overline{X}\).
Visualization of the double sided confidence interval on standard normal.
In a very similar manner, we can calculate the one sided confidence interval. Here, we are only interested in the lower or upper bound of the said interval. The other side is \(\infty\) or \(-\infty\).
The interpretation of the right sided confidence interval is that we are \(1-\alpha\) confident that the value of the mean is more than the lower end of the interval. In a similar way, the left side interval gives the upper bound on the value of mean with the desired confidence.
Confidence interval for Mean of Normal Distribution when Variance is Unknown¶
The derivation of confidence intervals in this case is similar to the above, with the only difference of using a t-distribution. Recall
where \(s\) is the observed value of the sample variance \(S\). However, notice that the intervals calculated will usually be larger than those when the variance is known because t-distribution is heavier tailed than a standard normal and thus has higher variance.
Visualization of the double sided confidence interval on t-distribution.
Confidence interval for Variance of Normal Distribution when Mean is Unknown¶
Then, we are interseted in the distribution of \(\mu_{1} - \mu_{2}\). It is intuitive to see that the MLE estimator of this quantity is nothing but \(\overline{X} - \overline{Y}\). Also, since \(\overline{X}\) and \(\overline{Y}\) are both normally distributed,
Consequently, using the confidence intervals derived for the case of a mean of a single normal distribution, we have the following intervals when the standard deviations are known
where \(\overline{x}\) and \(\overline{y}\) are estimates of \(\overline{X}\) and \(\overline{Y}\) respectively.
A more challenging scenario arises when the variances are not known. In that case, it is only logical to try to estimate the intervals using sample variances (themselves random variables)
where \(s_{p}\) is the sample estimate for \(S_{p}\). Lower confidence interval is derived in a similar fashion to the previous derivations, but the upper confidence interval is the lower confidence interval of \(\mu_{2} - \mu_{1}\).
Confidence Interval for Mean of Bernoulli Random Variable¶
Suppose we obtain a sample of \(n\) independent Bernoulli random variables, where the probability of success is \(p\). Let \(X\) denote the no of successes. Using the CLT for large \(n\),
It is not tractable to calculate the confidence intervals from this formulation. Let \(\hat{p} = X/n\) denote the MLE of the mean \(p\). Substituiting in the denominator of above,
The above idea can be extended for interval estimate of the difference of two population ratios. Suppose \(X_{1}\) and \(X_{2}\) denote the two populations with the proportion estimates \(\hat{p_{1}}\) and \(\hat{p_{2}}\). Then we have