Statistical Analysis Professor Lynne Stokes

Slides:



Advertisements
Similar presentations
1 Chi-Square Test -- X 2 Test of Goodness of Fit.
Advertisements

CHI-SQUARE(X2) DISTRIBUTION
Lecture (11,12) Parameter Estimation of PDF and Fitting a Distribution Function.
Inference about the Difference Between the
Chapter 14 Analysis of Categorical Data
Chapter 16 Chi Squared Tests.
= == Critical Value = 1.64 X = 177  = 170 S = 16 N = 25 Z =
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 14 Goodness-of-Fit Tests and Categorical Data Analysis.
1 Inference About a Population Variance Sometimes we are interested in making inference about the variability of processes. Examples: –Investors use variance.
PSY 307 – Statistics for the Behavioral Sciences Chapter 19 – Chi-Square Test for Qualitative Data Chapter 21 – Deciding Which Test to Use.
5-3 Inference on the Means of Two Populations, Variances Unknown
Hypothesis Testing :The Difference between two population mean :
1 Nominal Data Greg C Elvers. 2 Parametric Statistics The inferential statistics that we have discussed, such as t and ANOVA, are parametric statistics.
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.
1 of 27 PSYC 4310/6310 Advanced Experimental Methods and Statistics © 2013, Michael Kalsher Michael J. Kalsher Department of Cognitive Science Adv. Experimental.
Aaker, Kumar, Day Ninth Edition Instructor’s Presentation Slides
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter Inference on Categorical Data 12.
Chi-Square Procedures Chi-Square Test for Goodness of Fit, Independence of Variables, and Homogeneity of Proportions.
© Copyright McGraw-Hill 2004
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 11 Analyzing the Association Between Categorical Variables Section 11.2 Testing Categorical.
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.
1 Statistical Analysis Professor Lynne Stokes Department of Statistical Science Lecture #1 Chi-square Contingency Table Test.
Objectives (BPS chapter 12) General rules of probability 1. Independence : Two events A and B are independent if the probability that one event occurs.
Slide 1 Copyright © 2004 Pearson Education, Inc. Chapter 11 Multinomial Experiments and Contingency Tables 11-1 Overview 11-2 Multinomial Experiments:
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.
CHI SQUARE DISTRIBUTION. The Chi-Square (  2 ) Distribution The chi-square distribution is the probability distribution of the sum of several independent,
The Chi Square Test A statistical method used to determine goodness of fit Chi-square requires no assumptions about the shape of the population distribution.
The Chi-square Statistic
Keller: Stats for Mgmt & Econ, 7th Ed Chi-Squared Tests
Chapter 12 Chi-Square Tests and Nonparametric Tests
Chapter 12 Analysis of count data.
Presentation 12 Chi-Square test.
Lecture8 Test forcomparison of proportion
CHAPTER 11 CHI-SQUARE TESTS
Chapter 11 Chi-Square Tests.
Chapter 4. Inference about Process Quality
Math 4030 – 10b Inferences Concerning Variances: Hypothesis Testing
Hypothesis Testing Review
Chapter 12 Tests with Qualitative Data
Active Learning Lecture Slides
Chapter 8 Hypothesis Testing with Two Samples.
John Loucks St. Edward’s University . SLIDES . BY.
Qualitative data – tests of association
Chapter 5 Hypothesis Testing
Goodness of Fit Tests The goal of goodness of fit tests is to test if the data comes from a certain distribution. There are various situations to which.
Goodness of Fit Tests The goal of χ2 goodness of fit tests is to test is the data comes from a certain distribution. There are various situations to which.
Data Analysis for Two-Way Tables
Elementary Statistics: Picturing The World
Inference on Categorical Data
Analysis of count data 1.
9 Tests of Hypotheses for a Single Sample CHAPTER OUTLINE
Goodness of Fit Test - Chi-Squared Distribution
Chapter 11: Inference for Distributions of Categorical Data
Chapter 10 Analyzing the Association Between Categorical Variables
Chapter 13 Goodness-of-Fit Tests and Contingency Analysis
Statistical Inference
Chapter 11 Chi-Square Tests.
Inference on Categorical Data
Lesson 11 - R Chapter 11 Review:
Analyzing the Association Between Categorical Variables
CHAPTER 11 CHI-SQUARE TESTS
BUSINESS MARKET RESEARCH
UNIT V CHISQUARE DISTRIBUTION
Applied Statistics Using SPSS
S.M.JOSHI COLLEGE, HADAPSAR
Last Update 12th May 2011 SESSION 41 & 42 Hypothesis Testing.
Applied Statistics Using SPSS
Chapter 13 Goodness-of-Fit Tests and Contingency Analysis
Chapter 11 Chi-Square Tests.
Statistical Inference for the Mean: t-test
Presentation transcript:

