112 年 國立清華大學計量財務金融研究所財務金融組《統計學》
第 1 題20 分
- The probability that a person has a certain disease is 0.05. Medical diagnostic tests are available to determine whether the person actually has the disease. If the disease is actually present, the probability that the medical diagnostic test will give a positive result (indicating that the disease is present) is 0.85. If the disease is not actually present, the probability of a positive test result (indicating that the disease is present) is 0.03. Suppose that the medical diagnostic test has given a positive result (indicating that the disease is present). What is the probability that the disease is actually present? (20%)
登入後即可作答並保存紀錄。
此題考驗貝氏定理(Bayes' Theorem)的應用,主要在於計算後驗機率。
設 D 為該人患有此疾病的事件,D' 為該人未患有此疾病的事件。
設 T 為醫學診斷測試結果為陽性的事件。
根據題目敘述,我們有以下機率:
P(D) = 0.05 (患有此疾病的先驗機率)
P(D') = 1 - P(D) = 1 - 0.05 = 0.95 (未患有此疾病的先驗機率)
P(T|D) = 0.85 (若疾病存在,測試結果為陽性的機率,即靈敏度)
P(T|D') = 0.03 (若疾病不存在,測試結果為陽性的機率,即假陽性率)
題目要求計算的是,在測試結果為陽性的條件下,該人實際上患有此疾病的機率,即 P(D|T)。
根據貝氏定理:
我們需要先計算 P(T),即測試結果為陽性的總機率。根據全機率法則(Law of Total Probability):
第 2 題20 分
- (20%) A coin-operated soft-drink machine is designed to discharge at least 8 ounces of beverage per cup, with a standard deviation of 0.16 ounce. If you select a random sample of 36 cups and you are willing to have an risk of committing a Type I error, compute the probability of a Type II error if the population mean amount dispensed is actually 7.9 ounces per cup. (20%)
登入後即可作答並保存紀錄。
此題考驗假設檢定中第一類錯誤與第二類錯誤的機率計算,特別是第二類錯誤的機率 。
首先,我們需要設定虛無假設 和對立假設 。
題目提到機器設計為「至少 8 盎司」(at least 8 ounces),這表示我們檢定的目標是平均量是否達到 8 盎司。
所以,虛無假設應設定為平均量等於或大於 8 盎司,而對立假設為平均量小於 8 盎司。
(或寫成 ,因為檢定時通常以等號為界)
這是一個左尾檢定(left-tailed test)。
已知資訊:
母體標準差 盎司 (題目未明確說明是母體標準差還是樣本標準差,但通常在這種情境下,若未提及樣本標準差,且樣本數較大,常 Assume 為母體標準差,或者題目可能意指母體標準差已知。若為樣本標準差,則應使用 t-test。但由於題目給了 且要求計算 Type II error,通常涉及 Z-score,暗示 已知或可用樣本標準差近似。)
樣本大小
第一類錯誤的機率
在實際情況下,母體平均值 盎司。
第一步:確定拒絕域 (Rejection Region)
我們進行左尾檢定,顯著水準為 。
由於樣本數 ,我們可以根據中央極限定理使用 Z-檢定。
拒絕域為 。
查標準常態分配表,當 時,。
因此,若檢定統計量 ,則拒絕 。
檢定統計量公式為:
其中 是虛無假設下的母體平均值,在此為 8。
拒絕域的條件 值:
所以,若樣本平均數 ,則拒絕 。
第二步:計算第二類錯誤的機率
第二類錯誤是指當對立假設 為真時,我們卻未能拒絕虛無假設 。
在本題中,第二類錯誤發生於:
- 實際母體平均值為 (即 為真)。
第 3 題20 分
- (20%) The following table shows the joint distribution of two discrete random variables, X and Y.
| Y=-2 | Y=0 | Y=2 | |
|---|---|---|---|
| X=-1 | 0 | 0.1 | 0.2 |
| X=0 | 0 | 0.2 | 0.1 |
| X=3 | 0.3 | 0.1 | 0 |
Compute the correlation coefficient between and . (20%)
登入後即可作答並保存紀錄。
此題考驗計算兩個離散隨機變數相關係數的能力,並涉及變數的線性轉換。
相關係數 的定義為:
其中 是 X 和 Y 的共變異數, 和 分別是 X 和 Y 的標準差。
題目要求計算的是 和 這兩個新變數之間的相關係數。
設 且 。
我們需要計算 。
一個重要的性質是,對變數進行線性轉換,並不會改變它們之間的相關性。
也就是說,對於任意常數 ,其中 ,隨機變數 與 的相關係數為:
如果 和 同號 (都為正或都為負),則 ,所以 。
如果 和 異號,則 ,所以 。
在本題中, (), ()。因為 和 都是正數,所以:
因此,我們只需要計算 X 和 Y 的相關係數 。
要計算 ,我們需要計算 、 和 。
1. 計算邊際機率分佈 (Marginal Probability Distributions)
X 的邊際機率分佈:
(檢查總和:0.3 + 0.3 + 0.4 = 1.0)
Y 的邊際機率分佈:
(檢查總和:0.3 + 0.4 + 0.3 = 1.0)
2. 計算期望值 E(X) 和 E(Y)
3. 計算 和
4. 計算變異數 和
第 4 題20 分
- The following information is available for two samples selected from independent populations: (At the 0.05 level of significance)
Sample 1: n1 = 4, 3, 5, 6, 11, 7, 8.2, 9.1, 12, 14, 14.5
Sample 2: n2 = 9, 10.3, 12.5, 16.7, 18, 6.3, 11.5, 2, 12.4, 19.3, 21.5
Replace the observed values with the corresponding ranks (where smallest value=1; largest value= n = n1 + n2) in the combined samples. At the 0.05 level of significance, is there evidence of a difference in the median waiting time between the two samples? (Since both of the sample sizes are greater than 10, use the large-sample Z approximation formula) (20%)
登入後即可作答並保存紀錄。
核心觀念
- 本題檢驗的是兩個獨立樣本的中位數是否相同,屬於 Wilcoxon (Mann‑Whitney) 排名和檢定。
- 當兩樣本皆 > 10 時,可用 大樣本 Z 近似:
其中
解題方法
- 合併樣本並排序(最小值 rank = 1,最大值 rank = )。
- 計算樣本 1 的秩和 ,再求其 Mann‑Whitney 。
- 用 計算 Z 值,與標準正態臨界值 比較(雙側檢定),決定是否拒絕原假設 兩樣本中位數相等。
以下列出完整步驟與計算。
1. 排名 (Rank)
| 級別 | 原始值 | 所屬樣本 | Rank |
|---|---|---|---|
| 1 | 2 | Sample 2 | 1 |
| 2 | 3 | Sample 1 | 2 |
| 3 | 4 | Sample 1 | 3 |
| 4 | 5 | Sample 1 | 4 |
| 5 | 6 | Sample 1 | 5 |
| 6 | 6.3 | Sample 2 | 6 |
| 7 | 7 | Sample 1 | 7 |
| 8 | 8.2 | Sample 1 | 8 |
| 9 | 9 | Sample 2 | 9 |
| 10 | 9.1 | Sample 1 | 10 |
| 11 | 10.3 | Sample 2 | 11 |
| 12 | 11 | Sample 1 | 12 |
| 13 | 11.5 | Sample 2 | 13 |
| 14 | 12 | Sample 1 | 14 |
| 15 | 12.4 | Sample 2 | 15 |
| 16 | 12.5 | Sample 2 | 16 |
| 17 | 14 | Sample 1 | 17 |
| 18 | 14.5 | Sample 1 | 18 |
| 19 | 16.7 | Sample 2 | 19 |
| 20 | 18 | Sample 2 | 20 |
| 21 | 19.3 | Sample 2 | 21 |
| 22 | 21.5 | Sample 2 | 22 |
(無相同值,故無需平分秩)
2. 樣本 1 的秩和
樣本 2 的秩和 。
3. 計算 Mann‑Whitney U
檢定統計量取較小者 。
第 5 題20 分
- Suppose two professors wanted to study how students from their two universities (A and B) compared in their capabilities of using Excel spreadsheets in undergraduate information systems courses. A comparison of the student demographics was also performed. The following table contains information regarding the ages of the students:
| School | Sample size | Mean | Standard deviation |
|---|---|---|---|
| A | 9 | 23.23 | 2.23 |
| B | 13 | 21.12 | 1.54 |
a. Compute the whole sample variation. (5%)
b. To test for a difference in the mean age of students, is it most appropriate to use the pooled-variance t test or the separate-variance t test? Use the most appropriate test to determine, at the 0.05 level of significance, whether there is evidence of a difference in the mean years of spreadsheet usage of students at A school and at B school.(15%)
登入後即可作答並保存紀錄。
核心觀念
- 合併變異數(Pooled Variance)與全體樣本變異數:
在兩獨立常態母體變異數相等()假設下,合併變異數為:
若將兩樣本直接合併為單一樣本計算總變異數,則須加上組間平方和 再除以總自由度 。 - 兩獨立樣本平均數差異檢定之選用準則:
先檢驗兩母體變異數是否齊一( 檢定或比較樣本標準差/變異數比值)。若無法拒絕變異數相等假設,應採用合併變異數 檢定(Pooled-variance -test)以獲得較高檢定力。
解題方法
a. 計算樣本變異數
已知 ;。
- 組內平方和:
- 合併變異數(供後續合併變異數 檢定使用):
- (註:若依「全體合併樣本」總變異數計算,組間平方和 ,總平方和 ,全體樣本變異數 。)
b. 檢定方法選擇與假設檢定(依題意對「平均年齡」進行檢定)
- 變異數齊一性檢驗:
在 雙尾檢定下,臨界值 。因 (且兩樣本標準差比值 ),不拒絕 ,故採用合併變異數 檢定最為適當。 - 設立假設: