Presentation on theme: "Hypothesis Testing IV (Chi Square)"— Presentation transcript:
1 Hypothesis Testing IV (Chi Square) Chapter 11Hypothesis Testing IV (Chi Square)
2 Basic LogicChi Square is a test of significance based on bivariate tables.We are looking for significant differences between the actual cell frequencies in a table (fo) and those that would be expected by random chance (fe).
3 The relationship of homicide rate and gun sales Low homicideHigh homicideTotalsLow gun sales8513High gun sales41225
4 Tables Notice the following about these tables 1. Table must have a title2. Independent vrble must go into columns and if percentaged, must percentage within columns3. Subtotals are called marginals.4. N is reported at the intersection of row and column marginals.
5 Tables Title Rows Column 1 Column 2 Row 1 cell a cell b Row Marginal 1 cell ccell dMarginal 2ColumnN
6 Example of Computation Problem 11.2Are the homicide rate and volume of gun sales related for a sample of 25 cities?
7 Example of Computation The bivariate table showing the relationship between homicide rate (columns) and gun sales (rows). This 2x2 table has 4 cells.LowHigh851341225
8 Example of Computation Use Formula 11.2 to find fe.Multiply column and row marginals for each cell and divide by N.For Problem 11.2(13*12)/25 = 156/25 = 6.24(13*13)/25 = 169/25 = 6.76(12*12)/25 = 144/25 = 5.76(12*13)/25 = 156/25 = 6.24
9 Example of Computation Expected frequencies:LowHigh6.246.76135.761225
10 Example of Computation A computational table helps organize the computations.fofefo - fe(fo - fe)2(fo - fe)2 /fe86.2456.7645.7625
11 Example of Computation Subtract each fe from each fo. The total of this column must be zero.fofefo - fe(fo - fe)2(fo - fe)2 /fe86.241.7656.76-1.7645.7625
12 Example of Computation Square each of these valuesfofefo - fe(fo - fe)2(fo - fe)2 /fe86.241.763.1056.76-1.7645.7625
13 Example of Computation Divide each of the squared values by the fe for that cell. The sum of this column is chi squarefofefo - fe(fo - fe)2(fo - fe)2 /fe86.241.763.10.5056.76-1.76.4645.76.5425χ2 = 2.00
14 Step 1 Make Assumptions and Meet Test Requirements Independent random samplesLOM is nominalNote the minimal assumptions. In particular, note that no assumption is made about the shape of the distribution of the parameters. The chi square test is non-parametric.
15 Step 2 State the Null Hypothesis H0: The variables are independentAnother way to state the H0, more consistent with previous tests:H0: fo = fe
16 Step 2 State the Null Hypothesis H1: The variables are dependentAnother way to state the H1:H1: fo ≠ fe
17 Step 3 Select the S. D. and Establish the C. R. Sampling Distribution = χ2Alpha = .05df = (r-1)(c-1) = 1χ2 (critical) = 3.841
18 Calculate the Test Statistic χ2 (obtained) = 2.00
19 Step 5 Make a Decision and Interpret the Results of the Test χ2 (critical) = 3.841χ2 (obtained) = 2.00The test statistic is not in the Critical Region. Fail to reject the H0.There is no significant relationship between homicide rate and gun sales.
20 Interpreting Chi Square The chi square test tells us only if the variables are independent or not.It does not tell us the pattern or nature of the relationship.To investigate the pattern, compute %s within each column and compare across the columns.
21 Interpreting Chi Square Cities low on homicide rate were low in gun sales and cities high in homicide rate were high in gun sales.As homicide rates increase, gun sales increase. This relationship is not significant . The apparent pattern may be sampling error.LowHigh8 (66.7%)5 (38.5%)134 (33.3%)8 (61.5%)1212 (100%)13 (100%)25
22 The Limits of Chi Square Like all tests of hypothesis, chi square is sensitive to sample size.As N increases, obtained chi square increases.With large samples, trivial relationships may be significant.Remember: significance is not the same thing as importance.
23 Additional limitsIf there are more than four categories in either variable, the use of chi square is questionable.If one of the cells has a frequency less than 5 (as in our example), the use of chi square is questionable