Chi-Square Test and Goodness-of-Fit Testing Ming-Tsung Hsu
2 Outline Goal of Hypothesis Test Terms & Notation Chi-Square Test Goodness-of-Fit Testing Example
3 Goal of Hypothesis Test To examine statistical evidence, and to determine whether it supports or contradicts a claim The life of lamps is more than 10,000 hours The data are from normal distribution To reduce the directly-relevant data to a “level of suspicion” based purely on the data
4 Terms & Notation Null Hypothesis (H 0 ) vs. Alternative hypothesis (H 1 or H A ) Type I Error vs. Type II Error Parametric Test vs. Non-Parametric Test Significance level (α) and Critical Region “Reject H 0 ” vs. “Do not reject H 0 “ Central Limit Theorem Sampling distribution of the sample mean Test Statistic vs. Table Value P-value
5 Null Hypothesis vs. Alternative hypothesis
6 Type I Error vs. Type II Error Type I error H 0 is true but reject H 0 Pr(reject H 0 | H 0 ) = α Type II error H 1 is true but do not reject H 0 Pr(do not reject H 0 | H 1 ) = β
7 Parametric Test vs. Non-Parametric Test Parametric Test Parameters of population Mean test, variance test, etc. Non-Parametric Test Make no assumptions about the frequency distributions of the variables being assessed Independent test, distribution test, etc.
8 Significance level (α) and Critical Region
9 Central Limit Theorem
10 Test Statistic vs. Table Value
11 P-value
12 Chi-Square Test Non-Parametric Test T. S. ~χ 2 (ν) Goodness-of-Fit Test Also known as “Pearson's chi-square test” Independent Test Homogeneity Test
13 Goodness-of-Fit Testing Used to test if a sample of data came from a population with a specific distribution O i : Observations of i th group E i : Expected frequency of i th group k : Number of groups m: Number of estimated parameters K-1-m: Degree of freedom
14 Example
15 Parameter Estimation - λ
16 Observations and Expected Frequencies IntervalObstF(t) = p(T < t)C.F.Frequency 0 ~ < ~ < ~ < ~ < ~ < ≧ ?!?!
17 Test Statistic and P-value
18 Observations and Expected Frequencies - Paper
19 Re-Grouping IDlowerupperFreq ObstF(x)C. F.E. F ≧ # of groups = *log(n)