113 年 國立政治大學統計學系碩士班《統計方法》

📄 試題原卷 免費註冊後即可對照原始考卷 PDF免費註冊

第 1 題

Please answer the following short questions.
(a) Suppose a man roll a fair 6-sided die repeatedly until he sees the number 2 appear a total of five times, at which point he stops rolling. Let X be the total number of times he sees a number other than 2. What is the expectation of X? (3%)
(b) Cars pass an intersection on the road at a Poisson rate of one per minute. Suppose 5% of the cars on the road are vans. Given that 10 vans have passed by in an hour, what is the expected number of total cars to have passed by in that time? (3%)
(c) Genotypes (AA, Aa, aa) occur with probabilities (0.3, 0.4, 0.3). For n = 3 independent observations, the observed frequencies are (n1,n2,n3n_1, n_2, n_3). What probability distribution does n2n_2 alone have? (3%)
(d) Suppose we take a random sample of 400 persons and classify each one according to their gender and color preference (red, blue, green, yellow). What hypothesis shall we want to test if we are going to perform a chi-square analysis of the resulting table? (3%)

登入後即可作答並保存紀錄。

這一題的完整詳解

第 1 題

(a)

核心觀念

每次擲骰子得到「2」的機率為 p=16p=\frac16,得到「非 2」的機率為 q=56q=\frac56。

題目停止於第 5 次出現「2」,而 XX 表示在此之前或之間出現的「非 2」次數。因此,XX 服從負二項分布:

X∼NegativeBinomial⁡(r=5,p=16)X\sim \operatorname{NegativeBinomial}(r=5,p=\tfrac16)

其中負二項分布的期望為

E(X)=r1−pp.E(X)=r\frac{1-p}{p}.

解題方法

將每次出現「2」視為成功,直到累積 5 次成功為止。每兩次成功之間,非 2 的出現次數平均為

qp=5/61/6=5.\frac{q}{p} = \frac{5/6}{1/6} =5.

總共等待 5 次「2」,故

E(X)=5×5=25.E(X)=5\times 5=25.

亦可利用負二項分布公式:

E(X)=51−1616=5⋅5=25.E(X)=5\frac{1-\frac16}{\frac16} =5\cdot 5 =25.

解題技巧

負二項分布中,若「成功」機率為 pp,直到第 rr 次成功所需的「失敗」次數期望為

r1−pp.r\frac{1-p}{p}.

本題不要把 XX 誤認為「直到第 5 次擲骰所需的總次數」;XX 只計算非 2 的次數。

【答案】E(X)=25E(X)=25。


(b)

核心觀念

Poisson 過程具有「分類後仍為 Poisson 過程」的性質。總車流量為每分鐘 1 輛,因此一小時內總車數 NN 服從

N∼Poisson⁡(60).N\sim \operatorname{Poisson}(60).

每輛車為 van 的機率為 0.050.05,非 van 的機率為 0.950.95。由 Poisson thinning:

  • van 數量 V∼Poisson⁡(60×0.05)=Poisson⁡(3)V\sim\operatorname{Poisson}(60\times 0.05)=\operatorname{Poisson}(3);
  • 非 van 車數 C∼Poisson⁡(60×0.95)=Poisson⁡(57)C\sim\operatorname{Poisson}(60\times 0.95)=\operatorname{Poisson}(57);
  • VV 與 CC 相互獨立。

解題方法

已知一小時內有 10 輛 van 通過,即 V=10V=10。總車數為

N=V+C.N=V+C.

因此

E(N∣V=10)=E(V+C∣V=10).E(N\mid V=10) = E(V+C\mid V=10).

因為 VV 已知為 10,且 CC 與 VV 獨立,

E(N∣V=10)=10+E(C)=10+57=67.E(N\mid V=10) = 10+E(C) = 10+57 = 67.

解題技巧

本題的關鍵是 Poisson 分類性,而不是直接使用一般的條件期望公式。分類後,van 與非 van 的車流量彼此獨立,因此觀察到 van 數量不會改變非 van 數量的期望。

【答案】一小時內總車數的條件期望為 6767 輛。


(c)

核心觀念

n=3n=3 次獨立觀察分別落入三種基因型,機率為

(p1,p2,p3)=(0.3,0.4,0.3).(p_1,p_2,p_3)=(0.3,0.4,0.3).
🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 2 題8 分

The chart below records the actual high and low temperatures (unit: °F) for a selection of days in February from the weather report for a city.

Maximum85766360656863
Minimum70686365656160

Assuming that the variables are normally distributed, is there sufficient evidence to conclude that there is more than a 3°F difference between average highs and lows at the 0.10 level of significance? Using p-value approach. (8%)

登入後即可作答並保存紀錄。

這一題的完整詳解

這題考驗了配對樣本的 t 檢定(Paired t-test)以及 p-value 的應用。我們需要檢定平均溫差是否大於 3°F。

首先,計算每日的溫差(High - Low):
Day 1: 85−70=1585 - 70 = 15
Day 2: 76−68=876 - 68 = 8
Day 3: 63−63=063 - 63 = 0
Day 4: 60−65=−560 - 65 = -5
Day 5: 65−65=065 - 65 = 0
Day 6: 68−61=768 - 61 = 7
Day 7: 63−60=363 - 60 = 3

