# Module 8: Interval Estimation

- θ is fixed while θ<sub>hat\_n</sub> is a random variable which provides the single best value to estimate θ
- θ<sub>hat </sub>is unbiased when bias = E(θ<sub>hat\_n) - </sub>θ = 0
- θ<sub>hat </sub>is consistent when<sub> </sub>θ<sub>hat\_n -&gt; </sub>θ
- Mean squared error MSE = E(θ<sub>hat\_n - </sub>θ)<sup>2</sup> = bias(θ<sub>hat\_n</sub>) + V(θ<sub>hat\_n</sub>)
- If bias -&gt; and se -&gt; as n -&gt; infinity then θ<sub>hat\_n </sub>is consistent
- Probability is stronger than samples, probability standard error eventually converges to 0 as n approaches infinity but samples converge to a normal distribution which is not necessarily the same as the population distribution.
- **We the estimator variability (se) to provide an interval of parameter values that are "supported" by the sample.**

A 1 - α confidence interval for a parameter θ is an interval C<sub>n</sub> = (a; b) where a = a(X<sub>1</sub>, ...X<sub>n</sub>) and b = b(X<sub>1</sub>, ...X<sub>n</sub>) are functions of the data such that: P(θ ∈ C<sub>n</sub>) &gt;= 1 - α ; Where θ is the actual population mean. C<sub>n</sub> is random and θ is fixed.

The confidence interval (a; b) capture the true mean with confidence 1 - α. We commonly use 95% confidence intervals which corresponds to α = .05. This does **NOT** mean there is 1- α chance/probability the parameter falls in the interval. The correct interpretation: If we repeatedly take samples of size n from a fixed and stable population and build a 95% confidence intervals, 95% of these intervals would contain the true unknown parameter.

#### CI For Mean of a Normal Distribution  


If σ<sup>2</sup> is known: X<sub>bar </sub>+/- Z<sub>α</sub><sub>/2</sub>\*α<sub>x</sub>

If σ<sup>2</sup> is unknown: X<sub>bar </sub>+/- t<sub>(</sub><sub>α</sub><sub>/2,n-1)</sub>\*S/sqrt(n); Where S<sup>2</sup> = 1/(n-1) \* sum(x<sub>i</sub>-x<sub>bar</sub>)<sup>2</sup>

Using S in place of SD causes more uncertainty, thus increasing the size of the CI.

We can similarly find the confidence interval of a proportion in a similar manner:

[![image-1661355124118.png](https://bookstack.mitchellhenschel.com/uploads/images/gallery/2022-08/scaled-1680-/image-1661355124118.png)](https://bookstack.mitchellhenschel.com/uploads/images/gallery/2022-08/image-1661355124118.png)

#### Chi-Square DIstribution

[![image-1661355165322.png](https://bookstack.mitchellhenschel.com/uploads/images/gallery/2022-08/scaled-1680-/image-1661355165322.png)](https://bookstack.mitchellhenschel.com/uploads/images/gallery/2022-08/image-1661355165322.png)

The above represents the chi-squared distribution with n degrees of freedom. E(Q) = n and V(Q) = 2n.

The distribution of X<sup>2</sup><sub>n-1</sub> is not symmetrical, so instead of centering our CI (a,b) on the mean, we look for symmetry so that the bounds P(θ &lt; a) = α/2 and P(θ &gt; b) = α/2.

[![image-1661355660032.png](https://bookstack.mitchellhenschel.com/uploads/images/gallery/2022-08/scaled-1680-/image-1661355660032.png)](https://bookstack.mitchellhenschel.com/uploads/images/gallery/2022-08/image-1661355660032.png)

We derive the variance of a distribution through Fisher's theorem (not shown). The CI comes out to:

[![image-1661355757584.png](https://bookstack.mitchellhenschel.com/uploads/images/gallery/2022-08/scaled-1680-/image-1661355757584.png)](https://bookstack.mitchellhenschel.com/uploads/images/gallery/2022-08/image-1661355757584.png)

Pearson's product Moment Correlation Coefficient is between -1 and 1 and represents the correlation between 2 variables.

[![image-1661356198955.png](https://bookstack.mitchellhenschel.com/uploads/images/gallery/2022-08/scaled-1680-/image-1661356198955.png)](https://bookstack.mitchellhenschel.com/uploads/images/gallery/2022-08/image-1661356198955.png)

Although rarely used, you could find a confidence interval for this value.

[![image-1661356285383.png](https://bookstack.mitchellhenschel.com/uploads/images/gallery/2022-08/scaled-1680-/image-1661356285383.png)](https://bookstack.mitchellhenschel.com/uploads/images/gallery/2022-08/image-1661356285383.png)

[![image-1661356309955.png](https://bookstack.mitchellhenschel.com/uploads/images/gallery/2022-08/scaled-1680-/image-1661356309955.png)](https://bookstack.mitchellhenschel.com/uploads/images/gallery/2022-08/image-1661356309955.png)