1 Chi-Square Test -- X 2 Test of Goodness of Fit.

Slides:



Advertisements
Similar presentations
CHI-SQUARE(X2) DISTRIBUTION
Advertisements

Lecture (11,12) Parameter Estimation of PDF and Fitting a Distribution Function.
Hypothesis Testing Steps in Hypothesis Testing:
Hypothesis Testing IV Chi Square.
Statistics II: An Overview of Statistics. Outline for Statistics II Lecture: SPSS Syntax – Some examples. Normal Distribution Curve. Sampling Distribution.
11-2 Goodness-of-Fit In this section, we consider sample data consisting of observed frequency counts arranged in a single row or column (called a one-way.
BCOR 1020 Business Statistics
Hypothesis Testing and T-Tests. Hypothesis Tests Related to Differences Copyright © 2009 Pearson Education, Inc. Chapter Tests of Differences One.
The Chi-square Statistic. Goodness of fit 0 This test is used to decide whether there is any difference between the observed (experimental) value and.
Testing Distributions Section Starter Elite distance runners are thinner than the rest of us. Skinfold thickness, which indirectly measures.
Section 10.1 Goodness of Fit. Section 10.1 Objectives Use the chi-square distribution to test whether a frequency distribution fits a claimed distribution.
Statistics. Key statistics and their purposes Chi squared test: determines if a data set is random or accounted for by an unwanted variable Standard deviation:
QMS 6351 Statistics and Research Methods Regression Analysis: Testing for Significance Chapter 14 ( ) Chapter 15 (15.5) Prof. Vera Adamchik.
Two Variable Statistics
1 Statistical Distribution Fitting Dr. Jason Merrick.
Tests for Random Numbers Dr. Akram Ibrahim Aly Lecture (9)
Chi-squared Tests. We want to test the “goodness of fit” of a particular theoretical distribution to an observed distribution. The procedure is: 1. Set.
Statistics in Biology. Histogram Shows continuous data – Data within a particular range.
Testing Hypothesis That Data Fit a Given Probability Distribution Problem: We have a sample of size n. Determine if the data fits a probability distribution.
EMIS 7300 SYSTEMS ANALYSIS METHODS FALL 2005 Dr. John Lipp Copyright © Dr. John Lipp.
Fitting probability models to frequency data. Review - proportions Data: discrete nominal variable with two states (“success” and “failure”) You can do.
Previous Lecture: Phylogenetics. Analysis of Variance This Lecture Judy Zhong Ph.D.
Tests of Random Number Generators
Section 10.2 Independence. Section 10.2 Objectives Use a chi-square distribution to test whether two variables are independent Use a contingency table.
Lecture 11. The chi-square test for goodness of fit.
1 Chi-square Test Dr. T. T. Kachwala. Using the Chi-Square Test 2 The following are the two Applications: 1. Chi square as a test of Independence 2.Chi.
Chapter 13- Inference For Tables: Chi-square Procedures Section Test for goodness of fit Section Inference for Two-Way tables Presented By:
Correlation. u Definition u Formula Positive Correlation r =
Chapter 14 – 1 Chi-Square Chi-Square as a Statistical Test Statistical Independence Hypothesis Testing with Chi-Square The Assumptions Stating the Research.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 12 Tests of Goodness of Fit and Independence n Goodness of Fit Test: A Multinomial.
Chi Square Test for Goodness of Fit Determining if our sample fits the way it should be.
MONTE CARLO METHOD DISCRETE SIMULATION RANDOM NUMBER GENERATION Chapter 3 : Random Number Generation.
Chapter 11: Categorical Data n Chi-square goodness of fit test allows us to examine a single distribution of a categorical variable in a population. n.
Class Seven Turn In: Chapter 18: 32, 34, 36 Chapter 19: 26, 34, 44 Quiz 3 For Class Eight: Chapter 20: 18, 20, 24 Chapter 22: 34, 36 Read Chapters 23 &
AP Statistics Chapter 13 Section 1. 2 kinds of Chi – Squared tests 1.Chi-square goodness of fit – extends inference on proportions to more than 2 proportions.
Section 10.2 Objectives Use a contingency table to find expected frequencies Use a chi-square distribution to test whether two variables are independent.
CHI SQUARE DISTRIBUTION. The Chi-Square (  2 ) Distribution The chi-square distribution is the probability distribution of the sum of several independent,
Statistics and probability Dr. Khaled Ismael Almghari Phone No:
Cross Tabulation with Chi Square
More on Inference.
Chapter 9: Non-parametric Tests
Inference for Regression (Chapter 14) A.P. Stats Review Topic #3
Lecture Nine - Twelve Tests of Significance.
Chapter 4. Inference about Process Quality
STAT 312 Chapter 7 - Statistical Intervals Based on a Single Sample
Math 4030 – 10b Inferences Concerning Variances: Hypothesis Testing
Active Learning Lecture Slides
Part Three. Data Analysis
Data Analysis for Two-Way Tables
Elementary Statistics: Picturing The World
More on Inference.
AP Statistics Multiple Choice Investigation
Chapter 7 Random Number Generation
Statistics and Computers
Chapter 7 Random-Number Generation
Properties of Random Numbers
What I learned in statistics
Discrete Event Simulation - 4
Basic analysis Process the data validation editing coding data entry
Chi Square Analysis The chi square analysis allows you to use statistics to determine if your data is “good”. In our fruit fly labs we are using laws of.
P-VALUE.
Analyzing the Association Between Categorical Variables
Statistics II: An Overview of Statistics
Random Number Generation
Summary Table of Influence Procedures for a Single Sample (I)
Chi Squared! Determine whether the difference between an observed and expected frequency distribution is statistically significant Complete your work sheet.
Graphs and Chi Square.
Chapter Outline Goodness of Fit test Test of Independence.
Statistical Inference for the Mean: t-test
Testing a Claim About a Standard Deviation or Variance
Presentation transcript:

1 Chi-Square Test -- X 2 Test of Goodness of Fit

2 (Pseudo) Random Numbers  Uniform: values conform to a uniform distribution  Independent: probability of observing a particular value is independent of the previous values  Should always test uniformity

3 Test for Independence  Autocorrelation Test Tests the correlation between successive numbers and compares to the expected correlation of zero e.g  There is a correlation between 2 & 3 We won’t do this test  software available

4 Hypotheses & Significance Level  Null Hypotheses – Ho Numbers are distributed uniformly Failure to reject Ho shows that evidence of non-uniformity has not been detected  Level of Significance – α (alpha) α = P(reject Ho|Ho is true)

5 Frequency Tests (Uniformity)  Kolmogorov-Smirnov More powerful Can be applied to small samples  Chi Square Large Sample size >50 or 100 Simpler test

6 Overview  Not 100% accurate  Formalizes the idea of comparing histograms to candidate probability functions  Valid for large samples  Valid for Discrete & Continuous

7 Chi-Square Steps - #1  Arrange the n observations into k classes  Test Statistic: X 2 = Σ (i=0..k) ( O i – E i ) 2 / E i O i = observed # in i th class E i = expected # in i th class  Approximates a X 2 distribution with (k-s-1) degrees of freedom

8 Degrees of Freedom  Approximates a X 2 distribution with (k-s-1) degrees of freedom  s = # of parameters for the dist.  Ho: RV X conforms to ?? distribution with parameters ??  H1: RV X does not conform  Critical value: X 2 (alpha,dof) from table  Ho reject if X 2 > X 2 (alpha,dof)

9 X 2 Rules  Each Ei > 5  If discrete, each value should be separate group  If group too small, can combine adjacent, then reduce dof by 1  Suggested values n = 50, k = 5 – 10 n = 100, k = 10 – 20 n > 100, k = sqrt(n) – n/5

10 Degrees of Freedom  k – s – 1  Normal: s=2  Exponential: s = 1  Uniform: s = 0

11 X 2 Example  Ho: Ages of MSU students conform to a normal distribution with mean 25 and standard deviation 4.  Calculate the expected % for 8 ranges of width 5 from the mean.

12 X 2 Example  Expected percentages & values <10-15 = 2.5% = 13.5% = 34% = 34% = 13.5% > = 2.5%5

13 X 2 Example  Consider 200 observations with the following results: = = = = = = 10

14 Graph of Data

15 X 2 Example  X 2 Values – (O-E) 2 /E = (5-1) 2 / = (27-70) 2 / = (68-68) 2 / = (68-41) 2 / = (27-10) 2 / = (5-10) 2 /45 Total98

16 X 2 Example  DOF = 6-3 = 3  Alpha = 0.05  X 2 table value = 7.81  X 2 calculated = 98  Reject Hypothesis