• Home
  • About
    • Yerim Oh photo

      Yerim Oh

      Happy and worthwhile day by day :)

    • Learn More
    • Email
    • LinkedIn
    • Instagram
    • Github
    • Youtube
  • Posts
    • All Posts
    • All Tags
  • Projects

[16] STATISTICS: Two-Sample Tests_Population proportion

16 Feb 2020

Reading time ~3 minutes

Table of Contents
  • 목차
  • Fundamentals of Hypothesis Testing: Two-Sample Tests
  • 개요
    • 결정 방법
    • 각각 구하는 식
  • Comparing the mean of Population proportion
    • Population proportion
    • 정규화 조건
    • tail
  • How to Solve
    • Example
    • SOLVE

목차

  • Fundamentals of Hypothesis Testing: Two-Sample Tests
  • 개요
    • 결정 방법
    • 각각 구하는 식
  • Comparing the mean of Population proportion
    • Population proportion
    • 정규화 조건
    • tail
  • How to Solve
    • Example
    • SOLVE

👀, 🤷‍♀️ , 📜, 📝
이 아이콘들을 누르시면 정답, 개념 부가 설명을 보실 수 있습니다:)



Fundamentals of Hypothesis Testing: Two-Sample Tests

즉, 가설검증이다.
test라는 위딩이 들어갔다는 것은 이 추정의 결과로 인한 의사결정까지 한다는 것이다.

Two-Sample Tests: 데이터 세트가 두개이다.

  • One-Sample Tests: 우리나라 사람의 아이큐가 100 이상이다 -> 우리나라 사람의 아이큐라는 하나의 데이터 세트가 필요하다
  • Two-Sample Tests: 우리나라와 일본의 아이큐를 비교해보면 우리나라가 더 높다 -> 우리나라 아이쿠 데이터 세트와 일본의 아이큐 데이터세트가 필요하다. 즉, 비교, 변화 검증에 많이 쓰인다.

개요

아래의 도식을 하나씩 자세히 알아볼 것이다.
image

  • 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

결정 방법

image

각각 구하는 식

이제 여기에 나온 식들을 예를 들어 하나씩 사용해볼 것이다!
(지금은 이렇다~ 정도만 알아두자)
왜 이런식이 유도되었는지 보단 어떤 문제라서 어떤 식을 써야하는 지가 중요하다
image 위 그림 다운받기

➕ 꿀팁이 있는데 여기 경우에 따라 계산해주는 계산기가 있다(대신 어떤 경우에 어떤 계산기를 쓰는지 알아야 함으로 포스티팅을 끝까지 잘 보자!)



Comparing the mean of Population proportion

image

Population 은 무조건 Z-test이다.

  • onr-sample proportion populaiton 더 알아보기

즉 6번째 case이다.
image


Population proportion

Goal: test a hypothesis or form a confidence interval for the difference between two population proportions, \(𝜋_1\)−\(𝜋_1\).

위의 표에 있는 식들을 한번 더 설명해주겠다.

  • The point estimate for the difference is:
    • \(P_1\)−\(P_2\).
  • The pooled estimate for the overall proportion is:
    • In the null hypothesis we assume the null hypothesis is true, so we assume π1= π2 and pool the two sample estimates
    • 즉 각각의 샘플이 아닌 두 샘플을 더한 전체중에서 기준에 해당하는 비율
    • image
    • where X1 and X2 are the number of items of interest in samples 1 and 2
  • test statistic for π1– π2:
    image

정규화 조건

아래의 식이 5 이상이여야 어느정도 정규화된 데이터라고 볼 수 있고,
이러한 조건을 만족해야 계산을 진행해나갈 수 있다. image



tail

image



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

Is there a significant difference between the proportion of men and the proportion of women who will vote Yes on Proposition A?
In a random sample, 36 of 72 men and 35 of 50 women indicated they would vote Yes
Test at the .05 level of significance

➕ population proportions은 independent sample이기 때문에 sample의 사이즈가 같지 않아도 된다.



SOLVE

1) Check: tail 확인 image

Is there a significant difference
➡️ 문제의 최종 의도는 남여간의 차이가 있냐 없냐 이다
➡️ two-tail test

즉 아래의 표를 하나씩 구해보자 image


3) 조건 확인

  • \(𝐻_0\): \(π_{1} - π_{2}\) = 0 (the two proportions are equal)
  • \(𝐻_1\): \(π_{1} - π_{2}\) ≠ 0 (the two proportions are equal)

4) proportions 구하기

  • The sample proportions are:
    • image
  • The pooled estimate for the overall proportion is:
    • 전체 중에서 yes를 한 사람의 비율
    • image

4) find test statistic
그럼 위에서 구한 요소들을 대입해서 계산을 해보면,
image 즉 -2.20이다


7) find critical value
at the .05 level of significance이므로
이를 z-table에서 찾으면 -1.96이다.
image


8) Dicision
image Reach a decision and interpret the result:
➡️ Reject \(H_0\) at a = 0.05

  • There is evidence of a significant difference in the proportion of men and women who will vote yes.


Mathematics Share Tweet +1