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

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

第 1 題10 分

Suppose you are taking a multiple-choice test with mm choices for each question. In answering a question on this test, the probability that you know the answer is pp. If you don't know the answer, you choose one at random. What is the probability that you knew the answer to a question, given that you answered it correctly?

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

這一題的完整詳解

此題考驗貝氏定理的應用。我們希望計算在答對題目的條件下,該題是「已知答案」的機率。
設:
A:答對題目
K:知道答案

已知條件:

  1. 題目有 mm 個選項。
  2. 知道答案的機率為 P(K)=pP(K) = p。
  3. 不知道答案的機率為 P(Kc)=1−pP(K^c) = 1-p。
  4. 如果知道答案,則一定答對,即 P(A∣K)=1P(A|K) = 1。
  5. 如果不知道答案,則隨機猜測一個選項,答對的機率為 1m\frac{1}{m},即 P(A∣Kc)=1mP(A|K^c) = \frac{1}{m}。

我們要求的是 P(K∣A)P(K|A)。
根據貝氏定理:
P(K∣A)=P(A∣K)P(K)P(A)P(K|A) = \frac{P(A|K) P(K)}{P(A)}
我們需要計算 P(A)P(A),總機率公式:

🔒

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

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

免費註冊

第 2 題15 分

Suppose that buses arrive are scheduled to arrive at a bus stop at 8:00 but are always YY minutes late, where YY is an exponential random variable with parameter θ\theta. Suppose that you arrive at the bus stop precisely at 8:00.
(Note: e1=2.718e^1 = 2.718)
(a) If you have already waiting for five minutes, compute the probability that you have to wait an additional five minutes or more. (7%)
(b) Compute the median for the parameter θ\theta of the exponential distribution. (8%)

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

這一題的完整詳解

核心觀念

設公車遲到時間為

Y∼Exponential⁡(θ),Y\sim \operatorname{Exponential}(\theta),

並採用統計學最常見的「速率參數」定義:

fY(y)=θe−θy,y≥0.f_Y(y)=\theta e^{-\theta y},\quad y\ge 0.

其生存函數為

P(Y≥y)=e−θy.P(Y\ge y)=e^{-\theta y}.

本題主要考查:

  1. 指數分配的生存函數。
  2. 指數分配的無記憶性。
  3. 中位數的定義。

(a)已等待五分鐘後,再等五分鐘以上的機率

公車遲到時間為 YY。已經等待五分鐘,表示目前已知:

Y≥5.Y\ge 5.

再等待五分鐘以上,表示公車總共至少遲到十分钟,即:

Y≥10.Y\ge 10.

因此所求為條件機率:

P(Y≥10∣Y≥5).P(Y\ge 10\mid Y\ge 5).

利用條件機率公式:

P(Y≥10∣Y≥5)=P(Y≥10)P(Y≥5).P(Y\ge 10\mid Y\ge 5) = \frac{P(Y\ge 10)}{P(Y\ge 5)}.

由指數分配的生存函數:

P(Y≥10)=e−10θ,P(Y≥5)=e−5θ.P(Y\ge 10)=e^{-10\theta}, \qquad P(Y\ge 5)=e^{-5\theta}.

所以

P(Y≥10∣Y≥5)=e−10θe−5θ=e−5θ.P(Y\ge 10\mid Y\ge 5) = \frac{e^{-10\theta}}{e^{-5\theta}} = e^{-5\theta}.

這也可直接由指數分配的無記憶性得到:

P(Y>s+t∣Y>s)=P(Y>t).P(Y>s+t\mid Y>s)=P(Y>t).

令 s=5s=5、t=5t=5,即得

P(Y≥10∣Y≥5)=P(Y≥5)=e−5θ.P(Y\ge 10\mid Y\ge 5)=P(Y\ge 5)=e^{-5\theta}.

(b)指數分配的中位數

設中位數為 mm。中位數的定義是:

P(Y≤m)=12.P(Y\le m)=\frac12.
🔒

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

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

免費註冊

第 3 題25 分

