โ€œํ™•๋ฅ ๊ณผ ํ†ต๊ณ„(MATH230)โ€ ์ˆ˜์—…์—์„œ ๋ฐฐ์šด ๊ฒƒ๊ณผ ๊ณต๋ถ€ํ•œ ๊ฒƒ์„ ์ •๋ฆฌํ•œ ํฌ์ŠคํŠธ์ž…๋‹ˆ๋‹ค. ์ „์ฒด ํฌ์ŠคํŠธ๋Š” Probability and Statistics์—์„œ ํ™•์ธํ•˜์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค ๐ŸŽฒ

11 minute read

โ€œํ™•๋ฅ ๊ณผ ํ†ต๊ณ„(MATH230)โ€ ์ˆ˜์—…์—์„œ ๋ฐฐ์šด ๊ฒƒ๊ณผ ๊ณต๋ถ€ํ•œ ๊ฒƒ์„ ์ •๋ฆฌํ•œ ํฌ์ŠคํŠธ์ž…๋‹ˆ๋‹ค. ์ „์ฒด ํฌ์ŠคํŠธ๋Š” Probability and Statistics์—์„œ ํ™•์ธํ•˜์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค ๐ŸŽฒ

Introduction to Interval Estimation

Let $X_1, X_2, \dots, X_n$ be a random sample with $X_i \sim f(x; \theta)$, and $x_1, x_2, \dots, x_n$ be the values of the sample.

Here $\theta$ is unknown. The <interval estimation> is to find $(\hat{\theta}_L, \hat{\theta}_U)$ in which we expect to find the true value of the parameter $\theta$.


Q. How to find the interval?

A1. $\theta \in (-\infty, \infty)$ โ†’ bad! ๐Ÿคฌ

A2. We would construct two estimators $\hat{\theta}_L$ and $\hat{\theta}_U$ from the random sample such that $P(\hat{\theta}_L < \theta < \hat{\theta}_U) = 1 - \alpha$.

Here, $(\hat{\theta}_L, \hat{\theta}_U)$ is called an <interval estimator> of $\theta$, $(\hat{\theta}_L, \hat{\theta}_U)$ is called a $100 \cdot (1 - \alpha)$% confidence interval. ๐Ÿ”ฅ

Also, $1-\alpha$ is called the <confidence coefficient> or <confidence level>. ๐Ÿ”ฅ

We usually take $\alpha = 0.01, \; 0.05, \; 0.1$.

๐Ÿ’ฅ Note that $(\hat{\theta}_L, \hat{\theta}_U)$ is not unique!! (๊ผญ ๋Œ€์นญ์ผ ํ•„์š”๋Š” ์—†๋‹ค๋Š” ๋ง)


Interval Estimation

์ด์ œ ์ƒํ™ฉ์— ๋”ฐ๋ฅธ <Interval Estimation> ๋ฐฉ๋ฒ•์„ ์‚ดํŽด๋ณด๊ฒ ๋‹ค!

  • Estimate $\mu$ when $\sigma^2$ is known
  • Estimate $\mu$ when $\sigma^2$ is unknown

z-value: Estimate $\mu$ when $\sigma^2$ is known

Example.

  • $n=100$, $\bar{X} = 170$.
  • $\sigma = 20$

1. We use $\bar{X}$ as a point estimator for $\mu$.

2. We can use CLT here.

\[\frac{\bar{X} - \mu}{\sigma / \sqrt{n}} \overset{D}{\approx} N(0, 1)\] \[\begin{aligned} 0.95 &= P(\hat{\mu}_L < \mu < \hat{\mu}_U) \\ &= P(-z_{0.025} \le z \le z_{0.025}) \\ &\approx P \left(-1.96 \le \frac{\bar{X} - \mu}{\sigma / \sqrt{n}} \le 1.96 \right) \\ &= P \left( \bar{X} - 1.96 \frac{\sigma}{\sqrt{n}} \le \mu \le \bar{X} + 1.96 \frac{\sigma}{\sqrt{n}} \right) \end{aligned}\]

Here, we have $\hat{\mu}_L := \bar{X} - 1.96 \dfrac{\sigma}{\sqrt{n}}$, $\hat{\mu}_U := \bar{X} + 1.96 \dfrac{\sigma}{\sqrt{n}}$

$\therefore$ A 95% confidence interval would be $(170 - 3.92, 170 + 3.92)$.

Remark. Confidence Interval on $\mu$ when $\sigma^2$ is known

Let $x_1, \dots, x_n$ be given data points from a random sample $X_1, \dots, X_n$ with known population variance $\sigma^2$ and unknown population mean $\mu$.

If $\bar{x}$ is the sample mean, a $100(1-\alpha)\%$ confidence interval for $\mu$ is given by

\[\left( \bar{x} - z_{\alpha/2} \frac{\sigma}{\sqrt{n}} , \; \bar{x} + z_{\alpha/2} \frac{\sigma}{\sqrt{n}} \right)\]

๐Ÿ’ฅ Note that this is an approximate interval unless $X_i \sim N(\mu, \sigma^2)$.

