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

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

第 1 題25 分

The following table shows the contingency table of sales for paper towels.

LoactionPackage type
Two rollsDozen rolls
Rural89111
Suburban75125
Urban82118

Let PruralP_{rural}, PsuburbanP_{suburban}, and PurbanP_{urban} denote the population proportions of sales of two-roll packages in rural, suburban, and urban locations, respectively. Use the 0.05 level of significance.

(1) Test H0:Prural=PsuburbanH_0: P_{rural} = P_{suburban} versus H1:Prural≠PsuburbanH_1: P_{rural} \neq P_{suburban}. (8%)
(2) Test H0:Prural=Psuburban=PurbanH_0: P_{rural} = P_{suburban} = P_{urban} versus H1:Prural,PsuburbanH_1: P_{rural}, P_{suburban}, and PurbanP_{urban} are not all equal. (10%)
(3) Construct the 95% confidence interval for Psuburban−PurbanP_{suburban} - P_{urban}. (7%)

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

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

這一題的完整詳解

此題考驗對比例的假設檢定與信賴區間的計算。

首先,我們需要整理數據並計算各組的樣本比例。
總樣本數 n=(89+111)+(75+125)+(82+118)=200+200+200=600n = (89+111) + (75+125) + (82+118) = 200 + 200 + 200 = 600。
Rural: 樣本數 nR=200n_R = 200,樣本比例 p^R=89200=0.445\hat{p}_R = \frac{89}{200} = 0.445
Suburban: 樣本數 nS=200n_S = 200,樣本比例 p^S=75200=0.375\hat{p}_S = \frac{75}{200} = 0.375
Urban: 樣本數 nU=200n_U = 200,樣本比例 p^U=82200=0.410\hat{p}_U = \frac{82}{200} = 0.410

(1) 檢定 H0:Prural=PsuburbanH_0: P_{rural} = P_{suburban} versus H1:Prural≠PsuburbanH_1: P_{rural} \neq P_{suburban}。
這是兩個比例的獨立樣本 Z 檢定。
在虛無假設成立下,合併比例 p^pool=nRp^R+nSp^SnR+nS=89+75200+200=164400=0.41\hat{p}_{pool} = \frac{n_R \hat{p}_R + n_S \hat{p}_S}{n_R + n_S} = \frac{89 + 75}{200 + 200} = \frac{164}{400} = 0.41。
檢定統計量為:
Z=p^R−p^Sp^pool(1−p^pool)(1nR+1nS)=0.445−0.3750.41(1−0.41)(1200+1200)=0.070.41×0.59×2200=0.070.2419×0.01=0.070.002419≈0.070.04918≈1.423Z = \frac{\hat{p}_R - \hat{p}_S}{\sqrt{\hat{p}_{pool}(1-\hat{p}_{pool})(\frac{1}{n_R} + \frac{1}{n_S})}} = \frac{0.445 - 0.375}{\sqrt{0.41(1-0.41)(\frac{1}{200} + \frac{1}{200})}} = \frac{0.07}{\sqrt{0.41 \times 0.59 \times \frac{2}{200}}} = \frac{0.07}{\sqrt{0.2419 \times 0.01}} = \frac{0.07}{\sqrt{0.002419}} \approx \frac{0.07}{0.04918} \approx 1.423
顯著水準 α=0.05\alpha = 0.05,雙尾檢定。臨界值為 Zα/2=Z0.025=1.96Z_{\alpha/2} = Z_{0.025} = 1.96。
因為 ∣1.423∣<1.96|1.423| < 1.96,我們無法拒絕 H0H_0。

【答案】無法拒絕 H0H_0,PruralP_{rural} 與 PsuburbanP_{suburban} 沒有顯著差異。

(2) 檢定 H0:Prural=Psuburban=PurbanH_0: P_{rural} = P_{suburban} = P_{urban} versus H1:H_1: 不全相等。
這是三個比例的卡方檢定(Chi-squared test for independence / homogeneity)。
我們需要計算期望次數。
Rural: 期望 ER,two=(89+111)600×(89+75+82)=200600×246=13×246=82E_{R, two} = \frac{(89+111)}{600} \times (89+75+82) = \frac{200}{600} \times 246 = \frac{1}{3} \times 246 = 82
Rural: 期望 ER,dozen=(89+111)600×(111+125+118)=200600×354=13×354=118E_{R, dozen} = \frac{(89+111)}{600} \times (111+125+118) = \frac{200}{600} \times 354 = \frac{1}{3} \times 354 = 118
Suburban: 期望 ES,two=(75+125)600×(89+75+82)=200600×246=82E_{S, two} = \frac{(75+125)}{600} \times (89+75+82) = \frac{200}{600} \times 246 = 82
Suburban: 期望 ES,dozen=(75+125)600×(111+125+118)=200600×354=118E_{S, dozen} = \frac{(75+125)}{600} \times (111+125+118) = \frac{200}{600} \times 354 = 118
Urban: 期望 EU,two=(82+118)600×(89+75+82)=200600×246=82E_{U, two} = \frac{(82+118)}{600} \times (89+75+82) = \frac{200}{600} \times 246 = 82

🔒

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

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

免費註冊

第 2 題25 分

A traffic engineering study on traffic delay was conducted at intersections with signal on urban streets. Three types of traffic signals were utilized and five intersections were used for each type of signal. The measure of traffic delay was the average stopped time per vehicle at each of the interactions (seconds/vehicle) as follows:

Type of signal
PretimedSemi-actuatedFully actuated
36.617.515.0
39.220.610.4
30.418.718.9
37.125.710.5
34.122.015.2
mean35.4820.9014.00
variance11.35710.18512.915

(1) Write the linear statistical model for this study. Explain the model components and state the necessary assumptions for your model. (8%)
(2) Compute the analysis of variance table for the data. (10%)
(3) Compute the 95% confidence interval of the mean traffic delays for Pretimed. (7%)

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

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

這一題的完整詳解

此題考驗單因子變異數分析 (One-Way ANOVA) 的線性模型、ANOVA 表計算,以及特定群組的信賴區間。

核心觀念: 單因子變異數分析用於比較三個或更多獨立群組的平均數是否存在顯著差異。

(1) 線性統計模型:
此研究屬於單因子變異數分析,其中「訊號類型」是因子,有三個水準(Pretimed, Semi-actuated, Fully actuated)。「交通延遲時間」是反應變數。
模型可以寫成:
Yij=μi+ϵijY_{ij} = \mu_i + \epsilon_{ij}
其中:

  • YijY_{ij}:代表第 ii 種訊號類型下,第 jj 個觀察值的交通延遲時間。
  • μi\mu_i:代表第 ii 種訊號類型的總體平均交通延遲時間。
  • ϵij\epsilon_{ij}:代表隨機誤差項,表示第 ii 種訊號類型下,第 jj 個觀察值與其群體平均數之間的差異。

更常見的線性統計模型寫法是考慮每個群體的平均數和誤差:
Yij=μ+αi+ϵijY_{ij} = \mu + \alpha_i + \epsilon_{ij}
其中:

  • YijY_{ij}:同上。
  • μ\mu:總體平均數(或稱 Overall Mean)。
  • αi\alpha_i:第 ii 種訊號類型的效應(Effect),表示第 ii 群體的平均數相較於總體平均數的偏差。通常假設 ∑αi=0\sum \alpha_i = 0。
  • ϵij\epsilon_{ij}:隨機誤差項。

模型組成元件解釋:

  • 反應變數 (Response Variable): YijY_{ij},即交通延遲時間(秒/車輛)。
  • 因子 (Factor): 訊號類型,有三個水準 (Pretimed, Semi-actuated, Fully actuated)。
  • 群體平均數 (μi\mu_i 或 μ+αi\mu + \alpha_i): 各訊號類型下的平均交通延遲時間。
  • 誤差項 (ϵij\epsilon_{ij}): 隨機變異,由未被模型解釋的因素引起。

必要假設:

  1. 獨立性 (Independence): 各觀察值之間是獨立的。這意味著一個觀察值的延遲時間不會影響另一個觀察值的延遲時間。在這個研究中,五個觀察值是來自五個不同的交叉路口,因此假設獨立性是合理的。
  2. 常態性 (Normality): 各群體的誤差項 ϵij\epsilon_{ij} 服從平均數為 0、變異數為 σ2\sigma^2 的常態分佈。也就是說,在每一種訊號類型下,交通延遲時間的數據分佈近似於常態分佈。
  3. 變異數同質性 (Homogeneity of Variances): 各群體的誤差項具有相同的變異數 σ2\sigma^2。即 Var(ϵij)=σ2\text{Var}(\epsilon_{ij}) = \sigma^2 對於所有 ii 都成立。這意味著不同訊號類型的交通延遲時間的離散程度應該是相似的。