Statistical Analysis Professor Lynne Stokes Department of Statistical Science Lecture #2 Chi-square Tests for Homogeneity, Chi-square Goodness of Fit Test,

Chi-square Tests Tests for independence in contingency tables Tests for homogeneity

Binomial Samples (Product Binomial Sampling) Genetic Theory: Ho: pW = 0.5 vs. Ha: pW 0.5 Assumptions: 8 samples, mutually independent counts Hypothesis #1: Is pw = 0.5? Binomial inference on p Equivalently, overall goodness of fit (known p) Hypothesis #2: Are all the pw equal? Test for homogeneity (equal but unknown p) Hypothesis #3: Is each pw = 0.5? Goodness of fit (8 samples, known p)

Test of Homogeneity of k Binomial Samples, Specified p Ho: p1 = p2 = … =p8 = 0.5 vs. Ha: pj 0.5 for some j Does not assume homogeneity (see below) X2 = 22.96 , df = 8 , p = 0.003

Test of Homogeneity of k Binomial Samples: Unspecified p Ho: p1 = p2 = … =p8 vs. Ha: pj pk for some (j,k)

Test of Homogeneity of k Binomial Samples: Unspecified p Ho: p1 = p2 = … =p8 vs. Ha: pj pk for some (j,k) X2 = 20.43 , df = 7 , p = 0.005 Note: Only one of each pair of expected values is independently estimated (k = 8, not 16)

Chi-square Tests Tests for independence in contingency tables Tests for homogeneity Goodness of fit tests

Chi-square Goodness of Fit Test: Specified Probabilities Assumptions n independent observations k mutually exclusive possible outcomes pj = Pr(outcome j) is the same on every trial Sample size condition All npj 1 At least 80% of the npj 5

Goodness of Fit Test: Specified Probabilities Sample size: n Observed count for outcome j : Oj Expected count for outcome j : Ej = npj Ho: Pr(outcome j) = pj for j = 1 , ... , k Ha: Pr(outcome j) pj for at least one j Reject Ho if X2 > Xa2 Xa2 = Chi-Square df = k - 1

Sufficient Evidence of Cognitive Learning Path Chosen A B C D Total Number of rats 4 5 8 15 32 Expected number 8 8 8 8 32 Sufficient Evidence of Cognitive Learning ? p = 0.026 Using a significance level of a = 0.05, there is sufficient evidence (p = 0.026) to reject the hypothesis that rats choose the 4 doors with equal probability.

Mendelian Inheritance Do the genotypes of a cross-breeding occur in the ratio 9:3:3:1 ? Reject Ho if X2 > 7.815 (a = 0.05)

Mendelian Inheritance 0.25 0.08 1.33 1.00 X2 = 0.25 + 0.08 + 1.33 + 1.00 = 2.66 There is insufficient evidence (p > 0.10) at a significance level of 0.05 to conclude that the genotypes from this type of cross-breeding occur in proportions that differ from those predicted by Mendelian inheritance theory.