令 did_i 為第 ii 天的溫差,di=Maximumi−Minimumid_i = \text{Maximum}_i - \text{Minimum}_i。
我們有 7 個配對樣本,因此樣本數 n=7n=7。
計算溫差的樣本平均值 dˉ\bar{d}:
dˉ=17(15+8+0+(−5)+0+7+3)=17(28)=4\bar{d} = \frac{1}{7} (15 + 8 + 0 + (-5) + 0 + 7 + 3) = \frac{1}{7} (28) = 4。

計算溫差的樣本標準差 sds_d:
首先計算樣本變異數 sd2s_d^2:
sd2=1n−1∑i=1n(di−dˉ)2s_d^2 = \frac{1}{n-1} \sum_{i=1}^n (d_i - \bar{d})^2
sd2=17−1[(15−4)2+(8−4)2+(0−4)2+(−5−4)2+(0−4)2+(7−4)2+(3−4)2]s_d^2 = \frac{1}{7-1} [ (15-4)^2 + (8-4)^2 + (0-4)^2 + (-5-4)^2 + (0-4)^2 + (7-4)^2 + (3-4)^2 ]
sd2=16[112+42+(−4)2+(−9)2+(−4)2+32+(−1)2]s_d^2 = \frac{1}{6} [ 11^2 + 4^2 + (-4)^2 + (-9)^2 + (-4)^2 + 3^2 + (-1)^2 ]
sd2=16[121+16+16+81+16+9+1]s_d^2 = \frac{1}{6} [ 121 + 16 + 16 + 81 + 16 + 9 + 1 ]
sd2=16[260]=1303≈43.33s_d^2 = \frac{1}{6} [ 260 ] = \frac{130}{3} \approx 43.33。
樣本標準差 sd=1303≈43.33≈6.583s_d = \sqrt{\frac{130}{3}} \approx \sqrt{43.33} \approx 6.583。

設定虛無假設 H0H_0 和對立假設 H1H_1:
我們想檢定平均溫差是否「大於」3°F。
H0:μd≤3H_0: \mu_d \le 3 (平均溫差不大於 3°F)
H1:μd>3H_1: \mu_d > 3 (平均溫差大於 3°F)
其中 μd\mu_d 是總體平均溫差。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 3 題12 分

A medical research worker wants to study how male and female rats react the injection of a certain toxic substance. Suppose that 50 of 100 male rats and 160 of 400 female rats reacted strongly to the injection.
(a) Calculate the test statistics for testing the difference between the true percentages of male and female rats which react strongly to the injection. (4%)
(b) If analyzing the data like a 2×2 table, what test would you use for testing the difference? Also, state the hypotheses. (4%)
(c) For the test in part (b), can you calculate the associated test statistics based on the result of part (a)? If yes, calculate the value of the test statistics; otherwise, explain your answer. (4%)

登入後即可作答並保存紀錄。

這一題的完整詳解

這題考驗了兩個比例的比較檢定,涉及樣本比例的計算、Z 檢定統計量、卡方檢定以及兩者之間的關係。

(a) 計算檢定兩個獨立樣本比例差的 Z 檢定統計量。
設 p1p_1 為雄性老鼠對注射產生強烈反應的真實比例,p2p_2 為雌性老鼠對注射產生強烈反應的真實比例。
樣本數據:
雄性老鼠:樣本數 n1=100n_1 = 100,反應數 x1=50x_1 = 50。
雌性老鼠:樣本數 n2=400n_2 = 400,反應數 x2=160x_2 = 160。

樣本比例:
p^1=x1/n1=50/100=0.50\hat{p}_1 = x_1 / n_1 = 50 / 100 = 0.50
p^2=x2/n2=160/400=0.40\hat{p}_2 = x_2 / n_2 = 160 / 400 = 0.40

虛無假設 H0:p1=p2H_0: p_1 = p_2 (兩組真實比例相等)。
對立假設 H1:p1≠p2H_1: p_1 \neq p_2 (兩組真實比例不相等)。

在虛無假設下,我們使用合併樣本比例 p^\hat{p} 作為共同的真實比例估計:
p^=x1+x2n1+n2=50+160100+400=210500=0.42\hat{p} = \frac{x_1 + x_2}{n_1 + n_2} = \frac{50 + 160}{100 + 400} = \frac{210}{500} = 0.42。

合併樣本比例的標準誤(Standard Error of the Difference in Proportions):
SE(p^1−p^2)=p^(1−p^)(1n1+1n2)SE(\hat{p}_1 - \hat{p}_2) = \sqrt{\hat{p}(1-\hat{p})(\frac{1}{n_1} + \frac{1}{n_2})}
SE(p^1−p^2)=0.42(1−0.42)(1100+1400)SE(\hat{p}_1 - \hat{p}_2) = \sqrt{0.42(1-0.42)(\frac{1}{100} + \frac{1}{400})}
SE(p^1−p^2)=0.42×0.58×(4400+1400)SE(\hat{p}_1 - \hat{p}_2) = \sqrt{0.42 \times 0.58 \times (\frac{4}{400} + \frac{1}{400})}
SE(p^1−p^2)=0.2436×5400=0.2436×0.0125SE(\hat{p}_1 - \hat{p}_2) = \sqrt{0.2436 \times \frac{5}{400}} = \sqrt{0.2436 \times 0.0125}
SE(p^1−p^2)=0.003045≈0.05518SE(\hat{p}_1 - \hat{p}_2) = \sqrt{0.003045} \approx 0.05518。