【答案】
線性統計模型:Yij=μi+ϵijY_{ij} = \mu_i + \epsilon_{ij} 或 Yij=μ+αi+ϵijY_{ij} = \mu + \alpha_i + \epsilon_{ij}。
模型元件:YijY_{ij} 為反應變數,μi\mu_i (或 μ+αi\mu + \alpha_i) 為群體平均數,ϵij\epsilon_{ij} 為誤差項。
必要假設:獨立性、常態性、變異數同質性。

(2) 計算變異數分析表 (ANOVA Table):
我們需要計算總變異數 (SST)、因子變異數 (SSG 或 SSA) 和誤差變異數 (SSE)。
樣本數 k=3k = 3 (群體數),每組樣本數 ni=5n_i = 5。總觀察數 N=k×ni=3×5=15N = k \times n_i = 3 \times 5 = 15。

先計算總平均數 Yˉˉ\bar{\bar{Y}}:
Yˉˉ=35.48+20.90+14.003=70.383=23.46\bar{\bar{Y}} = \frac{35.48 + 20.90 + 14.00}{3} = \frac{70.38}{3} = 23.46

計算組間離差平方和 (SSG - Sum of Squares Group):
SSG=∑i=1kni(Yˉi−Yˉˉ)2SSG = \sum_{i=1}^{k} n_i (\bar{Y}_i - \bar{\bar{Y}})^2
Yˉ1=35.48\bar{Y}_1 = 35.48, Yˉ2=20.90\bar{Y}_2 = 20.90, Yˉ3=14.00\bar{Y}_3 = 14.00
SSG=5×(35.48−23.46)2+5×(20.90−23.46)2+5×(14.00−23.46)2SSG = 5 \times (35.48 - 23.46)^2 + 5 \times (20.90 - 23.46)^2 + 5 \times (14.00 - 23.46)^2

🔒

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

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

免費註冊

第 3 題50 分

The following table shows a sample of 30 purchase transactions for houses in an area in three-month period.

PriceSqFeetBathroomsFireplacePriceSqFeetBathroomsFireplace
2003.71yes1723.82no
1212.31yes3012.42yes
1922.81no2432.92no
1112.21yes3454.03no
2093.71yes2985.73yes
2652.91no4294.13no
4847.92yes2854.63yes
2073.12yes4595.93yes
2563.42yes3804.93no
2032.12no4525.03yes
2602.32no5239.64yes
3455.32no5316.44yes
2754.52yes4086.54yes
2845.42no3176.14yes
2022.32no3716.14yes

Price: price of the home (in thousand US dollars)
SqFeet: area of the home (in thousand square feet)
Bathrooms: number of bathrooms
Fireplace: with or without fireplaces in the home

Consider the regression model using Price as the response variable and the remaining variables are explanatory variables. The following table shows the estimation output.

EstimateStd Error
Constant58.6532.18
SqFeet37.159.27
Bathrooms41.0616.32
Fireplace-24.7725.06

Assume Price follow a normal distribution. Use the 0.05 level of significance if required.

(1) Construct the 95% confidence interval for the proportion of homes with fireplaces. (8%)
(2) Assume the variances of home prices are equal or not for houses with or without a fireplace. Test whether the mean home prices are equal or not for houses with or without a fireplace. (12%)
(3) Please use the result from part (2) and the estimation output to define the dummy variable for Fireplace in the regression model. What is the interpretation of the estimated coefficient for Fireplace in the regression model? (6%)
(4) Examine which variables could be able to form the regression analysis. (9%)
(5) If R2=0.7342R^2 = 0.7342, then construct the ANOVA table for the regression analysis. (5%)
(6) Compute the adjusted R2R^2. (5%)

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

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

這一題的完整詳解

核心觀念

