109 年 國立臺灣大學土木系碩士班交通組《統計學(C)》

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

第 1 題10 分

  1. Show that the following definition of sample variance s2s^2 is a biased estimator of the population variance σ2\sigma^2.
    s2=1n−1∑i=1n(xi−xˉ)2where xˉ=1n∑i=1nxi, and n=sample sizes^2 = \frac{1}{n-1} \sum_{i=1}^{n} (x_i - \bar{x})^2 \quad \text{where } \bar{x} = \frac{1}{n} \sum_{i=1}^{n} x_i, \text{ and } n = \text{sample size}

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

這一題的完整詳解

核心觀念

本題考查樣本變異數的期望值,以及「不偏估計量」的判定:

若估計量 θ^\hat{\theta} 滿足

E(θ^)=θ,E(\hat{\theta})=\theta,

則稱 θ^\hat{\theta} 為母體參數 θ\theta 的不偏估計量。

設母體平均數為 μ\mu、變異數為 σ2\sigma^2,且 X1,…,XnX_1,\ldots,X_n 為來自同一母體的獨立隨機樣本,則

E(Xi)=μ,Var⁡(Xi)=σ2.E(X_i)=\mu,\qquad \operatorname{Var}(X_i)=\sigma^2.

題目給定

s2=1n−1∑i=1n(Xi−Xˉ)2,s^2=\frac{1}{n-1}\sum_{i=1}^n(X_i-\bar X)^2,

此定義其實是標準的「不偏樣本變異數」。


解題方法

關鍵是將偏差平方和改寫成以母體平均數 μ\mu 為中心的形式。

由

Xi−Xˉ=(Xi−μ)−(Xˉ−μ),X_i-\bar X=(X_i-\mu)-(\bar X-\mu),

可得

∑i=1n(Xi−Xˉ)2=∑i=1n[(Xi−μ)−(Xˉ−μ)]2.\sum_{i=1}^n(X_i-\bar X)^2 = \sum_{i=1}^n\left[(X_i-\mu)-(\bar X-\mu)\right]^2.

展開後:

∑i=1n(Xi−Xˉ)2=∑i=1n(Xi−μ)2−2(Xˉ−μ)∑i=1n(Xi−μ)+∑i=1n(Xˉ−μ)2.\begin{aligned} \sum_{i=1}^n(X_i-\bar X)^2 &=\sum_{i=1}^n(X_i-\mu)^2 -2(\bar X-\mu)\sum_{i=1}^n(X_i-\mu)\\ &\quad+\sum_{i=1}^n(\bar X-\mu)^2. \end{aligned}

因為

∑i=1n(Xi−μ)=n(Xˉ−μ),\sum_{i=1}^n(X_i-\mu)=n(\bar X-\mu),

且

∑i=1n(Xˉ−μ)2=n(Xˉ−μ)2,\sum_{i=1}^n(\bar X-\mu)^2=n(\bar X-\mu)^2,

所以

∑i=1n(Xi−Xˉ)2=∑i=1n(Xi−μ)2−n(Xˉ−μ)2.\sum_{i=1}^n(X_i-\bar X)^2 = \sum_{i=1}^n(X_i-\mu)^2 -n(\bar X-\mu)^2.

兩邊取期望值:

E[∑i=1n(Xi−Xˉ)2]=E[∑i=1n(Xi−μ)2]−nE[(Xˉ−μ)2].E\left[\sum_{i=1}^n(X_i-\bar X)^2\right] = E\left[\sum_{i=1}^n(X_i-\mu)^2\right] - nE\left[(\bar X-\mu)^2\right].

第一項為

E[∑i=1n(Xi−μ)2]=∑i=1nE[(Xi−μ)2]=nσ2.E\left[\sum_{i=1}^n(X_i-\mu)^2\right] = \sum_{i=1}^nE[(X_i-\mu)^2] = n\sigma^2.

又因為

E(Xˉ)=μ,Var⁡(Xˉ)=σ2n,E(\bar X)=\mu,\qquad \operatorname{Var}(\bar X)=\frac{\sigma^2}{n},

因此

🔒

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

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

免費註冊

第 2 題30 分

  1. The joint probability mass function f(x,y)f(x, y) of random variables XX and YY is given in the following table.
f(x,y)x=1x=2x=3y=100.050.150y=200.100.250.25y=3000.100.10\begin{array}{|c|c|c|c|} \hline f(x,y) & x=1 & x=2 & x=3 \\ \hline y=10 & 0.05 & 0.15 & 0 \\ \hline y=20 & 0.10 & 0.25 & 0.25 \\ \hline y=30 & 0 & 0.10 & 0.10 \\ \hline \end{array}

(i) (10%) Find the marginal probability mass functions for both XX and YY.
(ii) (5%) What is the expected value for YY?
(iii) (10%) Are XX and YY statistically independent? Give your reasons.
(iv) (5%) Given x=2x=2, what is the probability that y=10y=10?

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

這一題的完整詳解

此題為聯合機率分布的應用題,涵蓋邊際機率、期望值、獨立性檢定及條件機率的計算。

首先,我們將給定的聯合機率質量函數 (joint probability mass function, jpmf) 整理成一個表格,並計算總機率,確認其為有效的機率分布。

聯合機率分布表:

f(x,y)x=1x=2x=3Marginal f(y)y=100.050.150y=200.100.250.25y=3000.100.10Marginal f(x)\begin{array}{|c|c|c|c|c|} \hline f(x,y) & x=1 & x=2 & x=3 & \text{Marginal } f(y) \\ \hline y=10 & 0.05 & 0.15 & 0 & \\ \hline y=20 & 0.10 & 0.25 & 0.25 & \\ \hline y=30 & 0 & 0.10 & 0.10 & \\ \hline \text{Marginal } f(x) & & & & \\ \hline \end{array}

總機率檢查:
0.05+0.15+0+0.10+0.25+0.25+0+0.10+0.10=1.000.05 + 0.15 + 0 + 0.10 + 0.25 + 0.25 + 0 + 0.10 + 0.10 = 1.00。
總機率為 1,因此此聯合機率分布有效。

(i) 邊際機率質量函數 (Marginal Probability Mass Functions)

邊際機率質量函數 f(x)f(x) 是將聯合機率函數對所有可能的 yy 值加總:f(x)=∑yf(x,y)f(x) = \sum_y f(x,y)。
邊際機率質量函數 f(y)f(y) 是將聯合機率函數對所有可能的 xx 值加總:f(y)=∑xf(x,y)f(y) = \sum_x f(x,y)。

計算 f(x)f(x):
f(x=1)=f(1,10)+f(1,20)+f(1,30)=0.05+0.10+0=0.15f(x=1) = f(1,10) + f(1,20) + f(1,30) = 0.05 + 0.10 + 0 = 0.15
f(x=2)=f(2,10)+f(2,20)+f(2,30)=0.15+0.25+0.10=0.50f(x=2) = f(2,10) + f(2,20) + f(2,30) = 0.15 + 0.25 + 0.10 = 0.50
f(x=3)=f(3,10)+f(3,20)+f(3,30)=0+0.25+0.10=0.35f(x=3) = f(3,10) + f(3,20) + f(3,30) = 0 + 0.25 + 0.10 = 0.35

驗證 f(x)f(x) 的總和: 0.15+0.50+0.35=1.000.15 + 0.50 + 0.35 = 1.00。

計算 f(y)f(y):
f(y=10)=f(1,10)+f(2,10)+f(3,10)=0.05+0.15+0=0.20f(y=10) = f(1,10) + f(2,10) + f(3,10) = 0.05 + 0.15 + 0 = 0.20
f(y=20)=f(1,20)+f(2,20)+f(3,20)=0.10+0.25+0.25=0.60f(y=20) = f(1,20) + f(2,20) + f(3,20) = 0.10 + 0.25 + 0.25 = 0.60
f(y=30)=f(1,30)+f(2,30)+f(3,30)=0+0.10+0.10=0.20f(y=30) = f(1,30) + f(2,30) + f(3,30) = 0 + 0.10 + 0.10 = 0.20

驗證 f(y)f(y) 的總和: 0.20+0.60+0.20=1.000.20 + 0.60 + 0.20 = 1.00。

邊際機率質量函數:
fX(x)f_X(x):
fX(1)=0.15f_X(1) = 0.15
fX(2)=0.50f_X(2) = 0.50
fX(3)=0.35f_X(3) = 0.35

fY(y)f_Y(y):
fY(10)=0.20f_Y(10) = 0.20
fY(20)=0.60f_Y(20) = 0.60
fY(30)=0.20f_Y(30) = 0.20

