110 年 國立政治大學金融學系碩士班金融科技組《統計學B》
第 1 題
In a survey of 300 visitors, 165 responded that they prefer to go to the beach and 135 responded that they prefer to stay in their hotels. Let denote the fraction of all visitors who prefer to go to the beach and be the cumulative probability density function of the standard normal distribution. The approximate -value for the test versus in terms of is (1). If the true is 0.6 and the significance level , the power of this test in terms of is (2).
登入後即可作答並保存紀錄。
此題考驗假設檢定中 -value 的計算以及檢定力的概念。
(1) 計算 -value:
樣本比例 。
檢定統計量為 ,其中 。
。
-value 是當 為真時,觀察到比目前的檢定統計量更極端的結果(在此為大於)的機率。
-value 。
因此,(1) 的答案是 。
(2) 計算檢定力 (Power):
檢定力是當對立假設 為真時,正確拒絕虛無假設 的機率。
顯著水準 。
在 下,拒絕區域為 ,其中 滿足 ,即 。
因此,拒絕區域為 。
當 為真時,真實比例 。
檢定統計量為 。
檢定力 。
將 表示為 的函數:。
所以,檢定力 。
。
然而,題目要求以 表示。
臨界值 。
檢定力
。
更精確的計算:
臨界值 。
檢定力
。
因此,(2) 的答案是 的反向,即 。
第 2 題
Let X be the number of weeks before the prices change in a grocery store and p be the probability of updating the prices in a given week. The pricing decision is independent between any two weeks. If the distribution of X is described by
where . The average duration of prices in this store is (3) if .
登入後即可作答並保存紀錄。
核心觀念
- 本題的機率質點 為 幾何分配(Geometric distribution) 的特例:
- 當 時,常數因子 變成 ,其餘部分僅與 的次方有關,正好是「從第 1 週開始」的幾何分配。
- 幾何分配的期望(平均值)公式:
其中 必須是 每週發生日的機率,而在本題的參數化下
解題方法
- 確認分配的正規化
令
當 時
檢查歸一化:
故確實為合法機率質點。
- 寫出期望的級數
- 利用幾何級數的導數或已知公式
常用公式
第 3 題
Let X and Y be two random variables where , , , and their correlation is . If where and are constants, then , and .
登入後即可作答並保存紀錄。
此題考驗條件期望、條件變異數以及相關概念。
我們有 。
根據條件期望的性質,。
(式 1)
另外,我們知道 。
首先計算 。
。
。
所以,。
。
。 (式 2)
我們還需要求出 的值。
我們知道 。
另外,。
。
我們也知道 。
所以,。
還有一個重要的關係:
。
。
。
。
我們也可以從 來推導 。
兩邊同時對 取期望值:。
兩邊同時乘以 再取期望值:。
。
。
從 ,可以解出 。
第 4 題
Let X be a random variable with the distribution
where and . If , the probability density function of Y is (7) and , where is a positive integer.
登入後即可作答並保存紀錄。
核心觀念
本題考查三個重點:
- Gamma 分配的機率密度函數。
- 隨機變數單調轉換的密度函數公式。
- Gamma 函數積分與負次方動差。
題目中的密度係數應視為標準 Gamma 分配的形式:
因此 ,其中 為形狀參數, 為尺度參數。題目原式的 應為排版或轉錄錯誤,否則密度一般無法積分為 。
解題方法一:求 的機率密度函數
因為 ,所以 。由
可反解得
其導數為
因此雅可比絕對值為
單調轉換公式為
代入 :
所以
且 時,。這是 inverse-gamma distribution(逆 Gamma 分配)的密度函數。
解題方法二:求
由 ,可得
因此
依照期望值定義:
第 5 題
Let X be a random variable with the distribution , where and . Let and , where . The statistic S converges in probability to (9) and converges in distribution to (10).
登入後即可作答並保存紀錄。
此題考驗 Beta 分布的期望值、大數法則 (Law of Large Numbers) 和中央極限定理 (Central Limit Theorem)。
首先,題目給定的 PDF 是 ,其中 且 。
我們需要驗證這是否是一個有效的 PDF。
(假設 )。
所以,這是一個有效的 PDF。
這個分布是 Beta 分布的一個特例。標準的 Beta 分布 PDF 是:
for 。
在我們的題目中,如果令 且 ,則 PDF 是:
。
所以,這個分布是 Beta(, 1) 分布。
(9) 根據大數法則 (Law of Large Numbers),樣本均值 依機率收斂於母體期望值 。
我們需要計算 Beta(, 1) 分布的期望值。
。
。
所以,。
根據大數法則,統計量 依機率收斂於 。
所以,(9) 的答案是 。
(10) 根據中央極限定理 (Central Limit Theorem),對於獨立且同分布的隨機變數 ,樣本均值 的標準化變數 依分布收斂於標準常態分布 。
第 6 題
Consider a linear model where . The maximum likelihood estimator and the maximized log likelihood in terms of the residual is (12).
登入後即可作答並保存紀錄。
此題考驗線性迴歸模型下的最大概似估計 (Maximum Likelihood Estimation, MLE)。
模型為 ,其中 。
這意味著 。
假設我們有 個觀測值 。
則 的條件機率密度函數為:
。
概似函數 (Likelihood function) 是所有觀測值條件機率密度的乘積(假設獨立性):
。
。
對數概似函數 (Log-likelihood function) :
。
(11) 求 ,最大化 對於 。
我們只需要關注包含 的部分:。
最大化這個式子等同於最小化 。
這正是普通最小平方法 (Ordinary Least Squares, OLS) 的目標函數。
令 。
對 對 微分並令其為零:
。
。
。
。
。
。
這個 MLE 估計量與 OLS 估計量是相同的,前提是迴歸式中包含截距項。
在這個模型 中,相當於一個沒有截距項的迴歸,或者說截距項為 0。
如果模型是 ,則 MLE 估計量會更複雜。
在這個問題中,模型是 ,這是一個單參數模型。
(11) 的答案是 。
(12) 最大化對數概似函數。
我們已經有 。
我們已經找到使對數概似函數對 最大化的 。
現在我們需要找到使對數概似函數對 最大化的 。
第 7 題
Consider a linear model where but and the distribution of are unknown. The method of moments estimator for is (13) and an appropriate estimator for in this case is (14).
登入後即可作答並保存紀錄。
核心觀念
本題考查:
- 方法矩估計法(method of moments)。
- 樣本平均數對母體平均數的估計。
- 母體變異數的樣本估計,以及分母應使用 或 的區別。
模型為
且
因此
也就是說,觀察值 的母體平均數就是欲估計的參數 。
解題方法
設共有 個觀察值 。
由於
方法矩估計法將樣本一階動差
與母體一階動差 相等,得到
因此, 的方法矩估計量為樣本平均數。
令
因為 ,所以
若 已知,變異數可由
估計。然而本題中的 未知,必須以 代替,因此得到樣本變異數形式
這是直接依照方法矩「以估計值代入未知參數」所得到的估計量。
若題目要求無偏估計量,則應使用自由度修正:
第 8 題
Consider a time series where . Its long-run variance is (15) and the first-order autocorrelation function is (16). Consider another process . The range of that ensures the stationarity of this process is (17).
登入後即可作答並保存紀錄。
此題考驗時間序列模型(AR(1) 和 AR(2))的平穩性條件、長期變異數和自相關係數。
首先看第一個模型:,其中 。
這是一個 AR(1) 模型,參數為 。
(15) 長期變異數 (Long-run variance)。
對於一個平穩時間序列,其變異數是固定的。
對於 AR(1) 模型 ,如果 則模型是平穩的。
此時,變異數 。
我們有 。
如果平穩,則 。所以 。
。
。
。
由於 與 是獨立的(如果模型平穩),則 。
所以,。
。
。
這就是長期變異數。
(16) 第一階自相關係數 (First-order autocorrelation function, ACF)。
ACF 定義為 。
我們需要計算 。
第 9 題
The table below displays twenty actual observations of a binary variable Y and the predicted probability Pr (Y = 1|X) using a set of variable X.
Actual
1
1
0
1
0
0
1
0
0
0
Predicted 0.58 0.42 0.12 0.85 0.72 0.08 0.81 0.24 0.61 0.03
Actual
1
1
0
1
0
0
1
0
0
1
Predicted 0.02 0.75 0.33 0.69 0.38 0.59 0.39 0.27 0.17 0.75
The odds of Y = 1 relative to Y = 0 is (18). Given the criterion and otherwise, the percent of correct prediction is (19), and the coordinate on the receiver operating characteristic (ROC) curve is (20).
登入後即可作答並保存紀錄。
核心觀念
- 機率與勝算 (odds):
勝算是事件發生的機率除以不發生的機率,
- 二元分類的決策門檻:
預測機率 若 則決策為 ,否則為 。 - 正確率 (accuracy):
- ROC 曲線座標:
- 真陽性率 (TPR, sensitivity) 。
- 偽陽性率 (FPR) 。
在門檻 時的 即為 ROC 曲線上一點。
解題方法與關鍵步驟
| # | 實際 | 預測機率 | 判斷 () | 正確與否 |
|---|---|---|---|---|
| 1 | 1 | 0.58 | 1 | ✔ |
| 2 | 1 | 0.42 | 0 | ✘ |
| 3 | 0 | 0.12 | 0 | ✔ |
| 4 | 1 | 0.85 | 1 | ✔ |
| 5 | 0 | 0.72 | 1 | ✘ |
| 6 | 0 | 0.08 | 0 | ✔ |
| 7 | 1 | 0.81 | 1 | ✔ |
| 8 | 0 | 0.24 | 0 | ✔ |
| 9 | 0 | 0.61 | 1 | ✘ |
| 10 | 0 | 0.03 | 0 | ✔ |
| 11 | 1 | 0.02 | 0 | ✘ |
| 12 | 1 | 0.75 | 1 | ✔ |
| 13 | 0 | 0.33 | 0 | ✔ |
| 14 | 1 | 0.69 | 1 | ✔ |
| 15 | 0 | 0.38 | 0 | ✔ |
| 16 | 0 | 0.59 | 1 | ✘ |
| 17 | 1 | 0.39 | 0 | ✘ |
| 18 | 0 | 0.27 | 0 | ✔ |
| 19 | 0 | 0.17 | 0 | ✔ |
| 20 | 1 | 0.75 | 1 | ✔ |
- 勝算 (第 18 題)
- 總樣本數 。
- 的次數 , 的次數 。