本題整合以下觀念:

  1. 二項母體比例的信賴區間。
  2. 兩獨立樣本、等變異數下的 pooled two-sample tt 檢定。
  3. 類別變數的 dummy variable 編碼與迴歸係數解釋。
  4. 迴歸係數的部分 tt 檢定。
  5. 迴歸 ANOVA 表與調整後決定係數。

(1) 有壁爐房屋比例的 95% 信賴區間

由表中資料:

  • 有壁爐:1818 間
  • 無壁爐:1212 間
  • 總樣本數:n=30n=30

樣本比例為

p^=1830=0.6.\hat p=\frac{18}{30}=0.6.

採用大樣本比例信賴區間:

p^±z0.025p^(1−p^)n,z0.025=1.96.\hat p\pm z_{0.025} \sqrt{\frac{\hat p(1-\hat p)}{n}}, \qquad z_{0.025}=1.96.

因此

0.6±1.960.6(0.4)30=0.6±1.96(0.08944)=0.6±0.17531.0.6\pm1.96\sqrt{\frac{0.6(0.4)}{30}} =0.6\pm1.96(0.08944) =0.6\pm0.17531.

所以 95% 信賴區間為

(0.4247, 0.7753).(0.4247,\ 0.7753).

亦即母體中有壁爐房屋的比例約為 42.47%42.47\% 至 77.53%77.53\%。

(2) 有無壁爐房屋平均價格是否相同

令

  • μ1\mu_1:有壁爐房屋的平均價格
  • μ0\mu_0:無壁爐房屋的平均價格

檢定假設為

H0:μ1−μ0=0,H1:μ1−μ0≠0.H_0:\mu_1-\mu_0=0, \qquad H_1:\mu_1-\mu_0\ne0.

由資料計算:

房屋類型nn平均價格樣本變異數
有壁爐1818322.667322.66717091.76517091.765
無壁爐1212276.667276.6676722.6066722.606

題目假設兩組母體變異數相等,因此使用 pooled variance:

sp2=(18−1)(17091.765)+(12−1)(6722.606)18+12−2=13018.167.s_p^2= \frac{(18-1)(17091.765)+(12-1)(6722.606)} {18+12-2} =13018.167.

平均數差的標準誤為

SE(Xˉ1−Xˉ0)=sp118+112=13018.167(118+112)=42.522.SE(\bar X_1-\bar X_0) =s_p\sqrt{\frac1{18}+\frac1{12}} =\sqrt{13018.167\left(\frac1{18}+\frac1{12}\right)} =42.522.

檢定統計量為

t=322.667−276.66742.522=1.082,df=18+12−2=28.t= \frac{322.667-276.667}{42.522} =1.082, \qquad df=18+12-2=28.

在 α=0.05\alpha=0.05 的雙尾檢定下,

t0.025,28=2.048.t_{0.025,28}=2.048.

因為

∣1.082∣<2.048,|1.082|<2.048,

所以不拒絕 H0H_0。

結論:在 5% 顯著水準下,沒有充分證據認為有壁爐與無壁爐房屋的平均價格不同。

(3) Fireplace 虛擬變數與係數解釋

定義虛擬變數

D={1,房屋有壁爐,0,房屋無壁爐.D= \begin{cases} 1, & \text{房屋有壁爐},\\ 0, & \text{房屋無壁爐}. \end{cases}

迴歸模型為

Price^=58.65+37.15(SqFeet)+41.06(Bathrooms)−24.77D.\widehat{Price} = 58.65+37.15(SqFeet)+41.06(Bathrooms)-24.77D.

在 SqFeetSqFeet 與 BathroomsBathrooms 相同的條件下:

  • 無壁爐房屋的預測價格為基準組;
  • 有壁爐房屋的預測價格平均比無壁爐房屋低 24.7724.77 千美元。

因此,FireplaceFireplace 的估計係數 −24.77-24.77 表示控制房屋面積與浴室數量後,有壁爐與預測價格降低 24.7724.77 千美元相關。這是條件平均差異,不代表因果效果。

(4) 檢查可省略的變數

迴歸模型共有 33 個解釋變數,因此誤差自由度為

dfE=n−p−1=30−3−1=26.df_E=n-p-1=30-3-1=26.

在 α=0.05\alpha=0.05 雙尾檢定下,

t0.025,26=2.056.t_{0.025,26}=2.056.

各係數的檢定統計量如下:

🔒

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

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

免費註冊

其他考古題