(ii) YY 的期望值 (Expected Value of Y)

期望值 E[Y]E[Y] 的計算公式為 E[Y]=∑yy⋅fY(y)E[Y] = \sum_y y \cdot f_Y(y)。
E[Y]=(10×fY(10))+(20×fY(20))+(30×fY(30))E[Y] = (10 \times f_Y(10)) + (20 \times f_Y(20)) + (30 \times f_Y(30))
E[Y]=(10×0.20)+(20×0.60)+(30×0.20)E[Y] = (10 \times 0.20) + (20 \times 0.60) + (30 \times 0.20)

🔒

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

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

免費註冊

第 3 題30 分

  1. The occurrence of large-magnitude earthquakes in a city can be modeled as a Poisson process. 10 large-magnitude earthquakes occurred in City A within the last 10 years. If there is at least one occurrence of earthquake in a year, that year would be classified as a hazard year.
    (i) (10%) What is the probability that there will be exactly one large-magnitude earthquake next year in City A?
    (ii) (10%) What is the probability that the next year would be a hazard year for City A?
    (iii) (10%) What is the probability that there will be 2 hazard years within the next 4 years?

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

這一題的完整詳解

此題涉及 Poisson Process 的應用,用於模擬地震發生的頻率。題目要求計算在不同時間尺度下,發生特定數量的地震或特定類型的年份(Hazard Year)的機率。

首先,我們需要確定 Poisson Process 的參數 λ\lambda。
Poisson Process 的特性是事件發生率是恆定的。題目提到「10 large-magnitude earthquakes occurred in City A within the last 10 years」。
這表示在 10 年的期間內,平均發生了 10 次地震。
因此,平均每年發生的地震次數為 10 earthquakes10 years=1 earthquake/year\frac{10 \text{ earthquakes}}{10 \text{ years}} = 1 \text{ earthquake/year}。
所以,Poisson Process 的平均發生率 λ=1\lambda = 1 (次/年)。

Poisson 分布的機率質量函數 (PMF) 為:
P(X=k)=e−μμkk!P(X=k) = \frac{e^{-\mu} \mu^k}{k!}
其中 μ\mu 是在特定時間間隔內事件發生的平均次數。

(i) 下一年恰好發生一次大地震的機率

我們關注的是「下一年」這個時間間隔,長度為 1 年。
對於這個時間間隔,平均發生的地震次數 μ=λ×t=1 earthquake/year×1 year=1\mu = \lambda \times t = 1 \text{ earthquake/year} \times 1 \text{ year} = 1。
我們要求恰好發生一次大地震的機率,即 P(X=1)P(X=1),其中 XX 是下一年發生的地震次數。
P(X=1)=e−1(1)11!=e−1×11=e−1P(X=1) = \frac{e^{-1} (1)^1}{1!} = \frac{e^{-1} \times 1}{1} = e^{-1}。
e−1≈0.367879e^{-1} \approx 0.367879。

【答案】 P(exactly one earthquake next year)=e−1≈0.3679P(\text{exactly one earthquake next year}) = e^{-1} \approx 0.3679。

(ii) 下一年是 Hazard Year 的機率

定義:如果一年內至少發生一次地震,該年就稱為 Hazard Year。
我們要求的是下一年是 Hazard Year 的機率。
這意味著下一年發生的地震次數 XX 必須大於或等於 1 (X≥1X \ge 1)。
計算 P(X≥1)P(X \ge 1) 比較直接的方法是計算其補集的機率:P(X≥1)=1−P(X<1)P(X \ge 1) = 1 - P(X < 1)。
在 Poisson 分布中,XX 的值是非負整數,所以 X<1X < 1 相當於 X=0X=0。
P(X=0)=e−1(1)00!=e−1×11=e−1P(X=0) = \frac{e^{-1} (1)^0}{0!} = \frac{e^{-1} \times 1}{1} = e^{-1}。
所以,P(X≥1)=1−P(X=0)=1−e−1P(X \ge 1) = 1 - P(X=0) = 1 - e^{-1}。
1−e−1≈1−0.367879=0.6321211 - e^{-1} \approx 1 - 0.367879 = 0.632121。

答案: P(next year is a hazard year)=1−e−1≈0.6321P(\text{next year is a hazard year}) = 1 - e^{-1} \approx 0.6321。