Q1. Is it true that $P \left( \mu \in (\hat{\mu}_L, \hat{\mu}_U) \right) \overset{?}{=} 0.95$? ๐Ÿ”ฅ

A1. No!! $\mu$ is not a random variable!


Q2. Then what does the confidence interval really mean?

A2. Its the number of counts that $\mu$ is actually belong to sampled interval! ๐Ÿ”ฅ

Let $x_1, \dots, x_n$ be a random sample. Supp. we obtain 1,000 samples and each sample has size $n$. Then, we have the following:

1st sample: $x_{11}, x_{12}, \dots, x_{1n}$ โ†’ $\bar{x}_1$ โ†’ confidence \((\bar{\mu}_{1L}, \bar{\mu}_{1U})\)

2nd sample: $x_{21}, x_{22}, \dots, x_{2n}$ โ†’ $\bar{x}_1$ โ†’ confidence \((\bar{\mu}_{2L}, \bar{\mu}_{2U})\)

$\vdots$

1000th sample: $x_{1000, 1}, x_{1000, 2}, \dots, x_{1000, n}$ โ†’ $\bar{x}_1$ โ†’ confidence \((\bar{\mu}_{1000, L}, \bar{\mu}_{1000, U})\)

์ด๋ ‡๊ฒŒ ์–ป์€ 1,000๊ฐœ์˜ interval estimation์— ๋Œ€ํ•ด, ์ •ํ™•ํžˆ 95%์˜ ๋น„์œจ, ์ฆ‰ 950๊ฐœ์˜ interval์— true parameter $\mu$๊ฐ€ ์‹ค์ œ๋กœ ํฌํ•จ๋˜์–ด ์žˆ๋‹ค๋Š” ๋ง!


Error of Interval Estimation

Definition. Error of estimation

Now, letโ€™s consider the error $| \bar{x} - \mu |$.

For an estimated interval $\left( \bar{x} - z_{\alpha/2} \frac{\sigma}{\sqrt{n}}, \bar{x} + z_{\alpha/2} \frac{\sigma}{\sqrt{n}}\right)$, the error is

\[\left| \bar{x} - \mu \right| \le z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}}\]


Theorem.

If $\bar{x}$ is used as an estimate of $\mu$, we can be $100(1-\alpha)\%$ confident that the error will not exceed $z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}}$.

Theorem.

Q. How large can the sample size be if the error is at most $\epsilon$?

A. We want $\text{Err} = z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}}$ to be less than $\epsilon$.

\[\text{Err} = z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}} \le \epsilon\]

Solve the inequality for $n$.

\[n \ge \left[ \frac{z_{\alpha/2} \cdot \sigma}{\epsilon} \right]^2\]

One-sided Confidence Bounds

์ง€๊ธˆ๊นŒ์ง€ ์šฐ๋ฆฌ๋Š” ์–‘ ๋์˜ ์ƒํ™ฉ์„ ์‚ดํŽด๋ณด๋Š” Two-sided Confidence Interval์„ ์‚ดํŽด๋ณด์•˜๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ๋•Œ๋กœ๋Š” ํ•œ์ชฝ์˜ ์ƒํ™ฉ๋งŒ ๊ด€์‹ฌ์˜ ๋Œ€์ƒ์ด ๋  ์ˆ˜๋„ ์žˆ๋‹ค! ๊ทธ๋ž˜์„œ ์•„๋ž˜์™€ ๊ฐ™์ด One-side์— ๋Œ€ํ•œ Confidence Interval์„ ๊ตฌํ•ด์•ผ ํ•  ์ˆ˜๋„ ์žˆ๋‹ค.

\[P(\hat{\theta}_L \le \mu) = 1 - \alpha\]

์‚ฌ์‹ค two-sided์—์„œ ์•ฝ๊ฐ„๋งŒ ์ˆ˜์ •ํ•ด์ฃผ๋ฉด ๋œ๋‹ค. two-sided์—์„œ์˜ Confidence Interval์ด ์•„๋ž˜์™€ ๊ฐ™๋‹ค๋ฉด,

\[\bar{x} - z_{\alpha/2} \frac{\sigma}{\sqrt{n}} \; \le \; \mu \; \le \; \bar{x} + z_{\alpha/2} \frac{\sigma}{\sqrt{n}}\]

์—ฌ๊ธฐ์—์„œ ํ•œ์ชฝ๋งŒ ์ทจํ•ด $\alpha$๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋œ๋‹ค. ์ฆ‰,

\[\bar{x} - z_{\textcolor{red}{\alpha}} \frac{\sigma}{\sqrt{n}} \; \le \; \mu\]

์ด๊ฒƒ์€ ๊ณง

\[P \left(\bar{x} - z_{\textcolor{red}{\alpha}} \frac{\sigma}{\sqrt{n}} \; \le \; \mu \right) = 1 - \alpha\]

์™€ ๊ฐ™๋‹ค!


t-value: Estimate $\mu$ when $\sigma^2$ is unknown

