115 年 國立臺灣大學土木系碩士班交通組《工程統計》
第 1 題20 分
Derive the mean and variance of the normal distribution.
登入後即可作答並保存紀錄。
本題要求推導常態(常態)分配的期望值(平均數)與變異數。
常態分配的機率密度函數 (PDF) 為:
其中 是平均值, 是變異數。
1. 推導平均值 (Mean, )
根據期望值的定義,平均值是機率密度函數 與 的乘積在整個定義域上的積分:
為了簡化積分,我們進行變數代換。令 ,則 且 。積分範圍不變。
將積分拆成兩部分:
考慮第一項積分:
被積函數 是一個奇函數()。奇函數在對稱區間( 到 )上的積分為 0。
因此,第一項積分等於 0。
考慮第二項積分:
第二項中的積分是標準常態機率密度函數在整個定義域上的積分,根據定義,這個積分值為 1。
所以,第二項積分等於 。
將兩項結果相加:
這證明了常態分配的平均值就是參數 。
2. 推導變異數 (Variance, )
變異數的定義是 。
再次進行變數代換 ,則 。
第 2 題20 分
A civil engineering firm wants to evaluate whether a newly introduced workplace safety program has successfully reduced the number of on-site accidents. Accident counts were collected at six construction sites during a comparable time period before and after the safety program was implemented. The recorded data are shown in the table below.
| Site | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| Before | 12 | 9 | 14 | 10 | 8 | 9 |
| After | 9 | 7 | 13 | 8 | 6 | 11 |
At a significance level of 0.05, assess whether the new safety program is effective in reducing the number of accidents.
(a) Analyze the data without treating the observations as paired.
(b) Analyze the data by treating the observations as paired.
登入後即可作答並保存紀錄。
本題旨在評估一項新的職場安全計畫是否有效降低了工地事故數量。我們將使用統計檢定來分析提供的數據,並比較兩種不同的分析方法:獨立樣本檢定和配對樣本檢定。顯著水準 。
數據摘要:
我們有六個工地(樣本),每個工地在實施安全計畫「之前」和「之後」各記錄了一次事故數量。
Before (計畫前) 數據:
After (計畫後) 數據:
a) 不將觀察值視為配對(獨立樣本 t 檢定)
這種方法將「Before」的事故數和「After」的事故數分別視為兩個獨立的樣本群體,假設它們來自具有相同變異數(或不同變異數)的兩個常態分配。由於我們只有 6 個樣本,通常會假設變異數相等(pooled variance t-test)。
假設:
- 虛無假設 : 安全計畫沒有降低事故數量,即計畫前後的平均事故數沒有差異或增加,。
- 對立假設 : 安全計畫降低了事故數量,即計畫前的平均事故數大於計畫後的平均事故數,。
等價於:。
計算:
首先計算兩個樣本的平均值和變異數。
Before (x):
樣本數
平均值
變異數
After (y):
樣本數
平均值
變異數
由於 和 ,兩者相差不算太大,我們可以考慮合併變異數(pooled variance)的 t 檢定。
合併變異數
檢定統計量
在這裡,我們檢定 。
第 3 題20 分
The following table summarizes the ages of attendees at a professional baseball game. A researcher would like to examine whether the age distribution of the spectators can be reasonably modeled by a normal distribution with a mean of 42.3 years and a variance of 210.5. Using a goodness-of-fit test, determine whether the observed age data are consistent with this normal distribution. Conduct the test at a significance level of .
| Age (years) | Frequency |
|---|---|
| 25 and below | 18 |
| 25-35 | 39 |
| 35-45 | 67 |
| 45-55 | 58 |
| 55-65 | 32 |
| Above 65 | 17 |
| Total | 231 |
登入後即可作答並保存紀錄。
本題要求使用卡方適合度檢定 (Chi-squared Goodness-of-Fit Test) 來檢驗觀測到的觀眾年齡分佈是否符合一個預設的常態分佈。
檢定資訊:
- 顯著水準
- 假設的常態分配:平均數 年,變異數 。從而標準差 。
- 觀測到的頻率分佈(共 個樣本)。
步驟 1:設定假設
- 虛無假設 : 觀眾的年齡分佈符合平均數為 42.3 歲、變異數為 210.5 的常態分佈。
- 對立假設 : 觀眾的年齡分佈不符合該常態分佈。
步驟 2:計算預期頻率 (Expected Frequencies, )
為了進行卡方檢定,我們需要計算在 為真的情況下,每個年齡區間的預期頻率。這需要將預設的常態分佈轉換為標準常態分佈 ,然後利用標準常態累計分佈函數 來計算每個區間的機率 ,最後乘以總樣本數 得到預期頻率 。
年齡區間轉換為 Z 分數:
-
25 and below:
。查標準常態表,。
-
25-35:
(已計算)
-
35-45:
(已計算)
-
45-55:
(已計算)
-
55-65:
(已計算)
第 4 題20 分
In a manufacturing system, a critical machine may occasionally fail and must be repaired before production can resume. Let the repair time be a random variable X (measured in minutes). Historical data indicate that X follows a normal distribution with a mean of 130 minutes and a standard deviation of 7 minutes. If the repair takes longer than 136 minutes, all items currently in production are scrapped, resulting in a financial loss of $15,000.
(a) What is the expected loss associated with a single machine breakdown?
(b) Suppose process improvements reduce the mean repair time to 124 minutes, while the standard deviation remains unchanged. By how much does the expected loss of a breakdown decrease?
登入後即可作答並保存紀錄。
核心觀念
本題屬於工程經濟與品質管制中常見的「常態分佈應用與期望損失評估(Expected Loss Analysis)」,核心考點包含:
-
常態隨機變數的標準化(Standardization):
若隨機變數 ,則經標準化轉換後:其超越特定臨界值 的尾端機率(Tail Probability)為:
其中 為標準常態累積機率分佈函數(CDF)。
-
離散二值損失的期望值(Expected Value of Binary Loss):
令損失函數為隨機變數 。若當事件 發生時造成固定損失 ,未發生時無損失(),則單次事件的期望損失為:
解題方法
(a) 計算單次機台故障的期望損失
-
建立損失函數與機率模型:
設維修時間為隨機變數 (單位:分鐘)。
當維修時間 分鐘時,損失金額為 $15,000;若 分鐘,損失為 $0。
損失隨機變數 的期望值為: -
計算逾時機率 :
將 進行標準化:查標準常態分佈表:
- 若 取兩位小數 :
- 逾時機率為:
(若採用線性內插或精確值 ,則 )
-
計算期望損失:
(若以精確機率 計算,則 元)
(b) 製程改善後期望損失的減少量
-
新參數下的機率模型:
改善後平均維修時間降為 分鐘,標準差維持 分鐘。
新維修時間隨機變數設為 。 -
計算改善後的逾時機率 :
將 標準化:
第 5 題10 分
995 regular coins, with one side being "head" and the other side being "tail," and five irregular coins, with both sides being "head," are put in a bag. One coin is randomly selected from the bag. The coin is tossed 10 times and all of them are "heads," what is the probability that the selected coin is irregular?
登入後即可作答並保存紀錄。
本題是一個貝氏定理 (Bayes' Theorem) 的應用問題,涉及條件機率的計算。我們需要計算在觀察到連續 10 次拋擲都出現「正面」的結果後,所選硬幣是「不規則硬幣」的機率。
事件定義:
- : 選到的是不規則硬幣 (Irregular coin)。
- : 選到的是規則硬幣 (Regular coin)。
- : 連續拋擲 10 次都出現正面 (10 heads in 10 tosses)。
給定資訊:
-
硬幣總數 (規則) (不規則) 枚。
-
選到規則硬幣的機率 。
-
選到不規則硬幣的機率 。
-
規則硬幣的特性:一面是正面,一面是反面。拋擲一次出現正面的機率 。
連續拋擲 10 次都出現正面的機率 。 -
不規則硬幣的特性:兩面都是正面。拋擲一次出現正面的機率 。
連續拋擲 10 次都出現正面的機率 。
目標:
計算在觀察到 後,選到不規則硬幣的機率,即 。
第 6 題10 分
Consider a multiple linear regression model with two predictors
where denotes the observed response variable, and are the first and second predictors, respectively, and , , and are unknown regression coefficients. Explain how the coefficients , , and can be estimated using the method of least squares.
登入後即可作答並保存紀錄。
本題要求解釋如何使用最小平方法 (Method of Least Squares) 來估計多元線性迴歸模型中的迴歸係數。
模型:
多元線性迴歸模型為:
其中, 是第 個觀測值的應變數, 和 是第 個觀測值的兩個預測變數, 是待估計的迴歸係數, 是隨機誤差項。
在題目中,模型寫成預測值 的形式,這通常是指估計值:
其中 是對 的估計值。
最小平方法原理:
最小平方法的核心思想是找到一組迴歸係數的估計值 (),使得觀測值 與模型預測值 之間的殘差平方和 (Sum of Squared Residuals, SSR) 最小。
殘差 定義為:
殘差平方和 為:
其中 是觀測值的數量。
估計係數的推導 (透過微分):
為了最小化 ,我們對 分別對 求偏導數,並令其等於零,從而得到一組聯立方程式(正規方程式 Normal Equations)。
-
對 求偏導數:
除以 :
這個方程式表明,迴歸平面通過樣本均值的點 。 -
對 求偏導數:
-
對 求偏導數: