Reciprocal of an F
Let the r.v. F ∼ F (v1, v2) and let Y = 1/F . Then Y has a pdf.
f (y )∗ = g (F )|dF dy|
= v1v1/2y1−(v1/2)v2v2/2y(v1+v2)/2 B(v21,v22)(v2y + v1)(v1+v2)/2
1 y2
= v1v1/2v2v2/2y(v2/2)−1
B(v22,v21)(v1+ v2y )(v1+v2)/2 y ∈ [0, ∞)
That is if F ∼ F (v1, v2) and Y = 1/F , then Y ∼ F (v2, v1)
30
CI for σ
X2/σ
Y2from two ind. Normal
Given SX2, SY2 are unbiased estimates of σ2X, σY2 derived from samples of size n and m , respectively, from two independent normal populations. Find a 100(1 − α)% CI for σX2/σ2Y.
(n − 1)SX2/σ2X ∼ χ2(n − 1) , (m − 1)SY2/σY2 ∼ χ2(m − 1)
(m−1)SY2
σ2Y /(m − 1)
(n−1)S12
σ12 /(n − 1)
= SY2/σ2Y SX2/σ2X
follow a F distribution with degrees of freedom (m − 1) and (n − 1) i.e.,
SY2/σY2
SX2/σX2 ∼ F (m − 1, n − 1)
31
CI for σ
X2/σ
Y2from two ind. Normal
Given SX2, SY2 are unbiased estimates of σ2X, σY2 derived from samples of size n and m , respectively, from two independent normal populations. Find a 100(1 − α)% CI for σX2/σ2Y. (n − 1)SX2/σ2X ∼ χ2(n − 1) , (m − 1)SY2/σY2 ∼ χ2(m − 1)
(m−1)SY2
σ2Y /(m − 1)
(n−1)S12
σ12 /(n − 1)
= SY2/σ2Y SX2/σ2X
follow a F distribution with degrees of freedom (m − 1) and (n − 1) i.e.,
SY2/σY2
SX2/σX2 ∼ F (m − 1, n − 1)
31
SY2/σ2Y
SX2/σ2X ∼ F (m − 1, n − 1)
So we select c = F1−α/2(m − 1, n − 1) and d = Fα/2(m − 1, n − 1), and
P(c ≤ SY2/σY2
SX2/σX2 ≤ d ) = 1 − α That is
P c SX2 SY2 ≤ σX2
σY2 ≤ d SX2
SY2 = 1 − α
Often from table we have
c = F1−α/2(m − 1, n − 1) = 1/Fα/2(n − 1, m − 1) and
d = Fα/2(m − 1, n − 1), let sx2 and sy2 be the realization of SX2 and SY2, then a 100(1 − α)% CIs for σX2/σ2Y is
[ 1
Fα/2(n − 1, m − 1) sX2
sY2 , Fα/2(m − 1, n − 1)sX2 sY2 ]
32
SY2/σ2Y
SX2/σ2X ∼ F (m − 1, n − 1)
So we select c = F1−α/2(m − 1, n − 1) and d = Fα/2(m − 1, n − 1), and
P(c ≤ SY2/σY2
SX2/σX2 ≤ d ) = 1 − α That is
P c SX2 SY2 ≤ σX2
σY2 ≤ d SX2
SY2 = 1 − α Often from table we have
c = F1−α/2(m − 1, n − 1) = 1/Fα/2(n − 1, m − 1) and
d = Fα/2(m − 1, n − 1), let sx2 and sy2 be the realization of SX2 and SY2, then a 100(1 − α)% CIs for σX2/σ2Y is
[ 1
Fα/2(n − 1, m − 1) sX2
sY2, Fα/2(m − 1, n − 1)sX2 sY2 ]
32
Example
From two ind Normal with unknown means and variances, we have (12)sX2 = 128.4 from a random sample of size 13 and (8)sY2 = 36.72 from a random sample of size 9. Find a 98%
CIs for σX2/σY2.
SY2/σY2
SX2/σX2 ∼ F (8, 12) From F -table we have F0.01(12, 8) = 5.67 and F0.01(8, 12) = 4.50, so a 98% CIs for σ2X/σY2 is
[ 1
5.67
128.4/12
36.72/8 , 4.50 128.4/12 36.72/8 ]
33
Example
From two ind Normal with unknown means and variances, we have (12)sX2 = 128.4 from a random sample of size 13 and (8)sY2 = 36.72 from a random sample of size 9. Find a 98%
CIs for σX2/σY2.
SY2/σY2
SX2/σX2 ∼ F (8, 12) From F -table we have F0.01(12, 8) = 5.67 and F0.01(8, 12) = 4.50, so a 98% CIs for σ2X/σY2 is
[ 1
5.67
128.4/12
36.72/8 , 4.50 128.4/12 36.72/8 ]
33
Confidence intervals for proportions (p)
Estimate proportions. Construct a CI for p in the Bin(n, p) distribution.
Assume that sampling is from a binomial population and hence that the problem is to estimate p in the Bin(n, p) distribution where p is unknown.
recall:
Given Y is distributed as Bin(n, p), an unbiased estimate of p is ˆp = Yn.
E (ˆp) = E (Y n) = p and
Var (ˆp) = 1
n2Var(Y ) = 1
n2np(1 − p) = p(1 − p) n
34
Confidence intervals for proportions (p)
For large n,
Y − np
pnp(1 − p) = (Y /n) − p pp(1 − p)/n
can be approximated by the standard normal N (0, 1).
Thus an approximate 100(1 − α)% CI for p is obtained by considering
P(−zα/2< (Y /n) − p
pp(1 − p)/n < zα/2) = 1 − α
Replace the variance of ˆp = Y /n by its estimate ˆp(1 − ˆp)/n, giving a simple expression for the CI for p is
[ˆp ± zα/2
rˆp(1 − ˆp) n ] = [Y
n ± zα/2
r(Y /n)(1 − Y /n)
n ]
35
Confidence intervals for proportions (p)
For large n,
Y − np
pnp(1 − p) = (Y /n) − p pp(1 − p)/n
can be approximated by the standard normal N (0, 1).
Thus an approximate 100(1 − α)% CI for p is obtained by considering
P(−zα/2< (Y /n) − p
pp(1 − p)/n < zα/2) = 1 − α
Replace the variance of ˆp = Y /n by its estimate ˆp(1 − ˆp)/n, giving a simple expression for the CI for p is
[ˆp ± zα/2
rp(1 − ˆˆ p) n ] = [Y
n ± zα/2
r(Y /n)(1 − Y /n)
n ]
35
Example
Assume Y ∼ Bin(n, p), we have n = 36 and y /n = 0.222, find an approximate 90% CIs for p
[ 0.222 ± 1.645
r(0.222)(1 − 0.222)
36 ]
Example
Poll n = 100 and y = 51 say yes, find 95% CI for p .41, 0.61
Poll n = 351 and y = 185 say yes, find 95% CI for p?
36
Example
Assume Y ∼ Bin(n, p), we have n = 36 and y /n = 0.222, find an approximate 90% CIs for p
[ 0.222 ± 1.645
r(0.222)(1 − 0.222)
36 ]
Example
Poll n = 100 and y = 51 say yes, find 95% CI for p .41, 0.61
Poll n = 351 and y = 185 say yes, find 95% CI for p?
36
Example
Assume Y ∼ Bin(n, p), we have n = 36 and y /n = 0.222, find an approximate 90% CIs for p
[ 0.222 ± 1.645
r(0.222)(1 − 0.222)
36 ]
Example
Poll n = 100 and y = 51 say yes, find 95% CI for p .41, 0.61 Poll n = 351 and y = 185 say yes, find 95% CI for p?
36
CI for difference of two proportions
37
民
民 民調 調 調的 的 的解 解 解讀 讀 讀
「....施政滿意度4成4。本次調查是以台灣地區住宅電話簿 為抽樣清冊, 並以電話的後四碼進行隨機抽樣。共成功訪 問1056位台灣地區20歲以上民眾。在95%的信心水準下,
抽樣誤差為正負3.0百分點。
1. 這項民調的母體是什麼?樣本數為多少?
2. 受訪民眾中對施政滿意約有多少人?
3. 算出這次調查的信賴區間?
38
民
民 民調 調 調的 的 的解 解 解讀 讀 讀
1. 在本次調查中,母體是台灣地區20歲以上的民眾,樣
本則是成功訪問的1056人,「滿意度4成4」表示 在1056位受訪者中,約有44%的人表示滿意(即約 有456人回答滿意
2. 區間[0.44 − 0.03, 0.44 + 0.03] = [0.41, 0.47],稱為信賴 區間 (信賴區間:[估計值-最大誤差 , 估計值+最大誤 差] )
假設母體真正的滿意比例是p,這次的調查推估p的值可 能會落在0.41到0.47的範圍內。
3. 95%的信心水準: p是不可知的,而抽樣都會有誤差,
並不能保證真正的比例p一定會在我們所推估的區間 內。「如果我們抽樣很多次,每次都會得到一個信賴 區間,那麼這麼多的信賴區間中,約有95%的區間會
涵蓋真正的p值。
4. 而我們有95%的信心說,真正的滿意度會落在我們所
得出的區間中。
39
Sample Size for proportion
某報對於台北市市長施政滿意程度進行民調,民調結果如 下: 「滿意度為六成三,本次民調共成功訪問n位台北
市20歲以上的成年民眾,在95%的信心水準下,抽樣誤差
為正負3.2百分點。」 求n?
z0.025 = 1.96 and (1.96)
q(0.63)(1−0.63)
n = 0.032 we have n = (0.63)(0.37)(1.96)2/0.0322 = 864
The maximum error of the estimate for 98% confidence coefficient is 0.01 for ˆp = 0.08, find the n
z0.01= 2.326 and (2.326)
q(0.08)(0.92)
n = 0.01 we have n = (0.08)(0.92)(2.326)2/0.012 = 3982
40
Sample Size for proportion
某報對於台北市市長施政滿意程度進行民調,民調結果如 下: 「滿意度為六成三,本次民調共成功訪問n位台北
市20歲以上的成年民眾,在95%的信心水準下,抽樣誤差
為正負3.2百分點。」 求n?
z0.025 = 1.96 and (1.96)
q(0.63)(1−0.63)
n = 0.032 we have n = (0.63)(0.37)(1.96)2/0.0322 = 864
The maximum error of the estimate for 98% confidence coefficient is 0.01 for ˆp = 0.08, find the n
z0.01= 2.326 and (2.326)
q(0.08)(0.92)
n = 0.01 we have n = (0.08)(0.92)(2.326)2/0.012 = 3982
40
Sample Size for proportion
某報對於台北市市長施政滿意程度進行民調,民調結果如 下: 「滿意度為六成三,本次民調共成功訪問n位台北
市20歲以上的成年民眾,在95%的信心水準下,抽樣誤差
為正負3.2百分點。」 求n?
z0.025 = 1.96 and (1.96)
q(0.63)(1−0.63)
n = 0.032 we have n = (0.63)(0.37)(1.96)2/0.0322 = 864
The maximum error of the estimate for 98% confidence coefficient is 0.01 for ˆp = 0.08, find the n
z0.01= 2.326 and (2.326)
q(0.08)(0.92)
n = 0.01 we have n = (0.08)(0.92)(2.326)2/0.012 = 3982
40
Sample Size for proportion
某報對於台北市市長施政滿意程度進行民調,民調結果如 下: 「滿意度為六成三,本次民調共成功訪問n位台北
市20歲以上的成年民眾,在95%的信心水準下,抽樣誤差
為正負3.2百分點。」 求n?
z0.025 = 1.96 and (1.96)
q(0.63)(1−0.63)
n = 0.032 we have n = (0.63)(0.37)(1.96)2/0.0322 = 864
The maximum error of the estimate for 98% confidence coefficient is 0.01 for ˆp = 0.08, find the n
z0.01= 2.326 and (2.326)
q(0.08)(0.92)
n = 0.01 we have n = (0.08)(0.92)(2.326)2/0.012 = 3982
40
unknown ˆ p
For estimating p, we have p∗(1 − p∗) ≤ 1/4. Hence we need n = 2.3262/(4 ∗ 0.012) = 13530
for the maximum error of the estimate for 98% confidence coefficient is 0.01.
95% confidence coefficient for = 0.01, we have n = 9604 95% confidence coefficient for = 0.03, we have n = 1067
41
Sample Size and CIs for given ˆ p
The 95% CI for the proportion of people of supporting A when there is 51% people support A in polls of 100, 400 or 10,000 sample.
[0.41, 0.61], [0.46, 0.56], [0.50, 0.52]
[0.51 ± 0.1], [0.51 ± 0.05], [0.51 ± 0.01]
42
Sample Size for mean
100(1 − α)% CI for µ is [x ± zα/2(σ/√
n)]. Denote such interval as x ± . we sometime call = zα/2(σ/√
n) the maximum error of the estimate
n = (zα/2)2(σ)2
2 where it is assumed that σ2 is known.
43
Example
we want the 95% CIs for µ to be x ± 1 for a normal population with standard deviation σ = 15, find the sample size.
1.96 15
√n = 1 we have n ≈ 864.35 = 865.
The 80% CIs for µ is x ± 2, then we have
1.282 15
√n = 2 where z0.1 = 1.282 and thus n = 93
44
Example
we want the 95% CIs for µ to be x ± 1 for a normal population with standard deviation σ = 15, find the sample size.
1.96 15
√n = 1 we have n ≈ 864.35 = 865.
The 80% CIs for µ is x ± 2, then we have
1.282 15
√n = 2 where z0.1 = 1.282 and thus n = 93
44
Example
we want the 95% CIs for µ to be x ± 1 for a normal population with standard deviation σ = 15, find the sample size.
1.96 15
√n = 1 we have n ≈ 864.35 = 865.
The 80% CIs for µ is x ± 2, then we have
1.282 15
√n = 2 where z0.1 = 1.282 and thus n = 93
44
Pivotal quantity I
A very useful method for finding confidence intervals uses a pivotal quantity.
What is a pivotal quantity? A pivotal quantity is a function of data and the unknown parameter, say g (X, θ), and the distribution of g (X, θ) does not depend on the unknown parameter.
Example
Given X1, · · · , Xn is a random sample from a N (µ, σ2) distribution.
45