114 年 國立政治大學統計學系碩士班《統計方法》
第 1 題10 分
Suppose you are taking a multiple-choice test with choices for each question. In answering a question on this test, the probability that you know the answer is . If you don't know the answer, you choose one at random. What is the probability that you knew the answer to a question, given that you answered it correctly?
登入後即可作答並保存紀錄。
此題考驗貝氏定理的應用。我們希望計算在答對題目的條件下,該題是「已知答案」的機率。
設:
A:答對題目
K:知道答案
已知條件:
- 題目有 個選項。
- 知道答案的機率為 。
- 不知道答案的機率為 。
- 如果知道答案,則一定答對,即 。
- 如果不知道答案,則隨機猜測一個選項,答對的機率為 ,即 。
我們要求的是 。
根據貝氏定理:
我們需要計算 ,總機率公式:
第 2 題15 分
Suppose that buses arrive are scheduled to arrive at a bus stop at 8:00 but are always minutes late, where is an exponential random variable with parameter . Suppose that you arrive at the bus stop precisely at 8:00.
(Note: )
(a) If you have already waiting for five minutes, compute the probability that you have to wait an additional five minutes or more. (7%)
(b) Compute the median for the parameter of the exponential distribution. (8%)
登入後即可作答並保存紀錄。
核心觀念
設公車遲到時間為
並採用統計學最常見的「速率參數」定義:
其生存函數為
本題主要考查:
- 指數分配的生存函數。
- 指數分配的無記憶性。
- 中位數的定義。
(a)已等待五分鐘後,再等五分鐘以上的機率
公車遲到時間為 。已經等待五分鐘,表示目前已知:
再等待五分鐘以上,表示公車總共至少遲到十分钟,即:
因此所求為條件機率:
利用條件機率公式:
由指數分配的生存函數:
所以
這也可直接由指數分配的無記憶性得到:
令 、,即得
(b)指數分配的中位數
設中位數為 。中位數的定義是:
第 3 題25 分
You independently draw 23 data points from a normal distribution. The 23 data points have sample mean 4.1 and sample variance 4.
(a) Please conduct a test with the null hypothesis against the alternative hypothesis at a significance level of . (8%)
(b) What is the p-value for part (a)? (7%)
(c) Determine the probability of committing the test using the alternative . (10%)
登入後即可作答並保存紀錄。
核心觀念
本題為「母體平均數的單一樣本 檢定」:
- 母體為常態分布;
- 母體變異數未知;
- 樣本數 ;
- 使用樣本變異數 ,故 ;
- 檢定自由度為 。
檢定統計量為
在虛無假設 成立時,
(a) 假設檢定
第一步:建立假設
這是雙尾檢定,顯著水準為 ,因此每一尾的面積為 。
第二步:計算檢定統計量
已知
因此
第三步:決定拒絕域
自由度為 ,雙尾檢定的臨界值為
拒絕域為
由於
故拒絕 。
統計結論
在顯著水準 下,有足夠證據認為母體平均數 不等於 。由於樣本平均數為 ,資料顯示母體平均數傾向高於 。
(b) -value
雙尾檢定的 -value 為
查 分布表或使用統計軟體計算:
因為
所以拒絕 ,與 (a) 的檢定結論一致。
(c) 當真實平均數為 時的第二型錯誤機率
核心意義
題目所稱「使用替代假設 時的錯誤機率」,是指當真實平均數為 時,檢定卻沒有拒絕 的機率,也就是第二型錯誤機率:
由於題目沒有給定真正的母體標準差,以下依題目提供的 ,採用常見的代入估計:
建立接受域
不拒絕 的條件為
第 4 題20 分
A survey is conducted to examine the relationship between gender (male and female) and preference for three different brands (A, B, and C). The observed frequencies are shown as follows:
🖼️【此處有附圖,請對照原卷】
Answer the following questions at the 0.01 significance level.
(a) If and indicate the population proportions of male persons who prefer brands A and C, respectively, then conduct a test to decide where and are equal or not. (10%)
(b) Conduct a test for independence between gender and brand preference. (10%)
登入後即可作答並保存紀錄。
核心觀念
本題考查兩種比例/類別資料檢定:
- (a) 男性偏好品牌 A 與品牌 C 的母體比例是否相同:在男性樣本中,令 、 分別代表偏好 A、C 的母體比例,檢定 。由於 A、C 是同一批男性的互斥類別,可在「偏好 A 或 C」的人之中比較兩者人數。
- (b) 性別與品牌偏好是否獨立:使用列聯表的 Pearson 卡方獨立性檢定。若性別與偏好獨立,各格期望次數為「列合計 × 欄合計 ÷ 總人數」。
顯著水準皆為 。
(a) 檢定男性偏好 A 與 C 的比例是否相同
男性樣本中,偏好 A、B、C 的人數分別為 。檢定假設為:
在偏好 A 或 C 的男性中,共有 人。在虛無假設下,兩品牌的偏好比例相同,因此每人偏好 A 或 C 的機率各為 。在 下,這 55 人中偏好 A 的人數服從 ,期望值為 ,檢定統計量為:
雙尾檢定在 下的臨界值為 。因為 ,不拒絕 。此檢定的近似雙尾 值約為 ,大於 。
(b) 檢定性別與品牌偏好是否獨立
假設為:
第 5 題30 分
The grades of a class of 10 students on a midterm report (explanatory variable, X) and on the final examination (response variable, Y) are shown below:
🖼️【此處有附圖,請對照原卷】
We also have obtained , and . Below shows part of the estimation result based on these data.
| Coefficient | Standard error | T | |
|---|---|---|---|
| Intercept | (A) | 20.18 | (C) |
| Midterm | (B) | 0.25 | (D) |
(a) Compute the values (A) to (D) in details, and conclude whether the slope of the linear regression model is significantly different from zero at the 0.01 significance level. (10%)
(b) If we fit the regression model without the intercept term for these data, then find the estimate of the slope. (5%)
(c) If another explanatory variable, gender, is included in the analysis, then we obtain the following analysis of variance:
| Degree of freedom | SS | MS | F | |
|---|---|---|---|---|
| Regression | (E) | (H) | (K) | (L) |
| Error | (F) | (I) | 90.07 | |
| Total | (G) | (J) |
Please compute the values (E) to (L) in details, and specify the required formulas. (10%)
(d) Please show whether gender is a significant variable, given X is already in the model using . (5%)
登入後即可作答並保存紀錄。
核心觀念
本題考線性迴歸的最小平方法估計、係數標準誤與 檢定、無截距迴歸,以及加入新變數後的變異數分析與部分 檢定。
含截距的簡單線性迴歸中,令 ,則
斜率與截距估計值為 、。檢定斜率是否為零時,使用 ,自由度為 。
解題方法與計算
由題目所給總和:
(a) 求 (A) 至 (D),並檢定斜率
斜率與截距估計值為
迴歸平方和與誤差平方和為
因此誤差均方為 。斜率標準誤約為
截距標準誤為
依題目表格的標準誤計算 值:
所以 (原卷表中截距的標準誤 20.18 是已知值)、、、。檢定 對 ,自由度為 。雙尾顯著水準 的臨界值為 。由於 ,在 顯著水準下,斜率與零沒有顯著差異。
(b) 不含截距項的斜率估計
無截距模型的最小平方法斜率為