Z 檢定統計量:
Z=p^1−p^2SE(p^1−p^2)Z = \frac{\hat{p}_1 - \hat{p}_2}{SE(\hat{p}_1 - \hat{p}_2)}

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 4 題12 分

A national council wishes to estimate the unemployment rate (π) in Taipei city. A random sample of n persons is selected from the labor force. Let X be the number of unemployed persons in the sample.
(a) How large a sample is necessary if the council wishes to be 95% certain that the error of estimation is within 3 percentage point when the true unemployment rate is between 0.2 and 0.4? (4%)
(b) If n=100 and π = 0.01, can you approximate the probability that at least one unemployed persons are in the sample? If yes, calculate the value; otherwise, explain your answer. (4%)
(c) Consider the hypothesis testing with H0:π=1/3H_0: \pi = 1/3 versus Ha:π=1/2H_a: \pi = 1/2. Suppose that the rejection region for this test is X≥kX \ge k. If n=5n = 5 and k=4k = 4, calculate the probability of Type II error. (4%)

登入後即可作答並保存紀錄。

這一題的完整詳解

這題考驗了樣本大小的決定、二項分佈的近似(泊松或常態)以及第一類和第二類錯誤的計算。

(a) 計算所需樣本大小以確保估計誤差在一定範圍內。
我們要估計失業率 π\pi。
要求 95% 的信心水準,使得估計誤差(Margin of Error, MOE)在 3 個百分點(0.03)以內。
即 ∣π^−π∣≤0.03| \hat{\pi} - \pi | \le 0.03。
對於比例的估計,樣本大小的公式通常是:n=Zα/22p^(1−p^)MOE2n = \frac{Z_{\alpha/2}^2 \hat{p}(1-\hat{p})}{MOE^2}。
其中 Zα/2Z_{\alpha/2} 是對應於信心水準的 Z 值。對於 95% 的信心水準,α=0.05\alpha = 0.05,α/2=0.025\alpha/2 = 0.025,所以 Z0.025=1.96Z_{0.025} = 1.96。
MOE=0.03MOE = 0.03。

問題中給定了真實失業率 π\pi 的範圍是 0.2 到 0.4。為了確保樣本大小足夠,我們應該使用最保守的估計,也就是使 p^(1−p^)\hat{p}(1-\hat{p}) 最大的值。
p^(1−p^)\hat{p}(1-\hat{p}) 在 p^=0.5\hat{p} = 0.5 時最大。
然而,題目給了 π\pi 的範圍 (0.2, 0.4)。我們應該使用這個範圍內最保守的 p^\hat{p} 值來計算樣本大小,以確保在該範圍內都能滿足條件。
在區間 [0.2, 0.4] 內,f(π)=π(1−π)f(\pi) = \pi(1-\pi) 的最大值出現在 π=0.4\pi=0.4 或 π=0.2\pi=0.2 的邊界,取較大的值。
若 π=0.2\pi=0.2, p^(1−p^)=0.2(0.8)=0.16\hat{p}(1-\hat{p}) = 0.2(0.8) = 0.16。
若 π=0.4\pi=0.4, p^(1−p^)=0.4(0.6)=0.24\hat{p}(1-\hat{p}) = 0.4(0.6) = 0.24。
所以,我們應該使用 p^=0.4\hat{p} = 0.4 來計算樣本大小,以確保在給定的範圍內都能滿足要求。

n=(1.96)2×0.4×(1−0.4)(0.03)2n = \frac{(1.96)^2 \times 0.4 \times (1-0.4)}{(0.03)^2}
n=3.8416×0.4×0.60.0009n = \frac{3.8416 \times 0.4 \times 0.6}{0.0009}
n=3.8416×0.240.0009n = \frac{3.8416 \times 0.24}{0.0009}
n=0.9219840.0009≈1024.426n = \frac{0.921984}{0.0009} \approx 1024.426。

由於樣本大小必須是整數,且我們需要確保誤差「在」3 個百分點內,所以需要向上取整。
n=1025n = 1025。

【答案】1025

(b) 近似計算至少有一個失業者的機率。
已知樣本大小 n=100n=100,真實失業率 π=0.01\pi = 0.01。
XX 是樣本中的失業人數,服從二項分佈 X∼Binomial(n=100,π=0.01)X \sim Binomial(n=100, \pi=0.01)。
我們要求 P(X≥1)P(X \ge 1)。
這等於 1−P(X=0)1 - P(X=0)。
直接計算二項分佈的 P(X=0)P(X=0):
P(X=0)=(1000)(0.01)0(1−0.01)100−0=1×1×(0.99)100P(X=0) = \binom{100}{0} (0.01)^0 (1-0.01)^{100-0} = 1 \times 1 \times (0.99)^{100}。
計算 (0.99)100(0.99)^{100}:
(0.99)100≈0.36603(0.99)^{100} \approx 0.36603。

