108 年 國立中央大學工業管理研究所碩士班《統計學》
第 1 題
- Consider a stochastic activity network as shown in Figure 1 with five activities, A1, ..., A5. Node S denotes project starting and node F denotes project completion. The directed arrows in a stochastic activity network denote not only activities but also precedence constraints. The precedence constraints are as follows. A2 and A3 can only be started after A1 is completed, and A5 can only be started after A3 and A4 are completed. The project is completed after all five activities are completed. Let denote the independent duration of activity , , and let denote the earliest completion time of node . Our goal is to compute the marginal distribution of the earliest completion time of the project. We will assume that each activity will be started as soon as possible (after completion of all preceding activities). Also, we assume that .
🖼️【此處有附圖,請對照原卷】
(a) Express in terms of and (5 points)
(b) Determine the conditional CDF of given (10 points)
(c) Determine the conditional CDF of given and (5 points)
(d) Express in terms of and (5 points)
(e) Determine the conditional CDF of given (10 points)
登入後即可作答並保存紀錄。
核心觀念
本題屬於隨機作業網路(Stochastic Activity Network, SAN / 隨機 CPM/PERT 網路)與機率論中多變數連續隨機變數的極值分佈、條件機率與全機率公式應用。涉及的核心觀念包括:
- 要徑與節點最早完成時間(Earliest Completion Time):
- 網路中任一節點 必須在其所有前置作業均完成後才能達成。若作業 連接節點 且工期為 ,則節點 的最早完成時間滿足動態規劃關係式:
- 指數分佈(Exponential Distribution)之累積分配函數(CDF):
- 若工期 且相互獨立,其機率密度函數(PDF)為 (),累積分配函數(CDF)為 ()。
- 獨立隨機變數之極值分配:
- 若 獨立,則 。
- 條件獨立性與全機率定理(連續型平滑條件期望值法 / Conditioning):
- 利用已知條件將相依結構拆解為條件獨立的分量,再對中介變數(如 )進行連續型積分求解邊際條件分配。
解題方法
由原卷圖 1 可讀出:網路共有 4 個節點 (題目本文敘述之完成節點記為 ,但原卷圖形與子題符號皆明確標記為終點 ,依圖形為準)與 5 個有向箭頭表示的作業:
- (工期 )
- (工期 )
- (工期 )
- (工期 )
- (工期 )
起始節點時間給定為 。
(a) 求 以 與 表示
進入節點 的作業有兩項:來自節點 的作業 、以及來自節點 的作業 。
- 作業 的完成時間為
- 作業 的完成時間為
節點 的最早完成時間 為兩項作業皆完成的時間:
又因為 且進入節點 僅有作業 ,即 ,代入可得展開式:
(b) 求給定 下 的條件 CDF
給定 (其中 ),代入 (a) 的結果:
因為工期 ,故 ,這表示 必定成立。
- 當 時,不可能滿足 ,因此:
- 當 時,由 相互獨立且獨立於 : 因 ,故 與 均成立,代入 的 CDF: 兩式相乘得:
綜合得:
(c) 求給定 與 下 的條件 CDF
給定 (其中 ),因 僅與 相關,與 相互獨立,故在條件中 視為常數 :
這即為 (b) 小題求得的條件 CDF 將變數平移 ,即 。
- 由於需滿足 :
- 當 時,CDF 為 。
- 當 時:
綜合得:
(d) 求 以 與 表示
進入終點節點 的作業有兩項:來自節點 的作業 、以及來自節點 的作業 。
- 作業 完成時間為
- 作業 完成時間為
專案完成時間 即為進入節點 的所有作業完成時間之最大值:
若將 與 代入,亦可表示為從起點到終點的三條路徑長度之最大值(要徑):
(e) 求給定 下 的條件 CDF
由 (d) 小題可知:
給定 :
- 僅依賴隨機變數 。
- 僅依賴隨機變數 。
由於 與 相互獨立,故給定 時, 與 為條件獨立。
因此:
因為 ,若 ,則 ,故當 時,。
當 時,分別計算兩項:
-
第一項:
-
第二項:利用全機率公式,對 積分(,PDF 為 ,其中 ):
由 (c) 小題,被積函數僅在 時大於 0,故積分上限為 :
展開被積函數:
第 2 題
- The moment generating function of random variable X is defined as follows:
, where is the pdf of X.
(a) Find the moment generating function of X, where X is U(0,1) distributed. (5 points)
(b) Find from the moment generating function of Y, where , X and Z are independent and U(0,1) distributed. (10 points)
登入後即可作答並保存紀錄。
核心觀念
- 動差生成函數(Moment Generating Function, MGF)之定義:
設連續型隨機變數 的機率密度函數(pdf)為 ,其動差生成函數定義為:
在 處,必有 。 - 獨立隨機變數和的動差生成函數性質:
若隨機變數 與 相互獨立,則其和 的動差生成函數為各自動差生成函數之乘積:
- 從動差生成函數求動差(Moments):
隨機變數 的 階原動差可透過 在 處取 階導數獲得:
亦可利用馬克勞林級數(Maclaurin series)展開式直接對應係數:
其中 。
解題方法
(a) 求 的動差生成函數
均勻分配 的機率密度函數為:
依定義計算積分:
- 當 時:
- 當 時:
(由羅必達法則可驗證極限連續性:)
因此, 的動差生成函數為:
(b) 由 求
已知 ,其中 與 相互獨立且皆服從 ,故 。
由獨立性可知:
題目要求「from the moment generating function of 」求出 ,提供以下兩種推導方式:
方法一:馬克勞林級數展開法(最簡潔且不易在微分商法則中出錯)
將分子中的指數函數展開至 項:
分子相減後整理得:
將分子除以分母 :
根據動差生成函數與動差的展開關係:
第 3 題
- To test a particular coin fair or not, (i.e. ), we decide to flip the coin times. Let X denote the number of heads appearing in n flips.
(a) Please provide a M.L.E. of ; (5 points)
(b) Let , try to use X to be the test statistics to develop a test on
(1) Show the distribution of X. (5 points)
(2) Let's set the significant level, , to be 0.15, show the rejection rule. (5 points)
(3) Based on your rejection rule in (b-2), what is the testing power on ? (5 points)
(4) If only one head appears in 4 flips, what is your conclusion? (5 points)
(5) Please develop a 85% confidence interval of . (5 points)
(c) If , let's use to be the test statistics to test on
(1) Since , we can invoke the Central Limit Theory, show the approximate distribution of Y.
(5 points)
(2) Let's set the significant level, , to be 0.15, show the rejection rule. In other words, what is the
critical number of heads appearing to reject . (5 points)
(3) Based on your rejection rule in (c-2), what is the testing power on ? (5 points)
(4) Please develop a 85% confidence interval of . (5 points)
登入後即可作答並保存紀錄。
核心觀念
本題探討單一母體比例(Bernoulli 試驗之成功機率 )的點估計、小樣本精確檢定與大樣本漸近檢定:
- 最大概似估計(MLE):二項分配的概似函數對數微分求極值。
- 小樣本二項檢定(Exact Binomial Test):樣本數小()時無法使用常態近似,必須直接以二項分配機率質量函數計算顯著水準 (型 I 錯誤率)、拒絕域、檢定力(Power)及信賴區間。
- 大樣本常態近似檢定(Central Limit Theorem, CLT):樣本數較大()時,樣本比例 漸近服從常態分配,可利用標準常態統計量 建構雙尾拒絕域、計算對立假設下的檢定力及漸近信賴區間。
解題方法與詳細推導
(a) 求 的最大概似估計量(M.L.E.)
在 次獨立投擲中,每次正面出現的機率為 。令 為正面出現次數,則 ,其機率質量函數為:
概似函數(Likelihood function)與對數概似函數(Log-likelihood function)為:
對 微分並令其為 0(一階條件):
二階導數為:
因此極大值成立,母體比例 的最大概似估計量(MLE)為:
(b) 當 ,以 為檢定統計量檢定
(1) 說明 的分配
在 次獨立 Bernoulli 試驗中, 代表正面出現次數,因此 服從二項分配:
若在虛無假設 成立下:
其個別點機率為 :
(2) 顯著水準 下的拒絕域(Rejection Rule)
雙尾檢定 ,對稱拒絕域應落在兩側極端值 :
若再納入 或 ,則機率增加 ,將使型 I 錯誤率達到 ,大幅超過 。
在離散分配中,名目顯著水準 下,不超過 的最大可能精確拒絕域為:
此時實際型 I 錯誤率為 。
(3) 在 時的檢定力(Testing Power)
檢定力為在對立假設真實值下正確拒絕 的機率:
當 時:
(4) 若 4 次投擲中出現 1 次正面,檢定結論為何?
觀測值 。
對照 (b-2) 之拒絕域 , 不屬於拒絕域(即 )。
因此結論為:不拒絕 (Fail to reject ),在顯著水準 下,沒有足夠證據顯示該硬幣不公正。
(5) 建立 的 85% 信賴區間
-
方法一(小樣本二項精確 Clopper-Pearson 區間,觀測值 ):
雙尾 ,單尾 。
下界 滿足:上界 滿足:
數值解得 。
精確 85% 信賴區間為 。 -
方法二(若考題要求直接套用標準 Wald 區間公式):
對應 85% 信賴水準,查標準常態臨界值 :
截斷至機率合理範圍 後為 (或一般 Wald 區間式 )。
(c) 當 ,以 為檢定統計量
(1) 根據中央極限定理(CLT),說明 的漸近分配
,其中 ,期望值 ,變異數 。
當 充足大時,由中央極限定理(CLT):
在 成立下:
標準誤 。
因此 的漸近分配為:
(2) 顯著水準 下的拒絕域與正面出現的臨界次數
雙尾檢定,兩側尾端機率各為 。
查標準常態分配臨界值:(即 )。
標準常態統計量為:
拒絕規則為:
計算 的臨界值:
轉換為正面次數 :
由於 為整數,拒絕 的臨界正面次數規則為:
第 4 題
- A sample of size n=10 is drawn from a normal distribution with unknown mean and known variance .
(a) If the sample mean is , what is the 95% confidence interval for ? (5 points)
(b) If the sample mean is , what is the p-value for the test of against ? (5 points)
(c) If we want to perform a hypothesis test of against with significance level , and we want the power of the test to be 0.8 when , what is the required sample size ? (10 points)
登入後即可作答並保存紀錄。
本題主要考驗關於正態分佈的參數估計和假設檢定,特別是當母體變異數已知時,如何計算信賴區間、p-value 以及確定所需的樣本大小。
(a) If the sample mean is , what is the 95% confidence interval for ?
題目給定樣本大小 ,母體服從正態分佈,且已知母體變異數 。因此,母體標準差 。
樣本均值 。
由於母體變異數已知,我們使用 Z 分佈來建構信賴區間。
95% 信賴區間的公式為:。
對於 95% 的信賴水準,。
。
查找標準常態分佈表,與 的尾部機率對應的 值是 。
將已知數值代入公式:
信賴區間
信賴區間為 。
【答案】95% 信賴區間為 。
(b) If the sample mean is , what is the p-value for the test of against ?
這是關於均值的單尾假設檢定。
虛無假設 。
對立假設 。
已知 , , 。
由於 已知,我們使用 Z 檢定統計量。
檢定統計量 ,其中 是 下的均值。
。
p-value 是在 為真時,觀察到比樣本結果更極端的結果的機率。對於右尾檢定 (),p-value 是 。
p-value 。
查標準常態分佈表, 。
。
p-value 。
【答案】p-value 約為 。
(c) If we want to perform a hypothesis test of against with significance level , and we want the power of the test to be 0.8 when , what is the required sample size ?
這個問題是關於樣本大小的確定。
虛無假設 。
對立假設 。
顯著水準 。
檢定力 (Power) 。
當真實均值 時,我們希望檢定力為 0.8。
由於 已知,我們使用 Z 檢定。
對於雙尾檢定,顯著水準 ,我們有 。
對應的臨界 Z 值是 。
檢定力為 ,這表示在對立假設下,我們希望正確地拒絕 的機率為 。
由於對立假設是 ,檢定力是指 。
在雙尾檢定中,拒絕域是 或 。
所以,。
其中 。
。
令 。
這等價於:
。
我們將 標準化,使其均值為 。
。
第 5 題
- A random sample of size is taken from a population with unknown mean and unknown variance .
(a) If the sample mean is and the sample standard deviation is , construct a 95% confidence interval for . (5 points)
(b) If we want to test against with , and the sample mean is and the sample standard deviation is , what is the conclusion of the test? (5 points)
(c) If the sample mean is and the sample standard deviation is , what is the p-value for the test in part (b)? (5 points)
登入後即可作答並保存紀錄。
本題主要考驗當母體變異數未知時,如何進行樣本均值的信賴區間估計和假設檢定,這通常涉及到 t 分佈。
(a) If the sample mean is and the sample standard deviation is , construct a 95% confidence interval for .
題目給定樣本大小 ,樣本均值 ,樣本標準差 。
由於母體變異數 未知,我們使用 t 分佈來建構信賴區間。
信賴區間的公式為:。
自由度 (degrees of freedom, df) 為 。
對於 95% 的信賴水準,。
。
查找 t 分佈表,在 df=24 且右尾機率為 的臨界值是 。
將已知數值代入公式:
信賴區間
信賴區間為 。
【答案】95% 信賴區間為 。
(b) If we want to test against with , and the sample mean is and the sample standard deviation is , what is the conclusion of the test?
這是關於均值的雙尾假設檢定,母體變異數未知。
虛無假設 。
對立假設 。
顯著水準 。
樣本數據:, , 。
由於 未知,我們使用 t 檢定。
檢定統計量 。
。
自由度 df = 。
對於雙尾檢定,我們比較 和臨界值 。
, , df = 24。
臨界值 。
我們的檢定統計量 。
比較 和臨界值:。
由於 小於臨界值,我們不拒絕虛無假設 。
結論:在顯著水準 下,沒有足夠的證據拒絕母體均值 的假設。
【答案】沒有足夠的證據拒絕 。
(c) If the sample mean is and the sample standard deviation is , what is the p-value for the test in part (b)?