Download Discrete Data Analysis: Chi-Square Test and Hypothesis Testing and more Exams Biostatistics in PDF only on Docsity! BIOM601 Summer 2009 Analysis of Discrete Data Lectures 18 & 19 (June 24 & 25, 2009) BIOM601 Summer 2009 What is Discrete Data? • Data from discrete probability distributions – No continuous variation – Binomial, poisson, multinomial – Non-numeric data that falls into natural categories • Analysis of variance not feasible (why?) – Response variable not on a continuous scale – Variance calculations impossible if response variable is not quantitative • Handling of data – Frequency analysis BIOM601 Summer 2009 The Chi-Square Test • Test hypotheses for categorical data • Compare observed frequencies to theoretical (“expected”) frequencies • Test statistic: chi-square ( ) • Test statistic follows chi-square distribution • May have one or more simultaneous criteria to group observations 2χ BIOM601 Summer 2009 The Null Hypotheses • Null hypothesis: as usual, status quo – No difference – Absence of an effect or change – Independence (multi-way) • For all cases: agreement between observed and expected frequencies – (one way) – (multi-way)ijij ii eoH eoH = = : : 0 0 BIOM601 Summer 2009 The Alternative Hypotheses • Alternative hypothesis: no agreement between observed and expected frequencies (frequencies are different) – (one way) – (multi-way) • “Translation” of statistical hypotheses into biological hypothesis ijija iia eoH eoH ≠ ≠ : : BIOM601 Summer 2009 Finding the DF for the Test • DF: number of independent cells • One-way classification: DF is # cells – 1 • Multi-way classification – Find DF as above for each criteria – Multiply the individual DF to find overall DF – Special rules may apply (e.g.: genetics) • Table value for distribution – Degrees of freedom – Probability level α 2χ BIOM601 Summer 2009 Test Statistic iji ee , – are the observed (empirical) frequencies – are the expected (theoretical) frequencies under H0 – R, C: number of classes Praxis – Get observed frequencies – Calculate expected frequencies – Calculate test statistic ( ) ∑∑ = = − = R i C j ij ijij e eo 1 1 2 2χ ( )∑ = − = R i i ii e eo 1 2 2χ iji oo , BIOM601 Summer 2009 Finding the Expected Frequencies • One-way: usually a proportion (p) is defined in the hypothesis test. – Multiply p by the sample size to find one of the expected frequencies; find other frequency by difference – values need not be integers Example: 2 classes, n = 200, H0: π = .3 e1 = 200 ( .3) = 60 e2 = 200 (1 − .3) = 140 ie BIOM601 Summer 2009