111 年 國立政治大學統計學系碩士班《統計方法》
第 1 題12 分
A Center of Sleep Disorder conducted a survey to determine whether the hours of sleep per night are independent of age. A random sample of 500 individuals was asked two questions: (i) hours of sleep per night (with four options: fewer than 6, 6 to 6.9, 7 to 7.9, and 8 or more); (ii) age (younger than 30, and 30 or older). The data are given in the following table.
🖼️【此處有附圖,請對照原卷】
Age
| Hours of sleep | Younger than 30 | 30 or older |
|---|---|---|
| fewer than 6 | 60 | 90 |
| 6 to 6.9 | 70 | 70 |
| 7 to 7.9 | 60 | 60 |
| 8 or more | 50 | 40 |
(a) Using a 0.05 significance level, conduct a hypothesis test to determine whether the hours of sleep per night are independent of age. Please complete the hypothesis test. (10%)
(b) What is your interpretation about the result in (a)? (2%)
登入後即可作答並保存紀錄。
此題考驗獨立性檢定(Test of Independence)。
(a) 獨立性檢定步驟:
-
建立虛無與對立假設:
- :睡眠時數與年齡是獨立的。
- :睡眠時數與年齡不是獨立的。
-
設定顯著水準:
- 。
-
計算期望次數 (Expected Frequencies):
首先,計算各行(睡眠時數)和各列(年齡)的總次數,以及總樣本數。- 總樣本數 。
- 各睡眠時數總計:
- fewer than 6:
- 6 to 6.9:
- 7 to 7.9:
- 8 or more:
- 各年齡總計:
- Younger than 30:
- 30 or older:
期望次數
- (fewer than 6, Younger than 30) =
- (fewer than 6, 30 or older) =
- (6 to 6.9, Younger than 30) =
- (6 to 6.9, 30 or older) =
- (7 to 7.9, Younger than 30) =
- (7 to 7.9, 30 or older) =
- (8 or more, Younger than 30) =
- (8 or more, 30 or older) =
-
計算檢定統計量 (Test Statistic):
卡方檢定統計量
第 2 題20 分
For testing v.s. , a random sample of 256 individuals is selected from the population. The population variance is 400. The power is 0.2005, denoted by , when the actual population mean is 23.4.
(a) What is the significance level adopted in the test? (12%)
(b) In such a hypothesis testing with a sample of 256 individuals, is it possible that the probability of type II error and the significance level decrease simultaneously? Please give your reason. (8%)
登入後即可作答並保存紀錄。
核心觀念
本題考查母體變異數已知時的單一母體平均數右尾 檢定,以及顯著水準與第二類錯誤的關係。
已知:
- ,故
- 標準誤為
右尾檢定的拒絕域可寫為:
其中 為臨界值。
顯著水準為虛無假設邊界 下的拒絕機率:
當實際平均數為 時,檢定力為:
解題方法
(a)求顯著水準
由題意:
因為 ,標準化得:
標準常態分配中:
因此:
得到臨界值:
接著在虛無假設的邊界 下計算顯著水準:
此時 ,所以:
查標準常態分配表:
故:
亦即顯著水準為 。
(b)顯著水準與第二類錯誤能否同時下降?
第 3 題35 分
A realty company sells apartments in the Midwest of the United States. Since their customers are interested in the fee they have to pay for heating in winter, a research group in the company collected data and tried to build regression models to predict the heating cost (abbreviated to Heat.cost; denoted by Y). There were three independent variables: the mean temperature in winter (Temp, ), the centimeters of insulation in the attic (Insu, ), and the age (years) of the heater (Age, ). The research group considered the following regression analyses:
Model 1:
Model 2:
Model 3:
where , , and are error terms. They collected data from 20 of their former customers for data analysis. First of all, the Model 1 is fitted based on the 10 elements given in the following table, and please answer Questions (a) and (b).
| Customer | Y | X₁ |
|---|---|---|
| 1 | 250 | -5 |
| 2 | 360 | -9 |
| 3 | 165 | -5 |
| 4 | 43 | 9 |
| 5 | 92 | 11 |
| 6 | 200 | -8 |
| 7 | 355 | -19 |
| 8 | 290 | -21 |
| 9 | 230 | -13 |
| 10 | 120 | 6 |
(a) Find the least squares estimates of and under Model 1. (12%)
(b) Compute the coefficient of determination, , for Model 1. (12%)
An output from a computer software for fitting Model 3 to the data is displayed in the followings. Using the output to answer Questions (c) and (d).
Coefficients:
| | Estimate | Std. Error | t value | Pr(>|t|) |
|-----------|----------|------------|---------|----------|
| (Intercept)| 228.833 | 40.547 | 5.644 | 3.66e-05 *** |
| Temp | -8.348 | 1.361 | -6.134 | 1.44e-05 *** |
| Insu | -6.098 | 1.872 | -3.258 | 0.00494 ** |
| Age | 5.751 | 3.937 | 1.461 | 0.16349 |
Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 '.' 0.1 ' ' 1
Residual standard error: 49.98 on 16 degrees of freedom
Multiple R-squared: 0.8123, Adjusted R-squared: 0.7771
F-statistic: 23.08 on 3 and 16 DF, p-value: 4.695e-06
The output for fitting Model 2 to the data is displayed in the followings.
Coefficients:
| | Estimate | Std. Error | t value | Pr(>|t|) |
|-----------|----------|------------|---------|----------|
| (Intercept)| 86.184 | 48.656 | 1.771 | 0.0934 . |
| Age | 17.009 | 6.303 | 2.699 | 0.0147 * |
(c) What is your interpretation about the result of the F-test for Model 3? (5%)
(d) Based on the fittings, the under Model 2 is significant while the under Model 3 is not, at a 0.05 significance level. Comment on the phenomenon (Is there any contradiction, or ...?). (6%)
登入後即可作答並保存紀錄。
此題考驗簡單線性迴歸、複迴歸的參數估計、判定係數,以及複迴歸的 F 檢定與變數篩選的解讀。
Model 1:簡單線性迴歸
(a) 計算 和 的最小平方法估計值:
對於簡單線性迴歸 ,最小平方法估計量為:
首先,計算所需的總和:
計算 :
計算 :
【答案】, 。
(b) 計算判定係數 :
,其中 。
首先計算 :
或者,也可以使用 。
【答案】。
Model 3:複迴歸
(c) 解釋 Model 3 的 F 檢定結果:
F 檢定的虛無假設是所有迴歸係數(除了截距項)同時為零:。
第 4 題10 分
Consider the hypothesis test that v.s. , where is a fixed constant. The population variance is known as . Suppose that the significance level is set at , and suppose further that the probability of type II error is when the population mean is , where is a constant smaller than . Define and as numbers satisfying and . Derive that the sample size should be (and then round up).
登入後即可作答並保存紀錄。
此題考驗假設檢定中,第一型錯誤機率、第二型錯誤機率與樣本數的關係,特別是如何推導樣本數的公式。
題目給定的檢定是左尾檢定:
顯著水準為 ,即 。
第二型錯誤機率為 ,當實際母體平均數為 時,該機率為 。 。
。
樣本數為 ,母體變異數為 。
檢定統計量為 。
根據顯著水準 ,我們拒絕 當 (因為是左尾檢定,臨界值在負方向)。
也就是 ,所以拒絕域為 。
根據第二型錯誤機率 ,當實際母體平均數為 時,我們接受 的機率為 。
接受域為 。
所以,。
將 轉換為標準常態變數 ,其平均值為 ,標準誤為 。
。
題目定義 滿足 。
然而,這裡的檢定是左尾檢定,接受域是 ,拒絕域是 。
在 時,。
標準化後,。
第 5 題23 分
A research study is conducted to compare the kilometers per liter of unleaded regular, mid-grade, and super premium gasolines. There are differences in the performances of different automobiles. Seven different automobiles (numbered in 1 to 7) are sampled randomly and tested. The experimental results, in kilometers per liter, are given in the following table.
🖼️【此處有附圖,請對照原卷】
| Automobile | Regular | Mid-grade | Super Premium |
|---|---|---|---|
| 1 | 26 | 26 | 29 |
| 2 | 28 | 25 | 28 |
| 3 | 26 | 28 | 30 |
| 4 | 29 | 28 | 30 |
| 5 | 31 | 30 | 35 |
| 6 | 28 | 29 | 33 |
| 7 | 28 | 30 | 32 |
(a) To answer the research question, an ANOVA is performed. What are the null and alternative hypotheses for the ANOVA? (2%)
(b) Set up the ANOVA table. (17%)
(c) Using a 0.05 significance level, what is the conclusion? What is your interpretation about the result? (4%)
登入後即可作答並保存紀錄。
此題考驗單因子變異數分析 (One-Way ANOVA),用於比較三個或更多類別(在這裡是三種汽油類型)的平均值是否存在顯著差異。
(a) 虛無與對立假設:
ANOVA 的目的是檢定各組(汽油類型)的平均值是否相等。
- : 三種汽油類型的平均每公升公里數都相等。
即 。 - : 至少有一種汽油類型的平均每公升公里數與其他不同。
即 至少存在一對 使得 。
【答案】
至少有一種汽油類型的平均每公升公里數與其他不同。
(b) 建立 ANOVA 表:
ANOVA 表的基本結構包括:變異來源 (Source of Variation)、平方和 (Sum of Squares, SS)、自由度 (Degrees of Freedom, df)、均方 (Mean Square, MS)、F 檢定統計量,以及 P 值。
步驟:
-
定義變數:
- 分組數 (Number of groups, ) = 3 (Regular, Mid-grade, Super Premium)。
- 每組樣本數 (Number of observations per group, ) = 7 (有 7 輛汽車)。
- 總樣本數 (Total number of observations, ) = 。
-
計算各組平均值與總平均值:
- Regular (組 1):
- Mid-grade (組 2):
- Super Premium (組 3):
- 總平均值 ():
- Regular (組 1):
-
計算平方和 (Sum of Squares, SS):
-
組間平方和 (Between Groups SS, 或 ):
-
組內平方和 (Within Groups SS, 或 ):
- Regular (組 1):
- Mid-grade (組 2):
- Super Premium (組 3):
- Regular (組 1):
-