Skip to main content
뒤로

Chi-Square Tests and One-Sample Z-Tests: Hypothesis Testing in Statistics

스터디 가이드 - 스마트 노트

자료에 맞춘 맞춤형 노트, 핵심 정의, 예시, 맥락을 확장해 제공합니다.

Chi-Square Tests

Types of Pearson’s Chi-Square Tests

The Pearson’s chi-square test is a statistical method used to analyze categorical data. There are two main types:

  • Chi-square goodness of fit test: Tests whether the observed frequency distribution of a single categorical variable matches an expected distribution.

  • Chi-square test of independence: Tests whether two categorical variables are independent or associated.

Chi-square is often denoted as .

Goodness of Fit Test Example: Gold Lotto

To determine if the Gold Lotto is fair, we compare the observed frequencies of outcomes to the expected frequencies. The calculation involves:

  • Listing all possible outcomes and their observed frequencies.

  • Calculating the difference between observed and expected frequencies.

  • Squaring the differences and dividing by the expected frequency for each outcome.

Number

Times Drawn

Difference

Difference Squared

Partial ChiSq

1

166

7.7777778

60.4938272

0.3823346

2

162

3.7777778

14.2716049

0.0901995

3

168

9.7777778

95.6049383

0.6042472

4

165

6.7777778

45.9382716

0.2903612

5

158

-0.2222222

0.0493827

0.0003120

6

171

11.7777778

138.7283951

0.8795069

7

142

-17.2222222

296.0493827

1.8795069

8

159

-0.2222222

0.0493827

0.0003120

9

149

-10.2222222

104.4938272

0.6632472

10

153

-6.2222222

38.7283951

0.2451995

11

157

-2.2222222

4.9382716

0.0312110

12

163

4.7777778

22.8179012

0.1469627

13

151

-8.2222222

67.6049383

0.4369627

14

160

0.7777778

0.6049383

0.0039110

15

161

1.7777778

3.1604938

0.0192472

16

157

-2.2222222

4.9382716

0.0312110

17

156

-3.2222222

10.3827160

0.0654321

Gold Lotto chi-square calculation table

The sum of the Partial ChiSq column gives the test statistic .

Interpreting the Test Statistic

  • Degrees of freedom (DF) = number of categories - 1

  • Significance level (α) is typically 0.05

  • Compare the calculated test statistic to the critical value from the chi-square distribution table

If the test statistic is less than the critical value, do not reject the null hypothesis (). If it is greater, reject $H_0$.

Chi-Square Test of Independence Example

To test if students' favorite subjects are associated with their grade levels, a contingency table is constructed and expected values are calculated. The test statistic is computed as:

  • , where is observed frequency and is expected frequency.

Chi-square calculation for contingency tableSumming partial chi-square values

Degrees of freedom: , where is the number of rows and is the number of columns.

Compare the calculated statistic to the critical value (e.g., 9.488 for df=4, α=0.05). If the statistic exceeds the critical value, reject .

One-Sample Proportion Z-Test

Purpose and Formula

The one-sample proportion z-test is used to determine if the proportion of successes in a sample is significantly different from a known or hypothesized population proportion.

The test statistic is calculated as:

Explanation of the one-sample proportion z-test formula

  • X: Number of successes in the sample

  • n: Sample size

  • p: Hypothesized population proportion

  • T: Test statistic

Critical Values and Decision Rules

For a one-tailed test at α = 0.05, the critical value is approximately 1.645. If the calculated test statistic exceeds this value, reject .

Rejection region for upper-tailed Z test

One-Sample Z-Test for a Mean

Purpose and Assumptions

The one-sample Z-test for a mean is used to determine if the mean of a sample is significantly different from a known or hypothesized population mean. The population standard deviation () must be known, and the data should be approximately normally distributed.

Test Statistic Formula

The test statistic is calculated as:

  • : Sample mean

  • : Population mean

  • : Population standard deviation

  • n: Sample size

Critical Values and Rejection Regions

For a left-tailed test at α = 0.05, the critical value is -1.645. For a two-tailed test at α = 0.05, the critical values are ±1.96.

Rejection region for lower-tailed Z testRejection region for two-tailed Z test

Example Calculation

Suppose a sample mean is 66, population mean is 65, population standard deviation is 3, and sample size is 50:

Z-test calculation example

Since 2.36 > 1.96, we reject the null hypothesis at α = 0.05.

Interpreting Results

  • If the test statistic falls in the rejection region, reject .

  • If the test statistic does not fall in the rejection region, do not reject .

  • Alternatively, compare the p-value to α: if p-value < α, reject .

Summary Table: Comparison of Tests

Test

Purpose

Data Type

Key Formula

Chi-square goodness of fit

Compare observed to expected frequencies

Categorical

Chi-square test of independence

Test association between two categorical variables

Categorical

One-sample proportion z-test

Compare sample proportion to population proportion

Proportion

One-sample Z-test for mean

Compare sample mean to population mean

Numerical

Pearson Logo

스터디 프렙