SADC Course in Statistics Comparing several proportions (Session 15)

Slides:



Advertisements
Similar presentations
Introductory Mathematics & Statistics for Business
Advertisements

1 2 Test for Independence 2 Test for Independence.
1 2 Test for Independence 2 Test for Independence.
Lecture 2 ANALYSIS OF VARIANCE: AN INTRODUCTION
1 Session 9 Tests of Association in two-way tables.
1 Session 8 Tests of Hypotheses. 2 By the end of this session, you will be able to set up, conduct and interpret results from a test of hypothesis concerning.
SADC Course in Statistics Analysis of Variance for comparing means (Session 11)
SADC Course in Statistics Common Non- Parametric Methods for Comparing Two Samples (Session 20)
SADC Course in Statistics Estimating population characteristics with simple random sampling (Session 06)
The Poisson distribution
SADC Course in Statistics Further ideas concerning confidence intervals (Session 06)
SADC Course in Statistics Introduction to Non- Parametric Methods (Session 19)
SADC Course in Statistics Tests for Variances (Session 11)
Assumptions underlying regression analysis
SADC Course in Statistics Basic principles of hypothesis tests (Session 08)
SADC Course in Statistics Sampling weights: an appreciation (Sessions 19)
SADC Course in Statistics Inferences about the regression line (Session 03)
SADC Course in Statistics Importance of the normal distribution (Session 09)
SADC Course in Statistics Session 4 & 5 Producing Good Tables.
SADC Course in Statistics Comparing two proportions (Session 14)
SADC Course in Statistics Linking tests to confidence intervals (and other issues) (Session 10)
SADC Course in Statistics (Session 09)
SADC Course in Statistics Goodness-of-fit tests (and further issues) (Session 16)
SADC Course in Statistics Comparing Means from Paired Samples (Session 13)
SADC Course in Statistics Revision on tests for proportions using CAST (Session 18)
Probability Distributions
STATISTICAL INFERENCE ABOUT MEANS AND PROPORTIONS WITH TWO POPULATIONS
Chapter 7 Hypothesis Testing
Chapter 13: Chi-Square Test
Contingency Tables Prepared by Yu-Fen Li.
Chapter 16 Goodness-of-Fit Tests and Contingency Tables
Chi-Square and Analysis of Variance (ANOVA)
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 22 Comparing Two Proportions.
Lesson 14 - R Chapter 14 Review:
Putting Statistics to Work
© The McGraw-Hill Companies, Inc., Chapter 12 Chi-Square.
Chapter 18: The Chi-Square Statistic
CHAPTER 15: Tests of Significance: The Basics Lecture PowerPoint Slides The Basic Practice of Statistics 6 th Edition Moore / Notz / Fligner.
Chapter 11: The t Test for Two Related Samples
Chapter 11: Chi – Square Goodness – of – Fit Tests
1 Chapter 20: Statistical Tests for Ordinal Data.
Testing Hypotheses About Proportions
Categorical Data Analysis
January Structure of the book Section 1 (Ch 1 – 10) Basic concepts and techniques Section 2 (Ch 11 – 15): Inference for quantitative outcomes Section.
4/4/2015Slide 1 SOLVING THE PROBLEM A one-sample t-test of a population mean requires that the variable be quantitative. A one-sample test of a population.
Chapter 26 Comparing Counts
Chapter 13: Inference for Distributions of Categorical Data
Analysis of frequency counts with Chi square
© 2010 Pearson Prentice Hall. All rights reserved The Chi-Square Test of Independence.
SADC Course in Statistics Comparing Means from Independent Samples (Session 12)
Chapter 13: Inference in Regression
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter Inference on Categorical Data 12.
Chapter 11 Chi-Square Procedures 11.3 Chi-Square Test for Independence; Homogeneity of Proportions.
Chi-square (χ 2 ) Fenster Chi-Square Chi-Square χ 2 Chi-Square χ 2 Tests of Statistical Significance for Nominal Level Data (Note: can also be used for.
Chi-Square Procedures Chi-Square Test for Goodness of Fit, Independence of Variables, and Homogeneity of Proportions.
Analysis of Qualitative Data Dr Azmi Mohd Tamil Dept of Community Health Universiti Kebangsaan Malaysia FK6163.
Copyright © 2010 Pearson Education, Inc. Slide
Section 12.2: Tests for Homogeneity and Independence in a Two-Way Table.
Lecture PowerPoint Slides Basic Practice of Statistics 7 th Edition.
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.
Copyright © 2009 Pearson Education, Inc t LEARNING GOAL Understand when it is appropriate to use the Student t distribution rather than the normal.
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8… Where we are going… Significance Tests!! –Ch 9 Tests about a population proportion –Ch 9Tests.
Association between two categorical variables
Data Analysis for Two-Way Tables
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
Chapter 11: Inference for Distributions of Categorical Data
Chapter 13: Inference for Distributions of Categorical Data
11E The Chi-Square Test of Independence
Chi Square Test of Homogeneity
Presentation transcript:

SADC Course in Statistics Comparing several proportions (Session 15)

To put your footer here go to View > Header and Footer 2 Learning Objectives By the end of this session, you will be able to conduct and interpret results from a chi- square test for comparing several proportions explain how results above can be extended to the study of associations in general r x c tables state assumptions underlying the above test and actions to take if assumptions fail

To put your footer here go to View > Header and Footer 3 Example with several proportions Below is a 5x2 table of observed frequencies showing animals who did or did not get diseased after inoculation with one of five vaccines. Vaccinediseasedhealthy Total A B C D E Total Question: Does the proportion of diseased animals vary according to type of vaccine?

To put your footer here go to View > Header and Footer 4 Null and alternative hypotheses Translate the above question into a null hypothesis and an alternative hypothesis, i.e. H 0 : proportions are the same for each vaccine H 1 : proportions vary over vaccines If H 0 is true, best estimate of proportion is diseased total divided by grand total = 225/1350 = We use this to compute expected values in each row of the table.

To put your footer here go to View > Header and Footer 5 Chi-square test Thus the procedure is exactly similar to the case of comparing two proportions. Again we compute the chi-square test-statistic given by If H 0 is true, X 2 follows a 2 distribution with 4 d.f. (number of proportions being compared minus 1). Comparing to we get a p-value of , a highly significant result.

To put your footer here go to View > Header and Footer 6 Conclusions There is strong evidence that the proportions of diseased animals are not all the same for all vaccines. Note: The chi-square value above is nearly the same as that obtained in the previous session with data from a 2x2 table. This is a coincidence, but note the difference in d.f. Previously for 2x2 table, d.f.=1. In above example, d.f.=4. So although the test statistic is the same, p- values are different.

To put your footer here go to View > Header and Footer 7 Extensions to r x c tables Survey results are often expressed in terms of 2-way tables. In general, such tables may contain r rows and c columns. Questions of interest in such tables centre on whether these is an association between the two variables that have been tabulated. For example if the table tabulates education level of HH head (none, primary, secondary, tertiary) by poverty levels (not poor, poor, very poor), the question is poverty related to education may be asked.

To put your footer here go to View > Header and Footer 8 Chi-square test for an rxc table To answer the above question, the null hypothesis is that the two variables are NOT related, against the alternative that they are. Under the null hypothesis, comparison of expected values with observed values leads to a chi-square test. The d.f. associated with this test = (r-1)(c-1). In the above example, the d.f.=(4-1)(3-1)=6

To put your footer here go to View > Header and Footer 9 Assumption underlying the test The chi-square test is approximate –Validity relies on large samples –Small samples of unbalanced data (large and small counts together) may invalidate the approximation Rules of thumb for validity involve the expected values, E –Need large expected values under H 0 –Say, most E5 and none less than 1 –If rule of thumb is not satisfied, may have an unreliable p-value

To put your footer here go to View > Header and Footer 10 Actions when assumptions fail (a) Simple approaches: Collect more data if this is possible Collapse rows or columns if the table has more than two rows/columns. But need to recognise that –this leads to loss of information –with some types of variables, there may be no natural way of combining rows/columns

To put your footer here go to View > Header and Footer 11 Actions when assumptions fail (b) Use a continuity correction This method is often called Yates correction and is applicable just to 2x2 tables. First we show the standard chi-square value corresponding to a table with cell counts a, b, c, d as below. (Verify later that this is correct) col1col2 row1abr1r1 row2cdr2r2 n1n1 n2n2 N

To put your footer here go to View > Header and Footer 12 Actions when assumptions fail (b) Continuity correction (continued)… The approximation of X 2 to the chi-square is improved by reducing the absolute value of O-E by ½ before calculating X 2. This results in the X 2 taking the value below. Note: The equivalent when comparing two proportions using an z-test is to reduce by ½, the r value for the first p=r/n and increase by ½ the r value for the second proportion.

To put your footer here go to View > Header and Footer 13 Example of use of continuity corr n Whether smoker? Job Driver ConductorTotal No % % % Yes % % % Total % % 125 (100%) Above is the example on Bus data used during the practical sessions. Question of interest is whether the proportion of smokers are different across job types.

To put your footer here go to View > Header and Footer 14 Example of use of continuity corr n The usual chi-square test leads to X 2 =1.937 Applying the continuity correction, we get X 2 = Here, there is little difference because the sample sizes are reasonably large. More important to apply the continuity correction for small sample sizes.

To put your footer here go to View > Header and Footer 15 Actions when assumptions fail (ctd) (c) Using an Exact Test When actions suggested in (a) or (b) are not possible, consider using an Exact Test. Details of such tests are beyond the scope of this module. However, the basic approach is to compute all possible tables having the same marginal totals, and examine how extreme the observed table is, in comparison. Some software packages (e.g. Stata) have the facility to perform Fishers exact test. SPSS does this only for 2x2 tables. Special software also exist for such tests, e.g. StatXact.

To put your footer here go to View > Header and Footer 16 Limitations Chi-square tests are limited, in that only two factors are examined at a time. This may cause erroneous inferences to be made (see Practical 15 for an example). The inter-relations between more than two factors can be investigating using more sophisticated statistical techniques, e.g. log-linear modelling.

To put your footer here go to View > Header and Footer 17 References Altman, D.G., Machin, D., Bryant, T.N., and Gardner, M.J. (2000) Statistics with confidence. (2nd Edition). BMJ Books, Bristol, UK. pp 240. Armitage, P., Matthews J.N.S. and Berry G. (2002). Statistical Methods in Medical Research. 4th edn. Blackwell.

To put your footer here go to View > Header and Footer 18 Some practical work follows…