112 年 國立臺北大學統計學系碩士班《統計學》

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

第 1 題10 分

I. Researchers conducted a large-sample study to determine if smoking causes cancer. For each sample, they recorded information including smoking status (ever-smoker, never-smoker), weight, and cancer status (yes, no).

  1. (10%) Use the researchers' data. Design a two-dimensional plot to display the association between weight and smoking status by cancer status. Explain your design.

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

這一題的完整詳解

【答案】
建議採用「分組箱型圖(Grouped Box Plot)」作為最適二維圖形設計:

  1. 座標軸與圖形設定:
  • X 軸:吸菸狀態(Smoking Status),包含兩組類別:曾吸菸者(Ever-smoker)與從未吸菸者(Never-smoker)。
  • Y 軸:體重(Weight),為連續型數值變數。
  • 圖形元素與分組顏色:在每個吸菸狀態類別下,並排繪製兩個箱型圖,以不同顏色(例如紅色代表罹癌 Yes,藍色代表未罹癌 No)進行區分,全圖共呈現 4 個並排箱型圖。
  1. 設計理由與關聯性展示:
  • 克服大樣本點重疊(Overplotting):本研究為大樣本研究,若採用一般散佈圖,大量樣本點將重疊密集,難以辨識個別密度與分佈型態;箱型圖透過五數概括(最小值、第一四分位數、中位數、第三四分位數、最大值)與離群值呈現,不受樣本規模龐大干擾。
  • 直觀展示三者關聯與交互作用:透過並列比較,研究者可一眼看清在相同吸菸狀態下罹癌與否的體重分佈差異,並能評估吸菸與癌症狀態對體重的交互影響。

詳解

🔒

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

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

免費註冊

第 2 題10 分

  1. (10%) Let X, W, and Y be random variables representing smoking status, weight, and cancer status, respectively. Specify the three random variables by their sample spaces and distributions. Explain your notations and parameters.

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

這一題的完整詳解

核心觀念

本題考查「隨機變數的樣本空間與機率分布」:

  • 吸菸狀態與癌症狀態屬於二元類別變數,可用 Bernoulli 分布表示。
  • 體重屬於連續型數值變數,通常以連續分布表示;若題目未提供實際資料,常用常態分布作為合理假設。
  • 每個隨機變數都必須說明:
    1. 可能取值所形成的樣本空間;
    2. 各取值的機率分布;
    3. 分布中的參數及其意義。

解題方法

先將類別文字轉換為數值,再依變數型態指定分布。

1. 吸菸狀態 XX

定義