Chi-Square Goodness of Fit Test: Unknown Parameters Estimate the parameters of the distribution Divide range of data values into mutually exclusive and exhaustive classes Discrete data: often use the values themselves Continuous data: use k = n1/2 or k = log(n) classes Estimate the probability of being in each class Compare the observed (Oi) counts in each class with the estimated expected (Ei) counts

Chi-Square Goodness of Fit Test for the Poisson Distribution Number of senders (automated telephone equipment) in use at a given time 23 – 1 = 22 Categories H0: number ~ Poisson Ha: number not Poisson Reject if X > C20.05(20) = 31.4 df: 22 – 1 (mutually exclusive & exhaustive) – 1 (estimated parameter) = 20

Chi-Square Goodness of Fit Test for the Normal Distribution Divide the data into mutually exclusive and exhaustive (contiguous) classes First and last classes are open-ended ( , U1), (L2,U2), (L3, U3) … (Lk, ) with Lj = Uj-1 Estimate the mean and standard deviation Calculate z-scores for the limits of each class Estimate the Probability Content for Each Class pj = Pr(zLj < z < zUj) Estimate the Expected Frequency for Each Class Ej = npj

Chi-Square Goodness of Fit Test Can be applied to any discrete or continuous probability distribution, only probabilities need be specified: Ei = npi Asymptotic chi-square distribution All Ei > 1 & at Least 80% of the Ei > 5 Does not have the highest power for specific distributions, against specific alternatives Degrees of freedom (k classes) If each class represents an independent sample (i.e, k replicate samples) and all parameters are known (i.e., known probabilities), df = k If the classes represent mutually exclusive and exhaustive categories (i.e., expected frequencies must sum to n), data are independent and from a single sample All parameters are known, df = k – 1 r parameters are estimated: df = k – r – 1 e.g., (n – 1)s2/s2 ~ C2(n – 1)

Goodness of Fit to the Binomial, Known p Normal theory approximation Chi-square tests

Binomial Sample, Specified p: Normal Theory Approximation Genetic Theory: Ho: pW = 0.5 vs. Ha: pW 0.5 Greater Power by Combining Samples (Assuming Homogeneity) p = 0.110

Alternative to the Binomial Test: Chi-square Goodness of Fit, Specified p Genetic Theory: Ho: pW = 0.5 vs. Ha: pW 0.5 p = 0.110

Overall Binomial Test vs. Test of Homogeneity, Specified p Ho: p1 = p2 = … =p8 = 0.5 vs. Ha: pj 0.5 for some j X2 = 2.56 , df = 1 , p = 0.110 Greater Power if Homogeneous X2 = 22.96 , df = 8 , p = 0.003 Greater Power if Not Homogeneous

Homogeneity, unspecified p equivalent to independence Binomial Samples pw unspecified Homogeneity, unspecified p equivalent to independence

Some Goodness of Fit Tests Chi-square Goodness-of-fit test Very general, can have little power Kolmogorov-Smirnov goodness-of-fit test Good general test, especially for continuous random variables Wilk-Shapiro test for normality Regarded as the best test for normality

Comparing Odds Ratios Across Categories

Race and Death Penalty Punishment Are the results consistent across aggravation levels ?

Mantel-Haenszel Test Several 2 x 2 tables Assuming a common odds ratio, test that the odds ratio = 1

Race and Death Penalty Punishment Expected frequencies for chi-square test of independence Note: None have sufficient sample sizes for tests of independence

Mantel-Haenszel Test Select one cell; e.g., upper-left Calculate the excess for each table Excess = Observed – Expected e.g., Excess = O11 – E11 Calculate the variances of the excesses Variance = R1R2C1C2/n2(n-1)

Race and Death Penalty Punishment Conclusion: Nearly 7 more white-victim murderers received the death penalty than would be expected if the odds were the same for white- and black-victim murderers

Estimating the Common Odds Ratio Death Penalty and Race