목차
- 개요
- INTRO
- What is a Hypothesis?
- The Hypothesis Testing Process
- Z-Test of Hypothesis for the Mean
- Risks in Decision Making Using Hypothesis Testing
- 문제
👀, 🤷♀️ , 📜, 📝
이 아이콘들을 누르시면 정답, 개념 부가 설명을 보실 수 있습니다:)
Fundamentals of Hypothesis Testing: One-Sample Tests
즉, 가설검증이다.
test라는 위딩이 들어갔다는 것은 이 추정의 결과로 인한 의사결정까지 한다는 것이다.
One-Sample Tests: 데이터 세트가 하나이다.
- One-Sample Tests: 우리나라 사람의 아이큐가 100 이상이다 -> 우리나라 사람의 아이큐라는 하나의 데이터 세트가 필요하다
- Two-Sample Tests: 우리나라와 일본의 아이큐를 비교해보면 우리나라가 더 높다 -> 우리나라 아이쿠 데이터 세트와 일본의 아이큐 데이터세트가 필요하다. 즉, 비교, 변화 검증에 많이 쓰인다.
개요
아래의 도식을 하나씩 자세히 알아볼 것이다.
- σ known: Fundamentals of Hypothesis Testing Methodology
- σ Unknown: t-Test of Hypothesis for the Mean
- One-Tail Tests(도식 전체에 적용)
- Population Proportion: Z-Test of Hypothesis for the Proportion
- Potential Hypothesis Testing Pitfalls and Ethical Issues(추가)
INTRO
[σ known]
Fundamentals of Hypothesis Testing Methodology
[Z-Test]
Z-Test of Hypothesis for the Mean (σ Known)
위의 개념은 크게 3가지로 나눠 배울 것이다.
- What is a Hypothesis?
- The Hypothesis Testing Process
- Z-Test of Hypothesis for the Mean
- Critical Value approach
- p-Value approach
- Risks in Hypothesis Testing
- Type I and Type II error
What is a Hypothesis?
A hypothesis is a claim (assertion) about a population parameter
- 즉, 우리나라의 왼손잡이의 비율이 15% 라는 문장이 있으면
- population parameter: 우리나라의 왼손잡이의 비율
- claim (assertion): 우리나라의 왼손잡이의 비율이 15%
- population mean: Example: The mean monthly cell phone bill in this city is μ = $42
- population proportion: The proportion of adults in this city with cell phones is π = 0.6
The Null Hypothesis, \(H_0\)
= 귀무 가설
많은사람들이 믿고있는 현재의 상태 설명: States the claim or assertion to be tested
즉 거의 대부분의 사람이 믿고 있으므로 항상 population parameter만 씀(not about a sample statistic)
ex) 지구는 둥글다.
[특징]
- Begin with the assumption that the null hypothesis is true
- Similar to the notion of innocent until proven guilty
- Refers to the status quo or historical value .
- 📌 Always contains “=“, or “≤”, or “≥” sign
- May or may not be rejected
The Alternative Hypothesis, \(H_1\)
많은사람들이 믿고있는 진리(\(H_0\))에 대항하는 가설이다.
ex) 지구는 평평하다
- Is the opposite of the null hypothesis
- opposite: 여집합의 의미 \(H_0\) 이 커버하지 못하는 여집합을 본다
- e.g., The mean diameter of a manufactured bolt is not equal to 30mm ( H1: μ ≠ 30 )
- 즉, Challenges the status quo
- 📌 Never contains the “=“, or “≤”, or “≥” sign
- May or may not be proven
- Is generally the hypothesis that the researcher is trying to prove
The Hypothesis Testing Process
가설 검증이란 뭘까?
쉽게 예를 들어서 설명하겠다
“사람들은 10개의 손가락을 가지고있다” 라는 The Null Hypothesis, \(H_0\)이 있다고 가정해보자.
그런데 이에 대해 “사람들의 손가락은 10개가 아니다”라는 \(H_1\)이 나왔다고 치자.
그래서 사람들을 조사해더니 이런 데이터가 나왔다.
자, 이 데이터로 사람들이 10개의 손가락을 가지고 있다고 할 수 있을까?
뭐, 하나 정도는 예외로 볼 수 있으니 이 데이터 만으론 \(H_0\)이 뒤집히진 않을 것이다.
그렇다면 아래의 데이터가 나왔다면? 이제부터 애매하기 시작할 것이다.
그렇다면 아래의 데이터들은?
어디까지가 “사람들은 10개의 손가락을 가지고있다” 라는 The Null Hypothesis, \(H_0\)을 뒤집을 수 있는 “사람들의 손가락은 10개가 아니다”라는 \(H_1\)일까??
이러한 기준을 정하고 어느가설이 맞는시는 판단하는것이 가설 검증이다.
그럼 조금 더 나이브하게 정리를 해보겠다.
1) 가운데(평균값)에서 얼마나 먼지 확인하고
2) 주어진 기준값(에러기준값)을 찾는 것이다(니가 틀릴 확률)
3) 그리고 내 샘플이 어디 위치한지를 보는 것이다. 4) 샘플이 에러기준값을 넘는지 안넘는지에 따라 가설을 채택한다.
Z-Test of Hypothesis for the Mean
Z-Test: Z-table을 보고 하는 것
test statistic: 내 데이터의 위치
자 이제 위의 개념을 실현할 2가지 방법들을 소개하겠다.
간단하게 말하면,
1️⃣ rejection area 구함
2️⃣ 내 test statistic 을 구해서 이 가설이 \(H_0\)를 받아들일지 거부할 지를 판단
인데 이를 두가지 방법으로 구체화해 볼 것이다
Critical Value approach
[과정]
1) State the null hypothesis, \(H_0\) and the alternative hypothesis, \(H_1\)
2) Choose the level of significance, α, and the sample size, n.
The level of significance is based on the relative importance of Type I and Type II errors
3) Determine the appropriate test statistic and sampling distribution
4) Determine the critical values that divide the rejection and nonrejection regions
5) Collect data and compute the value of the test statistic
6) Make the statistical decision and state the managerial conclusion.
- If the test statistic falls into the nonrejection region, do not reject the null hypothesis H0
- If the test statistic falls into the rejection region, reject the null hypothesis.
- Express the managerial conclusion in the context of the problem
위의 과정만 본다면 이해가 잘 안 될 것이다…
그러므로 예를 들어 이해해 보자!
Test the claim that the true mean diameter of a manufactured bolt is 30mm.
(Assume σ = 0.8)
(This is a two-tail test)
1) State the null hypothesis, \(H_0\) and the alternative hypothesis, H1
- \(H_0\): μ = 30
- \(H_1\): μ ≠ 30
2) Choose the level of significance, α, and the sample size, n.
- Suppose that α = 0.05 and n = 100 are chosen for this test
3) Determine the appropriate test statistic and sampling distribution
- σ is assumed known so this is a Z test.
4) Determine the critical values that divide the rejection and nonrejection regions
- For α = 0.05 the critical Z values are 1.96
- α는 양 끝의 오류값을 합합 값이니 한쪽 의 값은 α/2= 0.025이다.(α값은 현실은 학자가 결정 우리는 문제에서 줌)
- 그러므로 이 0.025를 Z-table에서 찾으면 1.96이다
5) Collect data and compute the value of the test statistic
- Suppose the sample results are n = 100, \(x ̅\) = 29.84 (σ = 0.8 8 is assumed known)
- So the test statistic is:
6) Make the statistical decision and state the managerial conclusion.
➡️ Since ZSTAT = -2.0 < -1.96, reject the null hypothesis and 📌conclude there is sufficient evidence📌 that the mean diameter of a manufactured bolt is not equal to 30
📌conclude there is sufficient evidence📌: 확률은 이렇게 표현한다는 것에 주의하자!! 확실하게 면 안된다!!!
p-Value approach
p-value: Probability of obtaining a test statistic equal to or more extreme than the observed sample value given \(H_0\) is true
- The p-value is also called the observed level of significance
- It is the smallest value of α for which \(H_0\)
can be rejected 쉽게 말하면, 오차일 확률의 합을 구하는 것이다 즉, 이 초록색부분의 확률합이다!(0.0456)
[성질]
Compare the p-value with α
- If p-value < α , reject \(H_0\)
- If p-value >= α , do not reject \(H_0\)
remember
- If the p-value is low then \(H_0\) must go
[과정]
1) State the null hypothesis, \(H_0\) and the alternative hypothesis, H1
2) Choose the level of significance, α, and the sample size, n.
The level of significance is based on the relative importance of Type I and Type II errors
3) Determine the appropriate test statistic and sampling distribution
4) Collect data and compute the value of the test statistic and p-vlaue
5) Make the statistical decision and state the managerial conclusion.
- If the p-value is < α then reject \(H_0\)
- otherwise do not reject \(H_0\)
- State the managerial conclusion in the context of the problem
[Critical Value approach와 차이점]
4) Determine the critical values that divide the rejection and nonrejection regions
위의 단계가 필요없다
그럼 다시 위의 예를 이용하여 이해해보자
Test the claim that the true mean diameter of a manufactured bolt is 30mm.
(Assume σ = 0.8)
(This is a two-tail test)
1) State the null hypothesis, \(H_0\) and the alternative hypothesis, H1
- H0: μ = 30
- H1: μ ≠ 30
2) Choose the level of significance, α, and the sample size, n.
- Suppose that α = 0.05 and n = 100 are chosen for this test
3) Determine the appropriate test statistic and sampling distribution
- σ is assumed known so this is a Z test.
4) Determine the critical values that divide the rejection and nonrejection regions
- For α = 0.05 the critical Z values are 1.96
- α는 양 끝의 오류값을 합합 값이니 한쪽 의 값은 α/2= 0.025이다.(α값은 현실은 학자가 결정 우리는 문제에서 줌)
- 그러므로 이 0.025를 Z-table에서 찾으면 1.96이다
5) Collect data and compute the value of the test statistic and p-vlaue
- Suppose the sample results are n = 100, \(x ̅\) = 29.84 (σ = 0.8 8 is assumed known)
- So the test statistic is:
6) Make the statistical decision and state the managerial conclusion.
- Is the p-value < α?
- Since p-value = 0.0456 < α = 0.05 Reject H0
- State the managerial conclusion in the context of the situation. There is 📌sufficient evidence to conclude📌 the mean diameter of a manufactured bolt is not equal to 30mm.
Risks in Decision Making Using Hypothesis Testing
- Type I Error
- 상식이 맞는데 상식이 아니야라고 잘못 추정
- Reject a true null hypothesis
- A type I error is a “false alarm”
- The probability of a Type I Error is α
- Called level of significance of the test
- Set by researcher in advance
- Type II Error
- 상식이 아닌데도 불구하고 상식이야라고 잘못 추정
- Failure to reject a false null hypothesis
- Type II error represents a “missed opportunity”
- The probability of a Type II Error is β
즉 두 에러가 동시에 일어날 수 없음
그럼 예를 들어서 이해해보자
- 빨간색 선: error라고 판단하는 기준
- Type II Error 초록색: 암이 아니지만 암이라고 판단하여 수술하는 경우
- Type I Error 빨간색: 암에 걸렸지만 암이 아니라고 판단하여 수술하지 않는 경우
즉 error에 따라 Type I Error와 Type II Error가 일어날 확률이 바뀐다
- 상호 배타적이다.
- 하나가 늘면 하나가 줄어든다
문제
1. Which of the following would be an appropriate null hypothesis?
a) The population proportion is less than 0.65.
b) The sample proportion is less than 0.65.
c) The population proportion is no less than 0.65.
d) The sample proportion is no less than 0.65.
📜 정답 보기
📌 Always contains “=“, or “≤”, or “≥” sign
즉 거의 대부분의 사람이 믿고 있으므로 항상 population parameter만 씀(not about a sample statistic)
c) The population proportion is no less than 0.65.
less하지 않다는거니까 같거나 크다 라는 “≥” 뜻임
2. Which of the following would be an appropriate alternative hypothesis?
a) The mean of a population is equal to 55.
b) The mean of a sample is equal to 55.
c) The mean of a population is greater than 55.
d) The mean of a sample is greater than 55.
📜 정답 보기
📌 Never contains the “=“, or “≤”, or “≥” sign
즉 거의 대부분의 사람이 믿고 있으므로 항상 population parameter만 씀(not about a sample statistic)
c) The mean of a population is greater than 55.
3. (T/F) The director of the city Park and Recreation Department claims that the mean distance people travel to the city’s greenbelt is 5.0 miles. Assume that the population standard deviation is known to be 1.2 miles and the significance level to be used to test the hypothesis is 0.01 when a sample size of n = 64 people are surveyed. Given this information, if the sample mean is 5.9 miles, the null hypothesis should be rejected.
📜 정답 보기
일단 맞는지 아닌지 보는 것 이므로 two-tail test가 맞다.
- mean 5.0 miles
- standard deviation 1.2 miles
- test the hypothesis is 0.01 when a sample size of n = 64
- if the sample mean is 5.9 miles
이 조건들을 정리해서 구해보자
이제 주어진 5.9를 test statistic으로 변형해보면,
즉 📌conclude there is sufficient evidence📌 that sample mean is 5.9 miles is rejected
TRUE
4. An entrepreneur is considering the purchase of a coin-operated laundry. The current owner claims that over the past 5 years, the average daily revenue was $675 with a standard deviation of $75. A sample of 30 days reveals a daily average revenue of $625. If you were to test the null hypothesis that the daily average revenue was $675 and decide not to reject the null hypothesis, what can you conclude?
a) There is not enough evidence to conclude that the daily average revenue was $675.
b) There is not enough evidence to conclude that the daily average revenue was not $675.
c) There is enough evidence to conclude that the daily average revenue was $675.
d) There is enough evidence to conclude that the daily average revenue was not $675.
📜 정답 보기
If you were to test the null hypothesis that the daily average revenue was $675 and decide not to reject the null hypothesis
675가 아니라는 명확한 증거가 없다.
📌 decide not to reject 얘는 절대 enough evidence가 아님
b) There is not enough evidence to conclude that the daily average revenue was not $675.
5. (T/F) A bank tests the null hypothesis that the mean age of the bank’s mortgage holders is 45. They take a sample and calculate a p-value of 0.0202. The null hypothesis would be rejected at a significance level of α = 0.05.
📜 정답 보기
p-value 0.0202 보다 α 0.05 가 더 큼
이므로 reject 된다
TRUE
[TABLE 9]
A student claims that he can correctly identify whether a person is a business major or an agriculture major by the way the person dresses. Suppose in actuality that if someone is a business major, he can correctly identify that person as a business major 87% of the time. When a person is an agriculture major, the student will incorrectly identify that person as a business major 16% of the time. Presented with one person and asked to identify the major of this person (who is either a business or agriculture major), he considers this to be a hypothesis test with the null hypothesis being that the person is a business major and the alternative that the person is an agriculture major.
6. Referring to Table 9, what would be a Type I error?
a) Saying that the person is a business major when in fact the person is a business major.
b) Saying that the person is a business major when in fact the person is an agriculture major.
c) Saying that the person is an agriculture major when in fact the person is a business major.
d) Saying that the person is an agriculture major when in fact the person is an agriculture major.
📜 정답 보기
\(H_0\): he null hypothesis being that the person is a business major
\(H_1\): the alternative that the person is an agriculture major
Type I Error: 상식이 맞는데 상식이 아니야라고 잘못 추정 c) Saying that the person is an agriculture major when in fact the person is a business major.
7. Referring to Table 9, what would be a Type II error?
a) Saying that the person is a business major when in fact the person is a business major.
b) Saying that the person is a business major when in fact the person is an agriculture major.
c) Saying that the person is an agriculture major when in fact the person is a business major.
d) Saying that the person is an agriculture major when in fact the person is an agriculture major.
📜 정답 보기
\(H_0\): he null hypothesis being that the person is a business major
\(H_1\): the alternative that the person is an agriculture major
Type II Error: 상식이 아닌데도 불구하고 상식이야라고 잘못 추정 b) Saying that the person is a business major when in fact the person is an agriculture major.
8. True or False: For a given level of significance, if the sample size is increased, the probability of committing a Type I error will increase.
📜 정답 보기
sample size is increased -> 데이터가 뾰족해짐
줄어듦
False
9. True or False: For a given level of significance, if the sample size is increased, the probability of committing a Type II error will increase.
📜 정답 보기
sample size is increased -> 데이터가 뾰족해짐
줄어듦
False