(iii) 未來 4 年內有 2 個 Hazard Years 的機率

現在我們關注的時間間隔是「未來 4 年」。
在這個 4 年的期間內,平均發生的地震次數為 μ4yr=λ×t=1 earthquake/year×4 years=4\mu_{4yr} = \lambda \times t = 1 \text{ earthquake/year} \times 4 \text{ years} = 4。

🔒

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

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

免費註冊

第 4 題10 分

  1. A survey is performed to study the proportion of residents in City A and City B who support the construction of a new railway line. It is found that 680 of 1000 City A residents favor the construction while 730 of 1000 City B residents are in favor. Is there a significant difference between the proportions of City A and City B residents who favor the construction of the new railway line? Use the P-value approach to help your draw your conclusion. Use 0.05 as the level of significance.

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

這一題的完整詳解

此題為兩比例的假設檢定 (Hypothesis Testing for Two Proportions),我們需要比較兩個城市居民對鐵路建設支持比例的差異,並使用 P-value approach 來做判斷。

1. 設定假設檢定:
我們要檢定兩個城市的居民支持比例是否存在顯著差異。
令 pAp_A 為 City A 居民支持比例,令 pBp_B 為 City B 居民支持比例。

虛無假設 H0H_0: pA=pBp_A = p_B (兩個城市的居民支持比例沒有顯著差異)
對立假設 H1H_1: pA≠pBp_A \neq p_B (兩個城市的居民支持比例有顯著差異)
這是一個雙尾檢定 (two-tailed test)。

2. 收集數據:
City A: 樣本數 nA=1000n_A = 1000,支持人數 xA=680x_A = 680。
City B: 樣本數 nB=1000n_B = 1000,支持人數 xB=730x_B = 730。

計算樣本比例:
p^A=xAnA=6801000=0.68\hat{p}_A = \frac{x_A}{n_A} = \frac{680}{1000} = 0.68
p^B=xBnB=7301000=0.73\hat{p}_B = \frac{x_B}{n_B} = \frac{730}{1000} = 0.73

3. 計算合併比例 (Pooled Proportion):
在虛無假設 H0H_0 下,我們假設兩個母體比例相等,因此使用合併的樣本比例作為估計值。
p^=xA+xBnA+nB=680+7301000+1000=14102000=0.705\hat{p} = \frac{x_A + x_B}{n_A + n_B} = \frac{680 + 730}{1000 + 1000} = \frac{1410}{2000} = 0.705

4. 計算檢定統計量 (Test Statistic):
對於兩個比例的差異檢定,我們使用 Z 檢定統計量。
Z=(p^A−p^B)−(pA−pB)p^(1−p^)(1nA+1nB)Z = \frac{(\hat{p}_A - \hat{p}_B) - (p_A - p_B)}{\sqrt{\hat{p}(1-\hat{p})(\frac{1}{n_A} + \frac{1}{n_B})}}
在 H0H_0 下,pA−pB=0p_A - p_B = 0。
Z=(0.68−0.73)−00.705(1−0.705)(11000+11000)Z = \frac{(0.68 - 0.73) - 0}{\sqrt{0.705(1-0.705)(\frac{1}{1000} + \frac{1}{1000})}}

🔒

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

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

免費註冊

第 5 題20 分

  1. Company A and Company B are steel manufacturers. 25 steel specimens are obtained from each company to determine the yield strength. The result shows that the sample mean strength and sample standard deviation for Company A are 30.2 ksi and 4.0 ksi respectively. For Company B, the sample mean strength and sample standard deviation are 35.3 ksi and 5.0 ksi respectively.
    (i) (10%) Construct a 95% confidence interval for the difference in the mean yield strength for the 2 companies. Assume normality for the distribution of yield strength.
    (ii) (10%) Construct a 95% confidence interval for the population variance of the yield strength for Company A.

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

這一題的完整詳解

此題為兩個獨立樣本的變異數與平均數的信賴區間估計問題。題目要求分別計算兩個公司平均數差異的信賴區間,以及其中一個公司母體變異數的信賴區間。