You independently draw 23 data points from a normal distribution. The 23 data points have sample mean 4.1 and sample variance 4.
(a) Please conduct a test with the null hypothesis H0:μ=3.2H_0: \mu = 3.2 against the alternative hypothesis H1:μ≠3.2H_1: \mu \neq 3.2 at a significance level of α=0.05\alpha = 0.05. (8%)
(b) What is the p-value for part (a)? (7%)
(c) Determine the probability of committing the test using the alternative H1:μ=3.3H_1: \mu = 3.3. (10%)

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

這一題的完整詳解

核心觀念

本題為「母體平均數的單一樣本 tt 檢定」:

  • 母體為常態分布;
  • 母體變異數未知;
  • 樣本數 n=23n=23;
  • 使用樣本變異數 s2=4s^2=4,故 s=2s=2;
  • 檢定自由度為 n−1=22n-1=22。

檢定統計量為

T=Xˉ−μ0S/nT=\frac{\bar X-\mu_0}{S/\sqrt n}

在虛無假設 H0:μ=μ0H_0:\mu=\mu_0 成立時,

T∼tn−1=t22.T\sim t_{n-1}=t_{22}.

(a) 假設檢定

第一步:建立假設

H0:μ=3.2H_0:\mu=3.2 H1:μ≠3.2H_1:\mu\neq 3.2

這是雙尾檢定,顯著水準為 α=0.05\alpha=0.05,因此每一尾的面積為 0.0250.025。

第二步:計算檢定統計量

已知

n=23,Xˉ=4.1,s2=4,s=2.n=23,\qquad \bar X=4.1,\qquad s^2=4,\qquad s=2.

因此

T=4.1−3.22/23=0.9232≈2.158.T=\frac{4.1-3.2}{2/\sqrt{23}} =\frac{0.9\sqrt{23}}{2} \approx 2.158.

第三步:決定拒絕域

自由度為 2222,雙尾檢定的臨界值為

t0.975,22≈2.074.t_{0.975,22}\approx 2.074.

拒絕域為

T<−2.074或T>2.074.T<-2.074\quad\text{或}\quad T>2.074.

由於

∣T∣=2.158>2.074,|T|=2.158>2.074,

故拒絕 H0H_0。

統計結論

在顯著水準 0.050.05 下,有足夠證據認為母體平均數 μ\mu 不等於 3.23.2。由於樣本平均數為 4.14.1,資料顯示母體平均數傾向高於 3.23.2。


(b) pp-value

雙尾檢定的 pp-value 為

p-value=P(∣T22∣≥2.158)=2P(T22≥2.158).p\text{-value} =P\left(|T_{22}|\ge 2.158\right) =2P(T_{22}\ge 2.158).

查 tt 分布表或使用統計軟體計算:

p-value≈0.042.p\text{-value}\approx 0.042.

因為

0.042<0.05,0.042<0.05,

所以拒絕 H0H_0,與 (a) 的檢定結論一致。


(c) 當真實平均數為 3.33.3 時的第二型錯誤機率

核心意義

題目所稱「使用替代假設 H1:μ=3.3H_1:\mu=3.3 時的錯誤機率」,是指當真實平均數為 3.33.3 時,檢定卻沒有拒絕 H0H_0 的機率,也就是第二型錯誤機率:

β=P(不拒絕 H0∣μ=3.3).\beta=P(\text{不拒絕 }H_0\mid \mu=3.3).

由於題目沒有給定真正的母體標準差,以下依題目提供的 s2=4s^2=4,採用常見的代入估計:

σ2≈4,σ≈2.\sigma^2\approx 4,\qquad \sigma\approx 2.

建立接受域

不拒絕 H0H_0 的條件為

🔒

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

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

免費註冊

第 4 題20 分

A survey is conducted to examine the relationship between gender (male and female) and preference for three different brands (A, B, and C). The observed frequencies are shown as follows:

🖼️【此處有附圖,請對照原卷】

Answer the following questions at the 0.01 significance level.