X={1,表示有吸菸0,表示沒有吸菸X= \begin{cases} 1, & \text{表示有吸菸}\\ 0, & \text{表示沒有吸菸} \end{cases}

因此,XX 的樣本空間為

X={0,1}.\mathcal{X}=\{0,1\}.

令吸菸人口比例為 pp,則

X∼Bernoulli⁡(p),X\sim \operatorname{Bernoulli}(p),

其機率質量函數為

P(X=x)=px(1−p)1−x,x∈{0,1},P(X=x)=p^x(1-p)^{1-x},\qquad x\in\{0,1\},

其中

P(X=1)=p,P(X=0)=1−p,P(X=1)=p,\qquad P(X=0)=1-p,

且 0≤p≤10\leq p\leq 1。

參數 pp 表示隨機抽取一名研究對象具有吸菸狀態的機率。

2. 體重 WW

體重是連續型變數,其樣本空間可寫為

W=(0,∞),\mathcal{W}=(0,\infty),

實際應用上也可依研究對象限制寫成合理的體重範圍。

在未提供資料分布的情況下,採用常見的常態分布模型:

W∼N(μ,σ2),W\sim N(\mu,\sigma^2),

其中:

  • μ\mu 是母體平均體重;
  • σ2\sigma^2 是體重的母體變異數;
  • σ>0\sigma>0 是母體標準差。

其機率密度函數為

fW(w)=12πσ2exp⁡[−(w−μ)22σ2],−∞<w<∞.f_W(w)=\frac{1}{\sqrt{2\pi\sigma^2}} \exp\left[-\frac{(w-\mu)^2}{2\sigma^2}\right], \qquad -\infty<w<\infty.

常態分布的理論樣本空間是整個實數集合,但體重在實際意義上必須為正值;常態模型是對體重分布的近似描述。若資料呈現明顯偏態,也可改用對數常態分布等正值連續分布。

3. 癌症狀態 YY

定義

Y={1,表示罹患癌症0,表示未罹患癌症Y= \begin{cases} 1, & \text{表示罹患癌症}\\ 0, & \text{表示未罹患癌症} \end{cases}

因此,YY 的樣本空間為

Y={0,1}.\mathcal{Y}=\{0,1\}.

令癌症盛行率為 qq,則

Y∼Bernoulli⁡(q),Y\sim \operatorname{Bernoulli}(q),

其機率質量函數為

P(Y=y)=qy(1−q)1−y,y∈{0,1},P(Y=y)=q^y(1-q)^{1-y},\qquad y\in\{0,1\},

其中

P(Y=1)=q,P(Y=0)=1−q,P(Y=1)=q,\qquad P(Y=0)=1-q,

且 0≤q≤10\leq q\leq 1。

參數 qq 表示隨機抽取一名研究對象罹患癌症的機率。

聯合分布的補充說明

上述指定的是三個變數的邊際分布:

X∼Bernoulli⁡(p),W∼N(μ,σ2),Y∼Bernoulli⁡(q).X\sim\operatorname{Bernoulli}(p),\qquad W\sim N(\mu,\sigma^2),\qquad Y\sim\operatorname{Bernoulli}(q).

題目沒有說明三者是否相互獨立,因此不能直接主張

P(X=x,W=w,Y=y)=P(X=x)P(W=w)P(Y=y).P(X=x,W=w,Y=y) = P(X=x)P(W=w)P(Y=y).

若研究目的是分析吸菸與體重對癌症的影響,較合理的表示方式是指定癌症的條件機率,例如

🔒

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

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

免費註冊

第 3 題10 分

  1. (10%) Select appropriate measures.
    (1) (5%) Write down a measure you would use to compare the weights between people of different cancer statuses.
    (2) (5%) Write down a measure you would use to help the researchers answer their question.

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

這一題的完整詳解

本題為題組題,承接前文情境:研究者執行一項探討「吸菸是否導致癌症(if smoking causes cancer)」的大樣本研究,蒐集之變數包含體重(連續型)、吸菸狀態(Ever-smoker vs. Never-smoker,二元類別)以及罹癌狀態(Yes vs. No,二元類別)。

(1) 比較兩組不同癌症狀態者(Cancer: Yes vs. No)的體重:

  • 因體重為連續型隨機變數,群體為兩獨立二元組別,直接用於量化組間中心位置差異之標準指標為兩組「樣本平均數之差(Difference in sample means, XˉYes−XˉNo\bar{X}_{\text{Yes}} - \bar{X}_{\text{No}})」。
  • 當資料存在極端值或顯著偏態時,亦常輔以穩健統計量「中位數之差(Difference in medians)」。兩者均能直接量化組間體重差距。

(2) 評估吸菸狀態與罹癌關聯性之指標:

  • 研究的核心問題為吸菸是否導致癌症,涉及兩個二元類別變數(暴露變數:吸菸狀態;結局變數:罹癌狀態)。
  • 在流行病學與醫學統計中,評估暴露與疾病關聯強度的經典指標為:
  1. 風險比(Risk Ratio, RR,亦稱相對危險度 Relative Risk):即吸菸組罹癌率相較於不吸菸組罹癌率之比值:
🔒

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

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

免費註冊

第 4 題20 分

  1. (20%) Suppose the number of samples in the researchers' data in each category is summarized in the following table.
Ever SmokerNever-Smoker
Cancer Status Yes60205792
Cancer Status No1398324109

(1) (5%) Calculate an estimate of your proposed measure in 3. (2).
(2) (10%) Derive an approximate distribution of the estimator in 4. (1).
(3) (5%) Comment and explain: how well the distribution you derive in 4. (2) approximates the exact distribution.

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

這一題的完整詳解

【答案】
(1) 估計值:

  • 若指標為風險比(RR),估計值約為 RR^≈1.5537\widehat{RR} \approx 1.5537。
  • 若指標為勝算比(OR),估計值約為 OR^≈1.7920\widehat{OR} \approx 1.7920。
    (2) 漸近分配推導:
    依中央極限定理與 Delta 方法(Delta method),其對數尺度之漸近常態分配為:
  • ln⁡(RR^)∼AN(ln⁡(RR), 0.0002553)\ln(\widehat{RR}) \sim AN\left(\ln(RR), \, 0.0002553\right),標準誤 SE≈0.01598SE \approx 0.01598;原估計量 RR^\widehat{RR} 近似服從對數常態分配 Lognormal\text{Lognormal}。
  • ln⁡(OR^)∼AN(ln⁡(OR), 0.0004518)\ln(\widehat{OR}) \sim AN\left(\ln(OR), \, 0.0004518\right),標準誤 SE≈0.02126SE \approx 0.02126;原估計量 OR^\widehat{OR} 近似服從對數常態分配 Lognormal\text{Lognormal}。
    (3) 近似程度評價:
    因總樣本數龐大(N=49904N = 49904),各單元格觀察頻數均在數千人以上(最小單元格亦達 5792),比例無極端值,對數轉換更有效消除偏態,故大樣本常態近似效果極佳。

詳解

本題基於 2×22 \times 2 列聯表數據進行關聯性量度估計、漸近分配推導及近似性評估。
列聯表整理:

  • 曾吸菸組(Ever Smoker, ES):罹癌 n11=6020n_{11} = 6020,未罹癌 n12=13983n_{12} = 13983,總人數 n1=20003n_1 = 20003
  • 未吸菸組(Never Smoker, NS):罹癌 n21=5792n_{21} = 5792,未罹癌 n22=24109n_{22} = 24109,總人數 n2=29901n_2 = 29901
  • 總樣本數 N=49904N = 49904

(1) 計算指標之估計值:

  1. 風險比(Risk Ratio, RR):
    兩組的樣本罹癌率分別為:
p^1=n11n1=602020003≈0.300955,p^2=n21n2=579229901≈0.193706\hat{p}_1 = \frac{n_{11}}{n_1} = \frac{6020}{20003} \approx 0.300955, \quad \hat{p}_2 = \frac{n_{21}}{n_2} = \frac{5792}{29901} \approx 0.193706 RR^=p^1p^2=0.3009550.193706≈1.55367≈1.5537\widehat{RR} = \frac{\hat{p}_1}{\hat{p}_2} = \frac{0.300955}{0.193706} \approx 1.55367 \approx 1.5537
  1. 勝算比(Odds Ratio, OR):
OR^=n11n22n12n21=6020×2410913983×5792=14513618080989536≈1.7920\widehat{OR} = \frac{n_{11} n_{22}}{n_{12} n_{21}} = \frac{6020 \times 24109}{13983 \times 5792} = \frac{145136180}{80989536} \approx 1.7920

(2) 推導估計量之近似分配(Derivation of Approximate Distribution):
在統計理論中,比值型估計量直接取常態近似易受偏態影響,通常推導其對數轉換 ln⁡(RR^)\ln(\widehat{RR}) 與 ln⁡(OR^)\ln(\widehat{OR}) 之漸近常態分配。

  1. 對於 ln⁡(RR^)\ln(\widehat{RR}) 的推導(Delta 方法):
    由中央極限定理(CLT),因兩獨立二項抽樣,樣本比例滿足:
[p^1p^2]∼AN([p1p2], [p1(1−p1)n100p2(1−p2)n2])\begin{bmatrix} \hat{p}_1 \\ \hat{p}_2 \end{bmatrix} \sim AN\left( \begin{bmatrix} p_1 \\ p_2 \end{bmatrix}, \, \begin{bmatrix} \frac{p_1(1-p_1)}{n_1} & 0 \\ 0 & \frac{p_2(1-p_2)}{n_2} \end{bmatrix} \right)

定義轉換函數 g(p1,p2)=ln⁡(p1)−ln⁡(p2)=ln⁡(RR)g(p_1, p_2) = \ln(p_1) - \ln(p_2) = \ln(RR)。
計算梯度向量(一階偏微分):

∇g(p1,p2)=[∂g∂p1, ∂g∂p2]=[1p1, −1p2]\nabla g(p_1, p_2) = \left[ \frac{\partial g}{\partial p_1}, \, \frac{\partial g}{\partial p_2} \right] = \left[ \frac{1}{p_1}, \, -\frac{1}{p_2} \right]

依據多元 Delta 方法,ln⁡(RR^)=g(p^1,p^2)\ln(\widehat{RR}) = g(\hat{p}_1, \hat{p}_2) 的漸近變異數為:

Var(ln⁡(RR^))≈[∇g] Σ [∇g]T=(1p1)2p1(1−p1)n1+(−1p2)2p2(1−p2)n2=1−p1n1p1+1−p2n2p2\text{Var}(\ln(\widehat{RR})) \approx [\nabla g] \, \Sigma \, [\nabla g]^T = \left(\frac{1}{p_1}\right)^2 \frac{p_1(1-p_1)}{n_1} + \left(-\frac{1}{p_2}\right)^2 \frac{p_2(1-p_2)}{n_2} = \frac{1-p_1}{n_1 p_1} + \frac{1-p_2}{n_2 p_2}

代入樣本估計量可得估計變異數:

🔒

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

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

免費註冊

第 II.1 題10 分

II. The significance level is 0.05 for all questions in II unless otherwise specified.

  1. (10%) A market research firm estimates the proportion of adults in a city who have tablets, and they believe more than half of the adults in this city have tablets. A confidence interval for the population proportion of adults have tablets from a random sample of 400 adults is constructed. The lower limit is 0.5597 and the upper limit is 0.6403.
    (1) (5%) Determine the level of confidence used to construct the confidence interval.
    (2) (5%) If another random sample of 400 adults is taken, and 218 adults have tablets. To test the hypothesis if more than half of the adults in the city have tablets, what is the P-value and your conclusion?

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

這一題的完整詳解

(1) 求解信賴區間之信賴水準(Confidence Level):
已知樣本大小 n=400n = 400,母體比例之信賴區間為 [0.5597,0.6403][0.5597, 0.6403]。
樣本比例 p^\hat{p} 為區間之中點:

p^=0.5597+0.64032=1.20002=0.60\hat{p} = \frac{0.5597 + 0.6403}{2} = \frac{1.2000}{2} = 0.60

邊際誤差(Margin of Error, ME)為:

ME=0.6403−0.6000=0.0403ME = 0.6403 - 0.6000 = 0.0403

樣本比例之標準誤為:

SE(p^)=p^(1−p^)n=0.60×0.40400=0.24400=0.0006≈0.024495SE(\hat{p}) = \sqrt{\frac{\hat{p}(1-\hat{p})}{n}} = \sqrt{\frac{0.60 \times 0.40}{400}} = \sqrt{\frac{0.24}{400}} = \sqrt{0.0006} \approx 0.024495

由 ME=zα/2×SE(p^)ME = z_{\alpha/2} \times SE(\hat{p}),解臨界值 zα/2z_{\alpha/2}:

zα/2=0.04030.024495≈1.6452≈1.645z_{\alpha/2} = \frac{0.0403}{0.024495} \approx 1.6452 \approx 1.645

查標準常態分配表,z=1.645z = 1.645 對應的單尾尾端機率為 0.050.05。
因此 α/2=0.05  ⟹  α=0.10\alpha/2 = 0.05 \implies \alpha = 0.10。
所求信賴水準為 1−α=1−0.10=0.901 - \alpha = 1 - 0.10 = 0.90,即 90%。

(2) 新樣本之假設檢定:

  • 題目欲檢定該市擁有平板電腦的成人是否「超過半數(more than half)」:
    虛無假設:H0:p≤0.5H_0: p \le 0.5(母體比例小於或等於半數)
    對立假設:Ha:p>0.5H_a: p > 0.5(母體比例超過半數,右尾檢定)
    顯著水準:α=0.05\alpha = 0.05
  • 新樣本數據:n=400n = 400,擁有平板人數 x=218x = 218,樣本比例為:
p^new=218400=0.545\hat{p}_{\text{new}} = \frac{218}{400} = 0.545
  • 在虛無假設 p0=0.5p_0 = 0.5 下,標準誤為:
🔒

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

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

免費註冊

第 II.2 題10 分

II. The significance level is 0.05 for all questions in II unless otherwise specified.

  1. (10%) A doctor is studying whether walking leads to a reduction in systolic blood pressure (measured in mmHg). To answer the question, 9 volunteers began a one-week walking program. Their blood pressures were measured before and after the program and the data is as follows:
Subject123456789
before134122118130144125127133128
after131123122124139119124131130

(1) (5%) Suppose the doctor would like to see if the data support that walking for one week will reduce the systolic blood pressure. What is the test statistics and your conclusion?
(2) (5%) Construct a 95% confidence interval for the reduction in systolic blood pressure.

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

這一題的完整詳解

此題是關於配對樣本的假設檢定與信賴區間。

核心觀念:

  • 配對樣本檢定:當我們有兩組相關的觀察值(例如同一受試者前後的測量值)時,我們通常分析其差值。
  • 配對 t 檢定:用於檢定配對樣本的平均數差異是否顯著。
  • 信賴區間:用於估計平均數差異的範圍。

已知資訊:

  • 樣本大小 n=9n = 9 (9 位志願者)
  • 測量值為收縮壓 (Systolic Blood Pressure, SBP)
  • 資料包含「前」與「後」的測量值。

數據整理:
首先,我們計算每位受試者血壓的「差值」(Difference, D)。我們定義差值為: D=SBPbefore−SBPafterD = \text{SBP}_{\text{before}} - \text{SBP}_{\text{after}}。如果走路能降低血壓,我們預期差值 D 應為正值。

SubjectbeforeafterDifference (D)
11341313
2122123-1
3118122-4
41301246
51441395
61251196
71271243
81331312
9128130-2

計算差值 D 的樣本平均數 Dˉ\bar{D} 和樣本標準差 sDs_D。
∑D=3+(−1)+(−4)+6+5+6+3+2+(−2)=18\sum D = 3 + (-1) + (-4) + 6 + 5 + 6 + 3 + 2 + (-2) = 18
Dˉ=∑Dn=189=2.0\bar{D} = \frac{\sum D}{n} = \frac{18}{9} = 2.0

計算差值的平方和:
D2D^2: 9,1,16,36,25,36,9,4,49, 1, 16, 36, 25, 36, 9, 4, 4
∑D2=9+1+16+36+25+36+9+4+4=140\sum D^2 = 9 + 1 + 16 + 36 + 25 + 36 + 9 + 4 + 4 = 140

計算樣本標準差 sDs_D:
sD2=∑D2−(∑D)2nn−1=140−(18)299−1=140−32498=140−368=1048=13s_D^2 = \frac{\sum D^2 - \frac{(\sum D)^2}{n}}{n-1} = \frac{140 - \frac{(18)^2}{9}}{9-1} = \frac{140 - \frac{324}{9}}{8} = \frac{140 - 36}{8} = \frac{104}{8} = 13
sD=13≈3.6056s_D = \sqrt{13} \approx 3.6056

(1) 檢定血壓是否降低

  • 目的:檢定走路是否能降低收縮壓。

  • 虛無假設 (H0H_0):平均差值 μD≤0\mu_D \le 0 (走路不能降低血壓,或會升高)。

  • 對立假設 (H1H_1):平均差值 μD>0\mu_D > 0 (走路能降低血壓)。

  • 檢定類型:單尾 t 檢定 (右尾檢定),因為我們關心差值 D 是否顯著大於 0。

  • 顯著水準:α=0.05\alpha = 0.05。

  • 計算檢定統計量 (t-statistic):
    t=Dˉ−μD,0sD/nt = \frac{\bar{D} - \mu_{D,0}}{s_D / \sqrt{n}}
    在 H0H_0 下,μD,0=0\mu_{D,0} = 0。
    t=2.0−03.6056/9=2.03.6056/3=2.01.2019≈1.664t = \frac{2.0 - 0}{3.6056 / \sqrt{9}} = \frac{2.0}{3.6056 / 3} = \frac{2.0}{1.2019} \approx 1.664

  • 自由度 (degrees of freedom, df):df=n−1=9−1=8df = n - 1 = 9 - 1 = 8。

  • 計算 P-value:
    P-value 是在 H0H_0 為真時,觀察到 t≥1.664t \ge 1.664 的機率。
    P-value=P(tdf=8≥1.664)P\text{-value} = P(t_{df=8} \ge 1.664)。
    查閱 t 分佈表,對於 df=8df=8,當右尾機率為 0.05 時,臨界值 t0.05,8≈1.860t_{0.05, 8} \approx 1.860。
    由於我們的檢定統計量 t=1.664t = 1.664 小於臨界值 1.8601.860,我們無法拒絕 H0H_0。
    更精確地說,1.664 介於 t0.05,8=1.860t_{0.05, 8} = 1.860 和 t0.10,8=1.397t_{0.10, 8} = 1.397 之間。
    因此,P-value 介於 0.05 和 0.10 之間。
    P-value>0.05P\text{-value} > 0.05。

🔒

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

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

免費註冊

第 3 題10 分

  1. (10%) The data of a class of students on the days of the week they are absent is as follows:
DayMonTueWedThurFri
number of students absent1396814

The professor would like to know if the absence is equally likely to occur on any of the five days.
(1) (5%) Determine the test statistics for the hypothesis: the absence is equally likely to occur on any of the five days.
(2) (5%) What is the critical value for testing the hypothesis above? What is your conclusion?

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

這一題的完整詳解

本題探討類別資料之卡方適合度檢定(Chi-squared Goodness-of-Fit Test),用以檢定一週中五個工作天(週一至週五)之學生缺席次數是否符合均等分配。

一、核心觀念與假設檢定設定

  1. 假設建立:
    • 虛無假設 H0H_0:缺席在一週五天中均等發生,即 p1=p2=p3=p4=p5=15p_1 = p_2 = p_3 = p_4 = p_5 = \frac{1}{5}。
    • 對立假設 H1H_1:缺席機率在五天中不完全均等(至少有一天之機率不等於 15\frac{1}{5})。
  2. 檢定統計量公式:
    卡方適合度檢定統計量為:
χ2=∑i=1k(Oi−Ei)2Ei\chi^2 = \sum_{i=1}^{k} \frac{(O_i - E_i)^2}{E_i}

其中 kk 為類別數,OiO_i 為各類別之觀察次數,Ei=N×piE_i = N \times p_i 為虛無假設下之期望次數。
3. 自由度:
df=k−1−mdf = k - 1 - m。因未估計任何未知母數(m=0m = 0),自由度為 df=5−1=4df = 5 - 1 = 4。

二、(1) 計算檢定統計量

  • 總觀察人數 N=13+9+6+8+14=50N = 13 + 9 + 6 + 8 + 14 = 50。
  • 在 H0H_0 成立下,週一至週五各天的期望缺席人數均為:
Ei=Nk=505=10(i=1,2,3,4,5)E_i = \frac{N}{k} = \frac{50}{5} = 10 \quad (i = 1, 2, 3, 4, 5)
  • 各天觀察次數分別為 OMon=13O_{\text{Mon}} = 13、OTue=9O_{\text{Tue}} = 9、OWed=6O_{\text{Wed}} = 6、OThur=8O_{\text{Thur}} = 8、OFri=14O_{\text{Fri}} = 14。
  • 計算卡方值:
χ2=(13−10)210+(9−10)210+(6−10)210+(8−10)210+(14−10)210\chi^2 = \frac{(13-10)^2}{10} + \frac{(9-10)^2}{10} + \frac{(6-10)^2}{10} + \frac{(8-10)^2}{10} + \frac{(14-10)^2}{10} χ2=32+(−1)2+(−4)2+(−2)2+4210=9+1+16+4+1610=4610=4.6\chi^2 = \frac{3^2 + (-1)^2 + (-4)^2 + (-2)^2 + 4^2}{10} = \frac{9 + 1 + 16 + 4 + 16}{10} = \frac{46}{10} = 4.6

故檢定統計量為 χ2=4.6\chi^2 = 4.6。

三、(2) 臨界值與統計推論結論

  1. 臨界值查表:
    題目未指定顯著水準,依照統計慣例取 α=0.05\alpha = 0.05。查卡方分配表可得自由度 df=4df = 4 之右尾臨界值:
🔒

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

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

免費註冊

第 4 題10 分

  1. (10%) We randomly selected 36 males and 25 females and compared the average time (in hours) they spent watching TV every day. The data are as follows:
meanstandard deviation
males1.60.8
females1.40.7

(1) (5%) To test if the average time spent watching TV is equal between male and female, what is the test statistics? Assume that the variance of time spent watching TV is equal for male and female.
(2) (5%) To test if the variance of time spent watching TV is equal for male and female, what is the test statistics and what is your conclusion?

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

這一題的完整詳解

此題包含兩個獨立的假設檢定:比較兩個獨立樣本的平均數,以及比較兩個獨立樣本的變異數。

核心觀念:

  • 獨立樣本 t 檢定 (Independent Samples t-test):用於比較兩個獨立群體的平均數。當變異數相等時,使用合併變異數 (pooled variance) 的 t 檢定。
  • F 檢定 (F-test for Equality of Variances):用於比較兩個獨立群體的變異數。

已知資訊:

  • 男性樣本:n1=36n_1 = 36, xˉ1=1.6\bar{x}_1 = 1.6, s1=0.8s_1 = 0.8
  • 女性樣本:n2=25n_2 = 25, xˉ2=1.4\bar{x}_2 = 1.4, s2=0.7s_2 = 0.7

(1) 檢定平均時間是否相等 (假設變異數相等)

  • 目的:檢定男性和女性每天看電視的平均時間是否相等。

  • 虛無假設 (H0H_0):μ1=μ2\mu_1 = \mu_2 (或 μ1−μ2=0\mu_1 - \mu_2 = 0)。

  • 對立假設 (H1H_1):μ1≠μ2\mu_1 \neq \mu_2 (雙尾檢定)。

  • 假設:σ12=σ22\sigma_1^2 = \sigma_2^2 (變異數相等)。

  • 計算合併變異數 (sp2s_p^2):
    當假設變異數相等時,我們使用合併變異數來估計共同的變異數。
    sp2=(n1−1)s12+(n2−1)s22n1+n2−2s_p^2 = \frac{(n_1-1)s_1^2 + (n_2-1)s_2^2}{n_1+n_2-2}
    sp2=(36−1)(0.82)+(25−1)(0.72)36+25−2s_p^2 = \frac{(36-1)(0.8^2) + (25-1)(0.7^2)}{36+25-2}
    sp2=35×0.64+24×0.4959s_p^2 = \frac{35 \times 0.64 + 24 \times 0.49}{59}
    sp2=22.4+11.7659=34.1659≈0.57898s_p^2 = \frac{22.4 + 11.76}{59} = \frac{34.16}{59} \approx 0.57898

  • 計算檢定統計量 (t-statistic):
    t=(xˉ1−xˉ2)−(μ1−μ2)0sp2(1n1+1n2)t = \frac{(\bar{x}_1 - \bar{x}_2) - (\mu_1 - \mu_2)_0}{\sqrt{s_p^2 (\frac{1}{n_1} + \frac{1}{n_2})}}
    在 H0H_0 下,(μ1−μ2)0=0(\mu_1 - \mu_2)_0 = 0。
    t=(1.6−1.4)−00.57898(136+125)t = \frac{(1.6 - 1.4) - 0}{\sqrt{0.57898 (\frac{1}{36} + \frac{1}{25})}}
    t=0.20.57898(0.02778+0.04000)t = \frac{0.2}{\sqrt{0.57898 (0.02778 + 0.04000)}}
    t=0.20.57898×0.06778t = \frac{0.2}{\sqrt{0.57898 \times 0.06778}}
    t=0.20.03924t = \frac{0.2}{\sqrt{0.03924}}
    t=0.20.1981≈1.0096t = \frac{0.2}{0.1981} \approx 1.0096

檢定統計量為約 1.010。

(2) 檢定變異數是否相等

  • 目的:檢定男性和女性每天看電視時間的變異數是否相等。

  • 虛無假設 (H0H_0):σ12=σ22\sigma_1^2 = \sigma_2^2。

  • 對立假設 (H1H_1):σ12≠σ22\sigma_1^2 \neq \sigma_2^2 (雙尾檢定)。

  • 計算檢定統計量 (F-statistic):
    F 檢定的統計量是兩個樣本變異數的比值。通常將較大的變異數放在分子。
    s12=0.82=0.64s_1^2 = 0.8^2 = 0.64
    s22=0.72=0.49s_2^2 = 0.7^2 = 0.49
    由於 s12>s22s_1^2 > s_2^2,我們將 s12s_1^2 放在分子。

🔒

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

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

免費註冊

第 5 題10 分

  1. (10%) A manager wants to test if different packaging (A, B, C, D) have an effect on coffee beans sale at supermarket. She randomly assigns each supermarket to one of the 4 packages and records packs of coffee beans sold in a one-week period. The average coffee beans sold for all supermarkets in the week is 53 packs, and sum of square total (SST) is 1624.
packagingnumber of supermarketsmeanvariance
A94823.50
B95039.00
C85620.86
D85944.57

The average coffee beans sold for all supermarkets in the week is 53 packs, and sum of square total (SST) is 1624.
(1) (5%) What is the sum of square between (among)?
(2) (5%) What is the test statistics for testing the hypothesis: there is no difference in sales of coffee beans for 4 different packaging? What is your conclusion?

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

這一題的完整詳解

此題是關於單因子變異數分析 (One-Way ANOVA)。

核心觀念:

  • ANOVA:用於比較三個或以上群體的平均數。
  • 平方和 (Sum of Squares):
    • 總平方和 (SST, Total Sum of Squares):衡量總體數據的總變異。
    • 組間平方和 (SSB, SS Between, SS Among):衡量各組平均數與總平均數之間差異的變異。
    • 組內平方和 (SSW, SS Within, SSE, SS Error):衡量各組內部數據的變異。
    • 關係:SST=SSB+SSWSST = SSB + SSW。
  • F 檢定:用於檢定各組平均數是否相等。

已知資訊:

  • 群體數 k=4k = 4 (包裝 A, B, C, D)
  • 總樣本數 N=nA+nB+nC+nD=9+9+8+8=34N = n_A + n_B + n_C + n_D = 9 + 9 + 8 + 8 = 34
  • 總平均數 xˉTotal=53\bar{x}_{Total} = 53
  • 總平方和 SST=1624SST = 1624

各組資訊:

Packagingnin_ixˉi\bar{x}_isi2s_i^2 (variance)
A94823.50
B95039.00
C85620.86
D85944.57

(1) 計算組間平方和 (SSB)

  • 公式:
    SSB=∑i=1kni(xˉi−xˉTotal)2SSB = \sum_{i=1}^{k} n_i (\bar{x}_i - \bar{x}_{Total})^2
    其中 nin_i 是第 i 組的樣本數,xˉi\bar{x}_i 是第 i 組的樣本平均數,xˉTotal\bar{x}_{Total} 是總平均數。

  • 計算:
    SSB=9×(48−53)2+9×(50−53)2+8×(56−53)2+8×(59−53)2SSB = 9 \times (48 - 53)^2 + 9 \times (50 - 53)^2 + 8 \times (56 - 53)^2 + 8 \times (59 - 53)^2
    SSB=9×(−5)2+9×(−3)2+8×(3)2+8×(6)2SSB = 9 \times (-5)^2 + 9 \times (-3)^2 + 8 \times (3)^2 + 8 \times (6)^2
    SSB=9×25+9×9+8×9+8×36SSB = 9 \times 25 + 9 \times 9 + 8 \times 9 + 8 \times 36
    SSB=225+81+72+288SSB = 225 + 81 + 72 + 288
    SSB=666SSB = 666

組間平方和 (SSB) 為 666。

  • 驗算:
    我們也可以計算組內平方和 (SSW) 來驗證。
    SSW=∑i=1k(ni−1)si2SSW = \sum_{i=1}^{k} (n_i - 1) s_i^2
    SSW=(9−1)×23.50+(9−1)×39.00+(8−1)×20.86+(8−1)×44.57SSW = (9-1) \times 23.50 + (9-1) \times 39.00 + (8-1) \times 20.86 + (8-1) \times 44.57
    SSW=8×23.50+8×39.00+7×20.86+7×44.57SSW = 8 \times 23.50 + 8 \times 39.00 + 7 \times 20.86 + 7 \times 44.57
    SSW=188+312+146.02+311.99SSW = 188 + 312 + 146.02 + 311.99
    SSW≈958.01SSW \approx 958.01

    根據 SST=SSB+SSWSST = SSB + SSW:
    1624≈666+958.01=1624.011624 \approx 666 + 958.01 = 1624.01
    這個結果非常接近,顯示我們的 SSB 計算是正確的。

(2) 計算 F 檢定統計量與得出結論

  • 目的:檢定不同包裝的咖啡豆銷售量平均值是否存在顯著差異。
  • 虛無假設 (H0H_0):μA=μB=μC=μD\mu_A = \mu_B = \mu_C = \mu_D (所有包裝的平均銷售量相等)。
  • 對立假設 (H1H_1):至少有一個包裝的平均銷售量與其他不同。
  • 顯著水準:題目未指定,通常預設為 α=0.05\alpha = 0.05。
🔒

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

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

免費註冊

其他考古題