所以,P(X≥1)=1−P(X=0)≈1−0.36603=0.63397P(X \ge 1) = 1 - P(X=0) \approx 1 - 0.36603 = 0.63397。

由於 nn 很大 (100) 且 π\pi 很小 (0.01),我們可以考慮使用泊松分佈進行近似。
泊松分佈的參數 λ=nπ=100×0.01=1\lambda = n\pi = 100 \times 0.01 = 1。
設 Y∼Poisson(λ=1)Y \sim Poisson(\lambda=1)。
P(Y≥1)=1−P(Y=0)P(Y \ge 1) = 1 - P(Y=0)。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 4(d) 題8 分

Refer to part (c). Using the Central Limit Theorem, find n and k such that the probability of Type I error is 0.05 and the probability of Type II error is 0.1. (8%)

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念

本題利用中央極限定理(Central Limit Theorem, CLT)近似樣本平均數的分配,並同時控制:

  • 第一類錯誤:P(拒絕 H0∣H0 為真)=0.05P(\text{拒絕 }H_0\mid H_0\text{ 為真})=0.05
  • 第二類錯誤:P(不拒絕 H0∣H1 為真)=0.10P(\text{不拒絕 }H_0\mid H_1\text{ 為真})=0.10

由於題目未附上第 (c)(c) 題的假設、母體平均數與變異數,以下依第 (c)(c) 題為單尾檢定

H0:μ=μ0,H1:μ=μ1,μ1>μ0H_0:\mu=\mu_0,\qquad H_1:\mu=\mu_1,\quad \mu_1>\mu_0

且拒絕域為 Xˉ≥k\bar X\ge k、母體標準差為已知的 σ\sigma 進行推導。


解題方法

設 X1,…,XnX_1,\ldots,X_n 為隨機樣本,則

Xˉ=1n∑i=1nXi.\bar X=\frac{1}{n}\sum_{i=1}^nX_i.

依中央極限定理,

Xˉ∼˙N(μ,σ2n).\bar X\mathrel{\dot\sim}N\left(\mu,\frac{\sigma^2}{n}\right).

其中 Xˉ\bar X 的標準誤為

SE⁡(Xˉ)=σn.\operatorname{SE}(\bar X)=\frac{\sigma}{\sqrt n}.

1. 控制第一類錯誤率

當 H0H_0 為真時,μ=μ0\mu=\mu_0,因此

Xˉ∼˙N(μ0,σ2n).\bar X\mathrel{\dot\sim}N\left(\mu_0,\frac{\sigma^2}{n}\right).

第一類錯誤率為

Pμ0(Xˉ≥k)=0.05.P_{\mu_0}(\bar X\ge k)=0.05.

標準化得

P(Z≥k−μ0σ/n)=0.05.P\left( Z\ge \frac{k-\mu_0}{\sigma/\sqrt n} \right)=0.05.

因為 z0.95=1.645z_{0.95}=1.645,所以

k−μ0σ/n=1.645.\frac{k-\mu_0}{\sigma/\sqrt n}=1.645.

因此臨界值 kk 必須滿足

k=μ0+1.645σn.(1)k=\mu_0+1.645\frac{\sigma}{\sqrt n}. \tag{1}

2. 控制第二類錯誤率

當 H1H_1 為真時,μ=μ1\mu=\mu_1。第二類錯誤是未能拒絕 H0H_0,故

Pμ1(Xˉ<k)=0.10.P_{\mu_1}(\bar X<k)=0.10.

標準化得

P(Z<k−μ1σ/n)=0.10.P\left( Z<\frac{k-\mu_1}{\sigma/\sqrt n} \right)=0.10.

因為 z0.10=−1.282z_{0.10}=-1.282,所以

k−μ1σ/n=−1.282.\frac{k-\mu_1}{\sigma/\sqrt n}=-1.282.

因此

k=μ1−1.282σn.(2)k=\mu_1-1.282\frac{\sigma}{\sqrt n}. \tag{2}

3. 解出樣本數 nn

將式 (1)(1) 與式 (2)(2) 相等:

μ0+1.645σn=μ1−1.282σn.\mu_0+1.645\frac{\sigma}{\sqrt n} = \mu_1-1.282\frac{\sigma}{\sqrt n}.

整理得

μ1−μ0=(1.645+1.282)σn.\mu_1-\mu_0 = (1.645+1.282)\frac{\sigma}{\sqrt n}.

因此

n=(1.645+1.282)σμ1−μ0,\sqrt n = \frac{(1.645+1.282)\sigma}{\mu_1-\mu_0},

故

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 5 題8 分

The following table is the distribution of the number of bears spotted on 60 sightseeing tours in a national park. (Hint: e-0.5 = 0.607, e-0.65 = 0.522, e-0.75 = 0.472)

Number of tours0123
Number of bears321594

Test whether the data come from a Poisson distribution using a 1% significance level. (8%)