(a) If pAp_A and pCp_C indicate the population proportions of male persons who prefer brands A and C, respectively, then conduct a test to decide where pAp_A and pCp_C are equal or not. (10%)
(b) Conduct a test for independence between gender and brand preference. (10%)

🖼️ 本題含圖表,以下為原卷對應頁面:
原卷第 1 頁原卷第 4 頁

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

這一題的完整詳解

核心觀念

本題考查兩種比例/類別資料檢定:

  • (a) 男性偏好品牌 A 與品牌 C 的母體比例是否相同:在男性樣本中,令 pAp_A、pCp_C 分別代表偏好 A、C 的母體比例,檢定 H0:pA=pCH_0:p_A=p_C。由於 A、C 是同一批男性的互斥類別,可在「偏好 A 或 C」的人之中比較兩者人數。
  • (b) 性別與品牌偏好是否獨立:使用列聯表的 Pearson 卡方獨立性檢定。若性別與偏好獨立,各格期望次數為「列合計 × 欄合計 ÷ 總人數」。

顯著水準皆為 α=0.01\alpha=0.01。

(a) 檢定男性偏好 A 與 C 的比例是否相同

男性樣本中,偏好 A、B、C 的人數分別為 30、50、2530、50、25。檢定假設為:

H0:pA=pCH_0:p_A=p_C H1:pA≠pCH_1:p_A\ne p_C

在偏好 A 或 C 的男性中,共有 30+25=5530+25=55 人。在虛無假設下,兩品牌的偏好比例相同,因此每人偏好 A 或 C 的機率各為 0.50.5。在 H0H_0 下,這 55 人中偏好 A 的人數服從 Bin(55, 0.5)\text{Bin}(55,\,0.5),期望值為 55×0.5=27.555\times0.5=27.5,檢定統計量為:

z=30−27.555(0.5)(0.5)=30−2555≈0.674z=\frac{30-27.5}{\sqrt{55(0.5)(0.5)}}=\frac{30-25}{\sqrt{55}}\approx 0.674

雙尾檢定在 α=0.01\alpha=0.01 下的臨界值為 ±2.576\pm 2.576。因為 ∣0.674∣<2.576|0.674|<2.576,不拒絕 H0H_0。此檢定的近似雙尾 pp 值約為 0.500.50,大於 0.010.01。

(b) 檢定性別與品牌偏好是否獨立

假設為:

H0:性別與品牌偏好獨立H_0:\text{性別與品牌偏好獨立} H1:性別與品牌偏好不獨立H_1:\text{性別與品牌偏好不獨立}
🔒

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

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

免費註冊

第 5 題30 分

The grades of a class of 10 students on a midterm report (explanatory variable, X) and on the final examination (response variable, Y) are shown below:

🖼️【此處有附圖,請對照原卷】

We also have obtained ∑Xi=790,∑Xi2=63870,∑Yi=786,∑Yi2=63522\sum X_i = 790, \sum X_i^2 = 63870, \sum Y_i = 786, \sum Y_i^2 = 63522, and ∑XiYi=63301\sum X_i Y_i = 63301. Below shows part of the estimation result based on these data.

CoefficientStandard errorT
Intercept(A)20.18(C)
Midterm(B)0.25(D)

(a) Compute the values (A) to (D) in details, and conclude whether the slope of the linear regression model is significantly different from zero at the 0.01 significance level. (10%)
(b) If we fit the regression model without the intercept term for these data, then find the estimate of the slope. (5%)
(c) If another explanatory variable, gender, is included in the analysis, then we obtain the following analysis of variance:

Degree of freedomSSMSF
Regression(E)(H)(K)(L)
Error(F)(I)90.07
Total(G)(J)

Please compute the values (E) to (L) in details, and specify the required formulas. (10%)
(d) Please show whether gender is a significant variable, given X is already in the model using α=0.05\alpha = 0.05. (5%)

🖼️ 本題含圖表,以下為原卷對應頁面:
原卷第 2 頁原卷第 3 頁原卷第 4 頁原卷第 5 頁

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

這一題的完整詳解

核心觀念