已知資訊:
公司 A:樣本數 nA=25n_A = 25,樣本平均數 xˉA=30.2\bar{x}_A = 30.2 ksi,樣本標準差 sA=4.0s_A = 4.0 ksi。
公司 B:樣本數 nB=25n_B = 25,樣本平均數 xˉB=35.3\bar{x}_B = 35.3 ksi,樣本標準差 sB=5.0s_B = 5.0 ksi。
信賴水準:95%。
假設:樣本來自常態分配。

(i) 兩個公司平均數差異的 95% 信賴區間

我們要計算母體平均數差異 μA−μB\mu_A - \mu_B 的 95% 信賴區間。
由於兩個母體變異數 σA2\sigma_A^2 和 σB2\sigma_B^2 未知,且樣本數 nA=nB=25n_A=n_B=25 (不大),我們通常會使用 t 分布。
我們需要判斷是否假設兩個母體變異數相等。題目沒有明確說明,但通常在未提及相等時,應假設它們不等 (unequal variances),並使用 Welch-Satterthwaite 方法來計算自由度。然而,如果題目允許假設變異數相等 (equal variances),則會使用池化變異數 (pooled variance) 和較簡單的自由度計算。
在沒有明確指示的情況下,且樣本數相等,我們可以使用兩種方法。最保守且常見的做法是假設變異數不等。

方法一:假設變異數不等 (Unequal Variances)
信賴區間的公式為:
(xˉA−xˉB)±tα/2,dfsA2nA+sB2nB(\bar{x}_A - \bar{x}_B) \pm t_{\alpha/2, df} \sqrt{\frac{s_A^2}{n_A} + \frac{s_B^2}{n_B}}

首先計算自由度 dfdf 使用 Welch-Satterthwaite 方程式:
df≈(sA2nA+sB2nB)2(sA2/nA)2nA−1+(sB2/nB)2nB−1df \approx \frac{(\frac{s_A^2}{n_A} + \frac{s_B^2}{n_B})^2}{\frac{(s_A^2/n_A)^2}{n_A-1} + \frac{(s_B^2/n_B)^2}{n_B-1}}
sA2nA=(4.0)225=1625=0.64\frac{s_A^2}{n_A} = \frac{(4.0)^2}{25} = \frac{16}{25} = 0.64
sB2nB=(5.0)225=2525=1.00\frac{s_B^2}{n_B} = \frac{(5.0)^2}{25} = \frac{25}{25} = 1.00
df≈(0.64+1.00)2(0.64)225−1+(1.00)225−1df \approx \frac{(0.64 + 1.00)^2}{\frac{(0.64)^2}{25-1} + \frac{(1.00)^2}{25-1}}
df≈(1.64)20.409624+124df \approx \frac{(1.64)^2}{\frac{0.4096}{24} + \frac{1}{24}}
df≈2.68960.4096+124=2.68961.4096/24=2.6896×241.4096df \approx \frac{2.6896}{\frac{0.4096 + 1}{24}} = \frac{2.6896}{1.4096/24} = \frac{2.6896 \times 24}{1.4096}
df≈64.55041.4096≈45.80df \approx \frac{64.5504}{1.4096} \approx 45.80
我們通常取整數的自由度,可以取 45 或 46。為了保守起見,可以取較小的自由度 45,或者查表時使用更精確的 dfdf 值。若取 df=45df=45,查 t 分布表,對於 95% 信賴水準 (α/2=0.025\alpha/2 = 0.025),t0.025,45≈2.014t_{0.025, 45} \approx 2.014。

計算信賴區間:
(xˉA−xˉB)=30.2−35.3=−5.1(\bar{x}_A - \bar{x}_B) = 30.2 - 35.3 = -5.1
sA2nA+sB2nB=0.64+1.00=1.64\sqrt{\frac{s_A^2}{n_A} + \frac{s_B^2}{n_B}} = \sqrt{0.64 + 1.00} = \sqrt{1.64}
−5.1±t0.025,451.64-5.1 \pm t_{0.025, 45} \sqrt{1.64}
−5.1±2.014×1.64-5.1 \pm 2.014 \times \sqrt{1.64}
−5.1±2.014×1.2806-5.1 \pm 2.014 \times 1.2806
−5.1±2.579-5.1 \pm 2.579

信賴區間為 (−5.1−2.579,−5.1+2.579)=(−7.679,−2.521)(-5.1 - 2.579, -5.1 + 2.579) = (-7.679, -2.521)。

🔒

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

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

免費註冊

其他考古題