登入後即可作答並保存紀錄。

這一題的完整詳解

這題考驗了卡方適合度檢定(Chi-Square Goodness-of-Fit Test)在檢定數據是否符合泊松分佈時的應用。

首先,我們需要計算泊松分佈的參數 λ\lambda。
泊松分佈的平均值等於其變異數,也等於其參數 λ\lambda。
我們使用樣本數據來估計 λ\lambda。
樣本總數為 60 次觀光旅遊。
觀察到的頻率:
f0=32f_0 = 32 (看到 0 隻熊)
f1=15f_1 = 15 (看到 1 隻熊)
f2=9f_2 = 9 (看到 2 隻熊)
f3=4f_3 = 4 (看到 3 隻熊)
總觀察數 N=32+15+9+4=60N = 32 + 15 + 9 + 4 = 60。

估計 λ\lambda:
λ^=∑(number of bears)×(frequency)∑(frequency)\hat{\lambda} = \frac{\sum (\text{number of bears}) \times (\text{frequency})}{\sum (\text{frequency})}
λ^=(0×32)+(1×15)+(2×9)+(3×4)60\hat{\lambda} = \frac{(0 \times 32) + (1 \times 15) + (2 \times 9) + (3 \times 4)}{60}
λ^=0+15+18+1260=4560=0.75\hat{\lambda} = \frac{0 + 15 + 18 + 12}{60} = \frac{45}{60} = 0.75。

現在,我們需要計算在 λ^=0.75\hat{\lambda} = 0.75 的泊松分佈下,對應於各個觀察值的期望頻率 EiE_i。
泊松機率函數為 P(X=x)=e−λλxx!P(X=x) = \frac{e^{-\lambda} \lambda^x}{x!}。
期望頻率 Ei=N×P(X=xi)E_i = N \times P(X=x_i)。

對於 x=0x=0: P(X=0)=e−0.75(0.75)00!=e−0.75×1=e−0.75P(X=0) = \frac{e^{-0.75} (0.75)^0}{0!} = e^{-0.75} \times 1 = e^{-0.75}。
題目給定 e−0.75=0.472e^{-0.75} = 0.472。
E0=60×0.472=28.32E_0 = 60 \times 0.472 = 28.32。

對於 x=1x=1: P(X=1)=e−0.75(0.75)11!=e−0.75×0.75=0.472×0.75=0.354P(X=1) = \frac{e^{-0.75} (0.75)^1}{1!} = e^{-0.75} \times 0.75 = 0.472 \times 0.75 = 0.354。
E1=60×0.354=21.24E_1 = 60 \times 0.354 = 21.24。

對於 x=2x=2: P(X=2)=e−0.75(0.75)22!=e−0.75×0.56252=0.472×0.28125=0.13265625P(X=2) = \frac{e^{-0.75} (0.75)^2}{2!} = e^{-0.75} \times \frac{0.5625}{2} = 0.472 \times 0.28125 = 0.13265625。
E2=60×0.13265625=7.959375≈7.96E_2 = 60 \times 0.13265625 = 7.959375 \approx 7.96。

對於 x=3x=3: P(X=3)=e−0.75(0.75)33!=e−0.75×0.4218756=0.472×0.0703125=0.033171875P(X=3) = \frac{e^{-0.75} (0.75)^3}{3!} = e^{-0.75} \times \frac{0.421875}{6} = 0.472 \times 0.0703125 = 0.033171875。
E3=60×0.033171875=1.9903125≈1.99E_3 = 60 \times 0.033171875 = 1.9903125 \approx 1.99。

我們發現,E3E_3 非常小(約 1.99)。在卡方檢定中,通常要求期望頻率 Ei≥5E_i \ge 5。
由於 E3E_3 小於 5,我們需要合併最後幾個類別。
我們將 x=3x=3 和所有大於 3 的類別合併。
合併後的類別是 x≥3x \ge 3。
合併後的觀察頻率:
f0=32f_{0} = 32
f1=15f_{1} = 15
f2=9f_{2} = 9
f≥3=4f_{\ge 3} = 4 (原本是 f3=4f_3=4)

合併後的期望頻率:
E0=28.32E_0 = 28.32
E1=21.24E_1 = 21.24
E2=7.96E_2 = 7.96
E≥3=E3+E4+…E_{\ge 3} = E_3 + E_4 + \dots
E≥3=60×P(X≥3∣λ=0.75)=60×(1−P(X=0)−P(X=1)−P(X=2))E_{\ge 3} = 60 \times P(X \ge 3 | \lambda=0.75) = 60 \times (1 - P(X=0) - P(X=1) - P(X=2))
E≥3=60×(1−0.472−0.354−0.13265625)E_{\ge 3} = 60 \times (1 - 0.472 - 0.354 - 0.13265625)

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 6 題24 分

