목차
- Fundamentals of Hypothesis Testing: Two-Sample Tests
- 개요
- Comparing the mean of Population Variance
- The F Distribution
- How to Solve
- 문제
👀, 🤷♀️ , 📜, 📝
이 아이콘들을 누르시면 정답, 개념 부가 설명을 보실 수 있습니다:)
Fundamentals of Hypothesis Testing: Two-Sample Tests
즉, 가설검증이다.
test라는 위딩이 들어갔다는 것은 이 추정의 결과로 인한 의사결정까지 한다는 것이다.
Two-Sample Tests: 데이터 세트가 두개이다.
- One-Sample Tests: 우리나라 사람의 아이큐가 100 이상이다 -> 우리나라 사람의 아이큐라는 하나의 데이터 세트가 필요하다
- Two-Sample Tests: 우리나라와 일본의 아이큐를 비교해보면 우리나라가 더 높다 -> 우리나라 아이쿠 데이터 세트와 일본의 아이큐 데이터세트가 필요하다. 즉, 비교, 변화 검증에 많이 쓰인다.
개요
아래의 도식을 하나씩 자세히 알아볼 것이다.
- Comparing the mean of Two Independent Populations
- Comparing the mean of Two Related Populations
- Comparing the Proportions of Two Independent Populations
- F Test for the Ratio of Two Variances
결정 방법
각각 구하는 식
이제 여기에 나온 식들을 예를 들어 하나씩 사용해볼 것이다!
(지금은 이렇다~ 정도만 알아두자)
왜 이런식이 유도되었는지 보단 어떤 문제라서 어떤 식을 써야하는 지가 중요하다
위 그림 다운받기
➕ 꿀팁이 있는데 여기 경우에 따라 계산해주는 계산기가 있다(대신 어떤 경우에 어떤 계산기를 쓰는지 알아야 함으로 포스티팅을 끝까지 잘 보자!)
Comparing the mean of Population Variance
Variance를 test하는 이유
- 두 sample의 편차를 test를 하면 두 sample의 분포 즉 모양이 같냐 다르냐에 따라서 통계적 근거의 제공 여부가 바뀌기 때문이다
- ex) indepenence samples의 분산의 여부에 따라 나뉘는 계산 방법
즉 7번째 case이다.
Population Variances
두 sample의 variances의 비율을 test statistic으로 사용한다.
- \(S_{1}^2\): 첫번째 데이터의 variances (the larger sample variance)
- \(S_{2}^2\): 두번째 데이터의 variances (the smaller sample variance)
The F Distribution
The F critical value is found from the F table
- There are two degrees of freedom required: numerator and denominator:
- numerator degrees of freedom (분자의 df) = \(n_{1}–1\)
- denominator degrees of freedom (분모의 df) = \(n_{2}–1\)
- when, n = sample size
- The larger sample variance is always the numerator: 분산이 큰게 항상 분자
- In the F table,
- numerator degrees of freedom determine the column(열)
- denominator degrees of freedom determine the row(행)
분포 모양
항상 양수임
주의해야 할 점은 같다 아니다의 문제는 두개의 tail을 각각 구해줘야 한다 (a를 1/2하는 것은 여전히 같음)
➡️ 그림에선 없는것 같아 보이지만 왼쪽에 조그맣게 있다.
How to Solve
그럼 이제 문제로 예를 들어보자
전반적인 과정은 전의 포스팅인
- One-Sample Tests_Hypothesis & Z-Test
- One-Sample Tests_𝜎 Unknown (t test)
- One-Sample Tests_one tail test
- One-Sample Tests_Hypothesis Tests for Proportions
을 참고하고 떠올리면 좋을 것 같다(전반적인 과정은 비슷하다)
Example
You are a financial analyst for a brokerage firm. You want to compare dividend yields between stocks listed on the NYSE & NASDAQ. You collect the following data: NYSE & NASDAQ. You collect the following data: Is there a difference in the variances between the NYSE & NASDAQ at the a = 0.05 level?
➡️ 즉 지금 보고 싶은 것은 ‘1.3과 1.16을 통계적으로 같다고 볼 수 있을까?’ 이다
SOLVE
1) Check: tail 확인
IIs there a difference
➡️ 문제의 최종 의도는 variance가 같냐 다르냐이다
➡️ two-tail test
즉 아래의 식을 통해 이를 확인해보자
3) 조건 확인
- \(𝐻_0\): \(σ_{1}^2 = σ_{2}^2\) = 0 (there is no difference between variances)
- \(𝐻_1\): \(σ_{1}^2 ≠ σ_{2}^2\) ≠ 0 (there is a difference between variances)
4) find test statistic
7) Find the F critical value
at a = 0.05이다
df를 구하면,
- Numerator d.f. = \(n_1\)– 1 = 21 –1 =20
- Denominator d.f. = \(n_2\) – 1 = 25 –1 = 24
[upper critical value]
이므로 위의 조건들을 이용하여 f-table 에서 찾으면,
➕ 분산이 큰게 항상 df1 -> Numerator -> column(열)
즉 2.33이다
[lower critical value]
💕 df1과 df2를 바꿔서 구한 후 역수를 취한다
이므로 위의 조건들을 이용하여 f-table 에서 찾으면,
- 24-> 근사값 25로 하겠다
즉 2.40의 역수를 취하면 0.415이다.
8) Dicision
Reach a decision and interpret the result:
➡️ FSTAT = 1.256 is not in the rejection region, so do not reject \(H_0\)
- There is not sufficient evidence of a difference in variances at a = .05
문제
[TABLE D]
To test the effectiveness of a business school preparation course, 8 students took a general business test before and after the course. The results are given below.
1. Referring to Table D, the number of degrees of freedom is
A. 14.
B. 13.
C. 8.
D. 7.
📜 정답 보기
n-1이므로
D. 7이다
2. Referring to Table D, the value of the sample mean difference is _______ if the difference scores reflect the results of the exam after the course minus the results of the exam before the course.
📜 정답 보기
현재- 과거 이므로
즉 50이다.
3. Referring to Table D, what is the critical value for testing at the 5% level of significance whether the business school preparation course is effective in improving exam scores?
A. 2.365
B. 2.145
C. 1.761
D. 1.895
📜 정답 보기
To test the effectiveness of a business school preparation course이니까 효과 정도의 차가 0이 넘나 안넘나이다.
즉 one tail test이다.
또한 SD가 나와있지 않으므로 5번 case이다
즉 t-table로 구하면 1.895이다.
D. 1.895
4. Referring to Table D, the calculated value of the test statistic is ________.
📜 정답 보기
즉 2.175이다
5. Referring to Table D, at the 0.05 level of significance, the decision for this hypothesis test would be: A. reject the null hypothesis.
B. do not reject the null hypothesis.
C. reject the alternative hypothesis.
D. It cannot be determined from the information given.
📜 정답 보기
test statistic 2.175
이므로 reject이다.
A. reject the null hypothesis.
6. Referring to Table D, at the 0.05 level of significance, the conclusion for this hypothesis test would be:
A. the business school preparation course does improve exam score.
B. the business school preparation course does not improve exam score.
C. the business school preparation course has no impact on exam score.
D. It cannot be drawn from the information given.
📜 정답 보기
5에 의해
그냥 현상유지(null hypothesis)가 아니니까
이 현재 상태(관련 없다)가 부정된 관련있다를 골라야 한다.
A. the business school preparation course does improve exam score.
7. True or False: Referring to Table D, one must assume that the population of difference scores is normally distributed.
📜 정답 보기
필요하다 sample size가 30이 안되기 때문에
True
[TABLE E]
The Wall Street Journal recently ran an article indicating differences in perception of sexual harassment on the job between men and women. The article claimed that women perceived the problem to be much more prevalent than did men. One question asked of both men and women was: “Do you think sexual harassment is a major problem in the American workplace?” Some 24% of the men compared to 62% of the women responded “Yes.” Suppose that 150 women and 200 men were interviewed.
8. Referring to Table E, assuming W designates women’s responses and M designates men’s, what hypothesis should The Wall Street Journal test in order to show that its claim is true?
a) \(𝐻_0\): \(𝜋_{W} - 𝜋_{M}\) ≥ 0 versus \(𝐻_1\): \(𝜋_{W} - 𝜋_{M}\) > 0
b) \(𝐻_0\): \(𝜋_{W} - 𝜋_{M}\) ≤ 0 versus \(𝐻_1\): \(𝜋_{W} - 𝜋_{M}\) < 0
c) \(𝐻_0\): \(𝜋_{W} - 𝜋_{M}\) = 0 versus \(𝐻_1\): \(𝜋_{W} - 𝜋_{M}\) ≠ 0
📜 정답 보기
% 가 나오므로 proportion이다 ➡️ 𝜋
claimed that women perceived the problem to be much more prevalent than did men.
이므로 onw tail test
b) \(𝐻_0\): \(𝜋_{W} - 𝜋_{M}\) ≤ 0 versus \(𝐻_1\): \(𝜋_{W} - 𝜋_{M}\) < 0
9. Referring to Table E, for a 0.01 level of significance, what is the critical value for the rejection region?
a) 7.173
b) 7.106
c) 6.635
d) 2.33
📜 정답 보기
z table에서 0.01 level of significance을 찾으면
2.33이다.
10. Referring to Table E, what is the value of the test statistic?
a) 7.173
b) 7.106
c) 6.635
d) 2.33
📜 정답 보기
이므로 a) 7.173이다
11. Referring to Table E, what conclusion should be reached?
a) Using a 0.01 level of significance, there is sufficient evidence to conclude that women perceive the problem of sexual harassment on the job as much more prevalent than do men.
b) There is insufficient evidence to conclude with at least 99% confidence that women perceive the problem of sexual harassment on the job as much more prevalent than do men.
c) There is no evidence of a significant difference between the men and women in their perception.
d) More information is needed to draw any conclusions from the data set.
📜 정답 보기
reject한다. -> 다르다고 본다.
a) Using a 0.01 level of significance, there is sufficient evidence to conclude that women perceive the problem of sexual harassment on the job as much more prevalent than do men.
[TABLE F]
A problem with a telephone line that prevents a customer from receiving or making calls is disconcerting to both the customer and the telephone company. The data on samples of 20 problems reported to two different offices of a telephone company and the time to clear these problems (in minutes) from the customers’ lines are collected. Below is the Excel output to see whether there is evidence of a difference in the mean waiting time between the two offices assuming that the population variances in the two offices are not equal.
12. Referring to Table F, state the null and alternative hypotheses for testing if there is evidence of a difference in the variability of the waiting time between the two offices.
a) \(𝐻_0\): \(σ_{I}^2 - σ_{II}^2\) ≥ 0 versus \(𝐻_1\): \(σ_{I}^2 - σ_{II}^2\) > 0
b) \(𝐻_0\): \(σ_{I}^2 - σ_{II}^2\) ≤ 0 versus \(𝐻_1\): \(σ_{I}^2 - σ_{II}^2\) < 0
c) \(𝐻_0\): \(σ_{I}^2 - σ_{II}^2\) = 0 versus \(𝐻_1\): \(σ_{I}^2 - σ_{II}^2\) ≠ 0
d) \(𝐻_0\): \(σ_{I}^2 - σ_{II}^2\) ≠ 0 versus \(𝐻_1\): \(σ_{I}^2 - σ_{II}^2\) = 0
📜 정답 보기
there is evidence of a difference 이므로
c) \(𝐻_0\): \(σ_{I}^2 - σ_{II}^2\) = 0 versus \(𝐻_1\): \(σ_{I}^2 - σ_{II}^2\) ≠ 0
13. Referring to Table F, what is the value of the test statistic for testing if there is evidence of a difference in the variability of the waiting time between the two offices?
📜 정답 보기
즉, 0.82이다.
or
즉, 1.21이다
➕ Observations 즉, df의 크기가 모두 20으로 같기 때문에 역수를 구해도 괜찮다.
14. Referring to Table F, what assumptions are necessary for testing if there is evidence of a difference in the variability of the waiting time between the two offices to be valid?
a) Both sampled populations are normally distributed.
b) Both samples are random and independent.
c) Neither (a) nor (b) is necessary.
d) Both (a) and (b) are necessary.
📜 정답 보기
a)는 두 샘플의 사이즈가 모두 30을 넘지 않으니까 필요하고
b)는 뭐 당연한 이야기다.
즉, 답은
d) Both (a) and (b) are necessary.
15. Referring to Table F, what is the upper critical value for testing if there is evidence of a difference in the variability of the waiting time between the two offices at the 5% level of significance?
📜 정답 보기
앞의 개념에서 구한 예와 같이 구하면
Fu = 2.53
FL = 1/2.53=0.395
16. Referring to Table F, suppose = 0.05. Which of the following represents the result of the relevant hypothesis test?
A. The alternative hypothesis is rejected.
B. The null hypothesis is rejected.
C. The null hypothesis is not rejected.
D. Insufficient information exists on which to make a decision.
📜 정답 보기
이므로 not reject이다.
C. The null hypothesis is not rejected.
17. Referring to Table F, suppose a = 0.05. Which of the following represents the correct conclusion?
A. There is no evidence of a difference in the variability of the waiting time between the two offices.
B. There is evidence of a difference in the variability of the waiting time between the two offices.
C. There is no evidence that the variability of the waiting time between the two offices are the same.
D. There is evidence that the variability of the waiting time between the two offices are the same.
📜 정답 보기
reject하지 않는다 -> 같다고 본다
‘차이가 있다’ 라는 가정에 대한 충분한 정보다 없다는 것이니까-> 결론적으론 차이가 없어서 같다.
A. There is no evidence of a difference in the variability of the waiting time between the two offices.
[TABLE G]
The following EXCEL output contains the results of a test to determine if the proportions of satisfied guests at two resorts are the same or different.
18. Referring to Table G, allowing for 0.75% probability of committing a Type I error, what are the decision and conclusion on testing whether there is any difference in the proportions of satisfied guests in the two resorts?
a) Do not reject the null hypothesis; there is enough evidence to conclude that there is significant difference in the proportions of satisfied guests at the two resorts.
b) Do not reject the null hypothesis; there is not enough evidence to conclude that there is significant difference in the proportions of satisfied guests at the two resorts.
c) Reject the null hypothesis; there is enough evidence to conclude that there is significant difference in the proportions of satisfied guests at the two resorts.
d) Reject the null hypothesis; there is not enough evidence to conclude that there is significant difference in the proportions of satisfied guests at the two resorts.
📜 정답 보기
0.75% 일 때,
p-value가 0.002623357로 나와있으므로
p-value가 더 작다 그러므로 reject이다 c) Reject the null hypothesis; there is enough evidence to conclude that there is significant difference in the proportions of satisfied guests at the two resorts
19. Referring to Table G, if you want to test the claim that “Resort 1 (Group 1) has a higher proportion of satisfied guests compared to Resort 2 (Group 2)”, the p-value of the test will be
a) 0.00262
b) 0.00262/2
c) 2*(0.00262)
d) 1-(0.00262/2)
📜 정답 보기
원래는 two-tail이였는데
higher proportion 이라고 문제에서 주어졌으니
one-tail로 바뀐 것이다. 그러므로 꼬리가 1/2배가 된 것이므로 p-value도 1/2이다.
b) 0.00262/2
20. Referring to Table G, if you want to test the claim that “Resort 1 (Group 1) has a lower proportion of satisfied guests compared to Resort 2 (Group 2)”, you will use
a) a t-test for the difference between two proportions.
b) a Z-test for the difference between two proportions.
c) an F test for the difference between two proportions.
📜 정답 보기
proportion은 무조건!
c) an F test for the difference between two proportions.
21. True or False: When testing for differences between the means of 2 related populations, we can use either a one-tailed or two-tailed test.
📜 정답 보기
True
22. True or False: For all two-sample tests, the sample sizes must be equal in the 2 groups.
📜 정답 보기
False -> independent에선 sample size가 다를 수 있다
23. True or False: The F distribution is symmetric.
📜 정답 보기
False
24. True or False: The F distribution can only have positive values.
📜 정답 보기
True : 당연히 비율에 대한 것 이니까