relation between confidence interval and likelihood function I once meet the following question,which is also listed by book written by Cosma Rohilla Shalizi
what is the relation between between confidence intervals and the likelihood function.

I am not very clear how to connect these two concepts?
 A: Many confidence intervals are derived from the Fisher Information or directly from the likelihood function for a parameter of interest. Fisher information is of course based on the likelihood function as well. Let $\hat{\theta}$ denote the maximum likelihood estimator of our parameter of interest.  Here are four intervals based on the the likelihood function.
One asymptotic confidence interval: could be defined as:
$
S = \{\theta \in \Omega: \sqrt{nI(\theta)}|\hat{\theta}-\theta|<z_{\alpha/2}\}
$
Another by substituting in $I(\hat{\theta})$ for ${I(\theta)}$ and rewriting in a different form:
$
\left(\hat{\theta} \pm \frac{z_{\alpha/2}}{\sqrt{nI(\hat{\theta})}}\right)
$
Or we could use the observed Fisher Information, $-l_n^{''}(\hat{\theta})$, where $l_n^{''}$ is the second derivative of the log likelihood function, to get another interval:
$
\left(\hat{\theta} \pm \frac{z_{\alpha/2}}{\sqrt{-l_n^{''}(\hat{\theta})}}\right)
$
And a fourth interval, called profile confidence intervals is formed by:
$
S = \{\theta \in \Omega: 2l_n(\hat{\theta})-2l_n(\theta)<z_{\alpha/2}\}
$
which typically must be solved computationally.
So for example in the case of a sequence of iid normal variables in which we want a 95% CI for $\theta = \mu$, we could use:
$
\left(\hat{\theta} \pm \frac{z_{\alpha/2}}{\sqrt{nI(\theta})}\right)
$
and since $I(\theta)$ is $\frac{1}{\sigma^2}$ and $\hat{\theta}=\bar{x}$ we get:
$
\left(\bar{x} \pm \frac{z_{\alpha/2}*\sigma}{\sqrt{n}}\right)
$
which is your famous CI equation based on Fisher information (an thus the likelihood function).
I skipped some details so let me know if you want any filled in or see Theoretical Statistics by Keener (2010).