Suppose that a scientist has a bivariate dataset with n = 5 subjects, and suppose the sample variance of Y1, Y2,..., Yn is 2.5, the sample variance of X1, X2, ..., Xn is 2.5, x = 3, and the sample correlation coefficient is 0.9. A simple linear regression Y = β₀ + β₁X + ε with ε ~ N(0, σ²) is fit using computer software. However unfortunately a large portion of the computer outputs is missing and the scientist only has the following estimate left: Σyᵢ = 25.
(a) Fill in the entries (1) - (6) for the following table of coefficients. (6%)
(b) Test whether there is a linear association between the variables using F test with α = 0.05. (8%)
(c) Construct a 95% confidence interval for the slope. Based on this interval, would the scientist reject that β₁ = 1 at the 5% significance level? (8%)
(d) Suppose the scientist compute three confidence intervals for an individual value of Y when X = 1, X = 2, and X = 4. Which of the three confidence intervals gives the most precise prediction? Explain your answer. (4%)

登入後即可作答並保存紀錄。

這一題的完整詳解

這題考驗了簡單線性迴歸的相關概念,包括迴歸係數估計、標準誤、t 檢定、F 檢定、信賴區間以及預測區間。

已知資訊:
樣本數 n=5n = 5。
YY 的樣本變異數 sY2=2.5s_Y^2 = 2.5。
XX 的樣本變異數 sX2=2.5s_X^2 = 2.5。
XX 的樣本平均值 xˉ=3\bar{x} = 3。
樣本相關係數 r=0.9r = 0.9。
∑yi=25\sum y_i = 25。
迴歸模型:Y=β0+β1X+ϵY = \beta_0 + \beta_1 X + \epsilon,其中 ϵ∼N(0,σ2)\epsilon \sim N(0, \sigma^2)。

首先,我們需要計算一些基本量:
YY 的樣本平均值 yˉ=∑yin=255=5\bar{y} = \frac{\sum y_i}{n} = \frac{25}{5} = 5。
XX 的樣本標準差 sX=sX2=2.5s_X = \sqrt{s_X^2} = \sqrt{2.5}。
YY 的樣本標準差 sY=sY2=2.5s_Y = \sqrt{s_Y^2} = \sqrt{2.5}。

迴歸係數的估計:
斜率 β^1=rsYsX=0.9×2.52.5=0.9\hat{\beta}_1 = r \frac{s_Y}{s_X} = 0.9 \times \frac{\sqrt{2.5}}{\sqrt{2.5}} = 0.9。
截距 β^0=yˉ−β^1xˉ=5−(0.9)(3)=5−2.7=2.3\hat{\beta}_0 = \bar{y} - \hat{\beta}_1 \bar{x} = 5 - (0.9)(3) = 5 - 2.7 = 2.3。

殘差平方和 SSESSE (Sum of Squared Errors):
SSE=∑(yi−y^i)2=∑ei2SSE = \sum (y_i - \hat{y}_i)^2 = \sum e_i^2。
我們知道 r2=SSRSST=1−SSESSTr^2 = \frac{SSR}{SST} = 1 - \frac{SSE}{SST}。
SST=∑(yi−yˉ)2=(n−1)sY2=(5−1)×2.5=4×2.5=10SST = \sum (y_i - \bar{y})^2 = (n-1) s_Y^2 = (5-1) \times 2.5 = 4 \times 2.5 = 10。
r2=(0.9)2=0.81r^2 = (0.9)^2 = 0.81。
0.81=1−SSE10  ⟹  SSE10=1−0.81=0.19  ⟹  SSE=0.19×10=1.90.81 = 1 - \frac{SSE}{10} \implies \frac{SSE}{10} = 1 - 0.81 = 0.19 \implies SSE = 0.19 \times 10 = 1.9。

估計的誤差變異數 σ^2=se2=SSEn−2=1.95−2=1.93≈0.6333\hat{\sigma}^2 = s_e^2 = \frac{SSE}{n-2} = \frac{1.9}{5-2} = \frac{1.9}{3} \approx 0.6333。

(a) 填充係數表格:
表格包含:Coefficient (Intercept, X), Estimate, Std. Error, t value。
Estimate:
(1) Intercept (β^0\hat{\beta}_0): 2.3
(4) X (β^1\hat{\beta}_1): 0.9

Std. Error:
標準誤是迴歸係數估計量的標準差。
斜率 β^1\hat{\beta}_1 的標準誤:SE(β^1)=σ^2∑(xi−xˉ)2SE(\hat{\beta}_1) = \sqrt{\frac{\hat{\sigma}^2}{\sum (x_i - \bar{x})^2}}。
∑(xi−xˉ)2=(n−1)sX2=(5−1)×2.5=4×2.5=10\sum (x_i - \bar{x})^2 = (n-1) s_X^2 = (5-1) \times 2.5 = 4 \times 2.5 = 10。
SE(β^1)=1.9/310=1.930≈0.06333≈0.2517SE(\hat{\beta}_1) = \sqrt{\frac{1.9/3}{10}} = \sqrt{\frac{1.9}{30}} \approx \sqrt{0.06333} \approx 0.2517。
(5) X Std. Error: 0.2517

截距 β^0\hat{\beta}_0 的標準誤:SE(β^0)=σ^2(1n+xˉ2∑(xi−xˉ)2)SE(\hat{\beta}_0) = \sqrt{\hat{\sigma}^2 (\frac{1}{n} + \frac{\bar{x}^2}{\sum (x_i - \bar{x})^2})}。
SE(β^0)=1.93(15+3210)=1.93(15+910)=1.93(2+910)=1.93×1110=1.9×1.13=2.093≈0.6967≈0.8347SE(\hat{\beta}_0) = \sqrt{\frac{1.9}{3} (\frac{1}{5} + \frac{3^2}{10})} = \sqrt{\frac{1.9}{3} (\frac{1}{5} + \frac{9}{10})} = \sqrt{\frac{1.9}{3} (\frac{2+9}{10})} = \sqrt{\frac{1.9}{3} \times \frac{11}{10}} = \sqrt{\frac{1.9 \times 1.1}{3}} = \sqrt{\frac{2.09}{3}} \approx \sqrt{0.6967} \approx 0.8347。
(2) Intercept Std. Error: 0.8347

t value:
tt 值是估計量除以其標準誤。
tt value for β^0\hat{\beta}_0: β^0SE(β^0)=2.30.8347≈2.755\frac{\hat{\beta}_0}{SE(\hat{\beta}_0)} = \frac{2.3}{0.8347} \approx 2.755。
(3) Intercept t value: 2.755
tt value for β^1\hat{\beta}_1: β^1SE(β^1)=0.90.2517≈3.575\frac{\hat{\beta}_1}{SE(\hat{\beta}_1)} = \frac{0.9}{0.2517} \approx 3.575。
(6) X t value: 3.575

填充表格:

CoefficientEstimateStd. Errort value
Intercept2.3 (1)0.8347 (2)2.755 (3)
X0.9 (4)0.2517 (5)3.575 (6)

【答案】
(1) 2.3
(2) 0.8347
(3) 2.755
(4) 0.9
(5) 0.2517
(6) 3.575

(b) 使用 F 檢定檢定變數之間是否存在線性關聯。
F 檢定用於檢定迴歸模型是否顯著,即檢定斜率 β1\beta_1 是否等於 0。
H0:β1=0H_0: \beta_1 = 0 (沒有線性關聯)
H1:β1≠0H_1: \beta_1 \neq 0 (存在線性關聯)
F 檢定的統計量是 F=MSRMSEF = \frac{MSR}{MSE},其中 MSR=SSRdfRMSR = \frac{SSR}{df_R},MSE=SSEdfEMSE = \frac{SSE}{df_E}。
SSR=SST−SSE=10−1.9=8.1SSR = SST - SSE = 10 - 1.9 = 8.1。
dfR=1df_R = 1 (迴歸的自由度)。
SSE=1.9SSE = 1.9。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 7 題14 分

An experiment is conducted and the resulting data is provided.

Treatment1234
6544
8556
7656

(a) Assuming that the data are generated from a randomized block experiment, fill in the entries (1) - (10) in the partially completed ANOVA table given below. (10%)
(b) Assuming now that the experimental data are generated from a one-way (independent samples) experiment, calculate the F test statistics to determine whether the treatment means differ at the 5% significance level. (4%)

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念

本題評量變異數分析(ANOVA)之兩種基本實驗設計架構與其平方和分割原理:

  1. 隨機完全區集設計(Randomized Block Design, RBD):

    • 資料包含兩個因子:處理(Treatment, 欄)與區集(Block, 列)。
    • 總平方和(SSTSST)分解為三部分:處理平方和(SSTRSSTR)、區集平方和(SSBLSSBL)與隨機誤差平方和(SSESSE)。
    SST=SSTR+SSBL+SSESST = SSTR + SSBL + SSE
    • 自由度分割:
      • 總自由度:dfT=n−1=bk−1df_T = n - 1 = bk - 1
      • 處理自由度:dfTR=k−1df_{TR} = k - 1
      • 區集自由度:dfBL=b−1df_{BL} = b - 1
      • 誤差自由度:dfE=(k−1)(b−1)df_E = (k - 1)(b - 1)
        其中 kk 為處理數(欄數),bb 為區集數(列數)。
    • 檢定處理效果之檢定統計量:
    F=MSTRMSE=SSTR/(k−1)SSE/((k−1)(b−1))∼F(k−1,(k−1)(b−1))F = \frac{MSTR}{MSE} = \frac{SSTR / (k - 1)}{SSE / ((k - 1)(b - 1))} \sim F(k - 1, (k - 1)(b - 1))
  2. 單因子完全隨機設計(One-Way Completely Randomized Design, CRD):

    • 視為 kk 組獨立樣本,不考慮區集控制。
    • 總平方和分解為兩部分:處理平方和(SSTRSSTR)與組內誤差平方和(SSECRDSSE_{\text{CRD}})。
    • 其誤差平方和本質上即為 RBD 中的區集平方和與誤差平方和之和:
    SSECRD=SSBL+SSERBDSSE_{\text{CRD}} = SSBL + SSE_{\text{RBD}}
    • 自由度:dfE,CRD=n−k=(b−1)+(k−1)(b−1)=k(b−1)df_{E,\text{CRD}} = n - k = (b - 1) + (k - 1)(b - 1) = k(b - 1)。
    • 檢定統計量:
    F=MSTRMSECRD=SSTR/(k−1)SSECRD/(n−k)∼F(k−1,n−k)F = \frac{MSTR}{MSE_{\text{CRD}}} = \frac{SSTR / (k - 1)}{SSE_{\text{CRD}} / (n - k)} \sim F(k - 1, n - k)