本題考線性迴歸的最小平方法估計、係數標準誤與 tt 檢定、無截距迴歸,以及加入新變數後的變異數分析與部分 FF 檢定。

含截距的簡單線性迴歸中,令 n=10n=10,則

Sxx=∑Xi2−(∑Xi)2n,Syy=∑Yi2−(∑Yi)2n,Sxy=∑XiYi−(∑Xi)(∑Yi)n.S_{xx}=\sum X_i^2-\frac{(\sum X_i)^2}{n},\qquad S_{yy}=\sum Y_i^2-\frac{(\sum Y_i)^2}{n},\qquad S_{xy}=\sum X_iY_i-\frac{(\sum X_i)(\sum Y_i)}{n}.

斜率與截距估計值為 b1=Sxy/Sxxb_1=S_{xy}/S_{xx}、b0=Yˉ−b1Xˉb_0=\bar Y-b_1\bar X。檢定斜率是否為零時,使用 t=b1/SE(b1)t=b_1/SE(b_1),自由度為 n−2n-2。

解題方法與計算

由題目所給總和:

Xˉ=790/10=79,Yˉ=786/10=78.6,\bar X=790/10=79,\qquad \bar Y=786/10=78.6, Sxx=63870−790210=1460,S_{xx}=63870-\frac{790^2}{10}=1460, Syy=63522−786210=1742.4,S_{yy}=63522-\frac{786^2}{10}=1742.4, Sxy=63301−790(786)10=1207.S_{xy}=63301-\frac{790(786)}{10}=1207.

(a) 求 (A) 至 (D),並檢定斜率

斜率與截距估計值為

b1=12071460=0.8267,b0=78.6−(0.8267)(79)=13.2897.b_1=\frac{1207}{1460}=0.8267,\qquad b_0=78.6-(0.8267)(79)=13.2897.

迴歸平方和與誤差平方和為

SSR=Sxy2Sxx=120721460=997.8418,SSR=\frac{S_{xy}^2}{S_{xx}} =\frac{1207^2}{1460}=997.8418, SSE=Syy−SSR=1742.4−997.8418=744.5582.SSE=S_{yy}-SSR=1742.4-997.8418=744.5582.

因此誤差均方為 MSE=SSE/(n−2)=744.5582/8=93.0698MSE=SSE/(n-2)=744.5582/8=93.0698。斜率標準誤約為

SE(b1)=MSESxx=93.06981460≈0.25.SE(b_1)=\sqrt{\frac{MSE}{S_{xx}}} =\sqrt{\frac{93.0698}{1460}} \approx 0.25.

截距標準誤為

SE(b0)=MSE(1n+Xˉ2Sxx)=93.0698(0.1+7921460)≈20.18.SE(b_0)=\sqrt{MSE\left(\frac{1}{n}+\frac{\bar X^2}{S_{xx}}\right)} =\sqrt{93.0698\left(0.1+\frac{79^2}{1460}\right)} \approx 20.18.

依題目表格的標準誤計算 tt 值:

(C)=b0SE(b0)=13.289720.18≈0.66,(C)=\frac{b_0}{SE(b_0)} =\frac{13.2897}{20.18}\approx 0.66, (D)=b1SE(b1)=0.82670.25≈3.31.(D)=\frac{b_1}{SE(b_1)} =\frac{0.8267}{0.25}\approx 3.31.

所以 (A)=13.2897(A)=13.2897(原卷表中截距的標準誤 20.18 是已知值)、(B)=0.8267(B)=0.8267、(C)=0.66(C)=0.66、(D)=3.31(D)=3.31。檢定 H0:β1=0H_0:\beta_1=0 對 H1:β1≠0H_1:\beta_1\ne0,自由度為 88。雙尾顯著水準 0.010.01 的臨界值為 t0.005,8=3.355t_{0.005,8}=3.355。由於 ∣3.31∣<3.355|3.31|<3.355,在 0.010.01 顯著水準下,斜率與零沒有顯著差異。

(b) 不含截距項的斜率估計

無截距模型的最小平方法斜率為

🔒

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

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

免費註冊

其他考古題