์•ž์—์„œ ์ง„ํ–‰ํ–ˆ๋˜ ๊ณผ์ •์„ ๋‹ค์‹œ ์‚ดํŽด๋ณด์ž. ์šฐ๋ฆฌ๋Š” CLT๋ฅผ ์‚ฌ์šฉํ•ด sample mean $\bar{X}$๋ฅผ Normal ๋ถ„ํฌ๋กœ ๊ทผ์‚ฌํ–ˆ๋‹ค.

\[Z = \frac{\bar{X} - \mu}{\sigma / \sqrt{n}}\]

๊ทธ๋Ÿฐ๋ฐ! population variance $\sigma$๋ฅผ ๋ชจ๋ฅด๋Š” ์ง€๊ธˆ ์ƒํ™ฉ์—์„œ๋Š” ์œ„์™€ ๊ฐ™์ด ์ ‘๊ทผํ•  ์ˆ˜ ์—†๋‹ค!! ๐Ÿ˜ฒ $\sigma$๋ฅผ ๋ชจ๋ฅด๊ธฐ ๋•Œ๋ฌธ์— CLT ๊ทผ์‚ฌ์‹์—์„œ ๋ถ„๋ชจ ๋ถ€๋ถ„์— $\sigma$๋ฅผ ์“ธ ์ˆ˜ ์—†๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค!

์šฐ๋ฆฌ๊ฐ€ ๊ทธ๋‚˜๋งˆ $\sigma^2$์™€ ๋น„์Šทํ•˜๋‹ค๊ณ  ์ƒ๊ฐํ•˜๋Š” ๊ฒƒ์ด ์žˆ๋‹ค. ๋ฐ”๋กœ โ€œsample varianceโ€ $S^2$! ์ด ๋…€์„์œผ๋กœ $\sigma$๋ฅผ ๋Œ€์ฒดํ•ด ์‹์„ ๋‹ค์‹œ ์จ๋ณด์ž.

\[\frac{\bar{X} - \mu}{S / \sqrt{n}}\]

์–ด๋ผ! ์ด ์‹์€ studentโ€™s t-distribution์—์„œ ์ด๋ฏธ ์‚ดํŽด๋ณด์•˜๋‹ค.

\[\frac{\bar{X} - \mu}{S / \sqrt{n}} \; \overset{D}{\sim} \; t(n-1)\]

๊ทธ๋ž˜์„œ $t(n-1)$ distribution์—์„œ $100(1-\alpha)\%$ confidence interval์„ ๊ตฌํ•˜๋ฉด,

\[P \left( -t_{\alpha/2} (n-1) < \frac{\bar{X} - \mu}{S / \sqrt{n}} < t_{\alpha/2}(n-1) \right) = 1 - \alpha\]

๊ฐ€ ๋œ๋‹ค!

Remark. Confidence Interval on $\mu$ when $\sigma^2$ is unknown

Let $x_1, \dots, x_n$ be given data points from a normal random sample $X_1, \dots, X_n$ with mean $\mu$ and variance $\sigma^2$.

Here, the population mean $\mu$ and the population variance $\sigma$ are both unknown.

If $\bar{x}$ is the sample mean and $s^2$ is the sample variance, then a $100(1-\alpha)\%$ confidence interval for $\mu$ is given by

\[\left( \bar{x} - t_{\alpha/2}(n-1) \frac{s}{\sqrt{n}} , \; \bar{x} + t_{\alpha/2}(n-1) \frac{s}{\sqrt{n}} \right)\]

Remark.

1. The width of the interval is random!

\[\left| \bar{x} - \mu \right| < t_{\alpha/2}(n-1) \cdot \frac{s}{\sqrt{n}}\]

2. This confidence interval is not an approximation, since we assume sample $X_i$ as iid. normal $\mu$, $\sigma^2$.


Compare Point Estimator and Interval Estimator

Q. Does confidence interval give us more information about $\mu$ than a point estimator $\bar{x}$?

A. Not reallyโ€ฆ ๐Ÿค”

[Point Estimator]

For a point estimator $\bar{x}$,

by LLN, $\bar{x} \rightarrow \mu$ as $n\rightarrow\infty$.

And the variance $\text{Var}(\bar{x}) = \sigma^2/n$.

[Interval Estimator]

For an interval estimator $\left(\bar{x} - z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}}, \; \bar{x} + z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}} \right)$,

the error is $\left| \bar{x} - \mu \right| \le z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}}$.

๐Ÿ’ฅ This means the width of the confidence interval is determined by the standard deviation of the point estimator!! ์ด๊ฒƒ์€ ๋‘˜ ์ค‘ ํ•œ Estimator๊ฐ€ ๊ฐœ์„ ๋˜๋ฉด, ๋‹ค๋ฅธ ํ•˜๋‚˜์˜ ์„ฑ๋Šฅ๋„ ๊ฐœ์„ ๋จ์„ ๋งํ•œ๋‹ค.


์ด์–ด์ง€๋Š” ํฌ์ŠคํŠธ๋“ค์—์„œ๋Š” ์ƒํ™ฉ๋ณ„๋กœ <Interval Estimation>์„ ์ˆ˜ํ–‰ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์‚ดํŽด๋ณผ ์˜ˆ์ •์ด๋‹ค! ๐Ÿคฉ