解題方法

一、原始數據整理

設區集數(列數)b=3b = 3,處理數(欄數)k=4k = 4,總觀測值個數 n=bk=12n = bk = 12。

數據矩陣如下(列表示 Block,行表示 Treatment):

  • Block 1: 6,5,4,46, 5, 4, 4(列和 B1=19B_1 = 19)
  • Block 2: 8,5,5,68, 5, 5, 6(列和 B2=24B_2 = 24)
  • Block 3: 7,6,5,67, 6, 5, 6(列和 B3=24B_3 = 24)

各處理的行和(TjT_j):

  • Treatment 1: T1=6+8+7=21T_1 = 6 + 8 + 7 = 21
  • Treatment 2: T2=5+5+6=16T_2 = 5 + 5 + 6 = 16
  • Treatment 3: T3=4+5+5=14T_3 = 4 + 5 + 5 = 14
  • Treatment 4: T4=4+6+6=16T_4 = 4 + 6 + 6 = 16

全體總和:

G=∑i=13∑j=14Xij=21+16+14+16=67G = \sum_{i=1}^3 \sum_{j=1}^4 X_{ij} = 21 + 16 + 14 + 16 = 67

校正項(Correction Factor, CFCF):

CF=G2n=67212=448912≈374.0833CF = \frac{G^2}{n} = \frac{67^2}{12} = \frac{4489}{12} \approx 374.0833

各觀測值平方和:

∑i=13∑j=14Xij2=(36+25+16+16)+(64+25+25+36)+(49+36+25+36)=93+150+146=389\sum_{i=1}^3 \sum_{j=1}^4 X_{ij}^2 = (36 + 25 + 16 + 16) + (64 + 25 + 25 + 36) + (49 + 36 + 25 + 36) = 93 + 150 + 146 = 389

二、各項平方和(Sum of Squares)計算

  1. 總平方和(SSTSST):

    SST=∑∑Xij2−CF=389−448912=4668−448912=17912≈14.9167SST = \sum \sum X_{ij}^2 - CF = 389 - \frac{4489}{12} = \frac{4668 - 4489}{12} = \frac{179}{12} \approx 14.9167
  2. 處理平方和(SSTRSSTR):

    SSTR=∑j=14Tj2b−CF=212+162+142+1623−448912=441+256+196+2563−448912=11493−448912=383−374.0833=8.9167(=10712)SSTR = \sum_{j=1}^4 \frac{T_j^2}{b} - CF = \frac{21^2 + 16^2 + 14^2 + 16^2}{3} - \frac{4489}{12} = \frac{441 + 256 + 196 + 256}{3} - \frac{4489}{12} = \frac{1149}{3} - \frac{4489}{12} = 383 - 374.0833 = 8.9167 \quad \left(=\frac{107}{12}\right)
  3. 區集平方和(SSBLSSBL):

    SSBL=∑i=13Bi2k−CF=192+242+2424−448912=361+576+5764−448912=15134−448912=4539−448912=5012≈4.1667SSBL = \sum_{i=1}^3 \frac{B_i^2}{k} - CF = \frac{19^2 + 24^2 + 24^2}{4} - \frac{4489}{12} = \frac{361 + 576 + 576}{4} - \frac{4489}{12} = \frac{1513}{4} - \frac{4489}{12} = \frac{4539 - 4489}{12} = \frac{50}{12} \approx 4.1667
  4. 隨機誤差平方和(SSESSE):

    SSE=SST−SSTR−SSBL=17912−10712−5012=2212=116≈1.8333SSE = SST - SSTR - SSBL = \frac{179}{12} - \frac{107}{12} - \frac{50}{12} = \frac{22}{12} = \frac{11}{6} \approx 1.8333

三、題分子題推導與解答

(a) 隨機區集設計 ANOVA 表填空

標準隨機區集設計之 ANOVA 表對應格位通常依序包含:

  • 自由度:dfdf
  • 平方和:SSSS
  • 均方:MS=SS/dfMS = SS / df
  • 統計量:F=MS/MSEF = MS / MSE

對應題目表格(1)至(10)項之數值填列如下:

  • Treatment 列:
    • 自由度:dfTR=k−1=4−1=3df_{TR} = k - 1 = 4 - 1 = 3
    • 平方和:SSTR=10712≈8.917SSTR = \frac{107}{12} \approx 8.917
    • 均方:MSTR=SSTRdfTR=107/123=10736≈2.972MSTR = \frac{SSTR}{df_{TR}} = \frac{107 / 12}{3} = \frac{107}{36} \approx 2.972
    • 檢定統計量:FTR=MSTRMSE=107/3611/36=10711≈9.727F_{TR} = \frac{MSTR}{MSE} = \frac{107 / 36}{11 / 36} = \frac{107}{11} \approx 9.727
🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

其他考古題