Ch12-13: Factorial ANOVA, Blocking ANOVA, and χ 2 Test 27 Mar 2012 Dr. Sean Ho busi275.seanho.com Please download: 11-ANOVA.xls 11-ANOVA.xls HW8 this week.

Slides:



Advertisements
Similar presentations
12.1: One-way ANOVA 8 Nov 2011 BUSI275 Dr. Sean Ho HW7 due tonight Please download: 18-Delivery.xls 18-Delivery.xls.
Advertisements

Tests of Significance for Regression & Correlation b* will equal the population parameter of the slope rather thanbecause beta has another meaning with.
PSY 307 – Statistics for the Behavioral Sciences Chapter 20 – Tests for Ranked Data, Choosing Statistical Tests.
PSY 307 – Statistics for the Behavioral Sciences
Basic Data Analysis for Quantitative Research
FACTORIAL ANOVA.
LINEAR REGRESSION: Evaluating Regression Models Overview Assumptions for Linear Regression Evaluating a Regression Model.
Lecture 23: Tues., Dec. 2 Today: Thursday:
Chapter 14 Analysis of Categorical Data
Chapter 12 Chi-Square Tests and Nonparametric Tests
Final Review Session.
Chapter 14 Conducting & Reading Research Baumgartner et al Chapter 14 Inferential Data Analysis.
PSYC512: Research Methods PSYC512: Research Methods Lecture 19 Brian P. Dyre University of Idaho.
Chi Square Test Dealing with categorical dependant variable.
One-way Between Groups Analysis of Variance
Ch. 14: The Multiple Regression Model building
PSY 307 – Statistics for the Behavioral Sciences Chapter 19 – Chi-Square Test for Qualitative Data Chapter 21 – Deciding Which Test to Use.
Summary of Quantitative Analysis Neuman and Robson Ch. 11
Statistics for the Social Sciences Psychology 340 Fall 2013 Tuesday, November 19 Chi-Squared Test of Independence.
Statistics for the Social Sciences Psychology 340 Fall 2013 Thursday, November 21 Review for Exam #4.
Estimation and Hypothesis Testing Faculty of Information Technology King Mongkut’s University of Technology North Bangkok 1.
Inferential Statistics: SPSS
Ch2: Exploring Data: Charts 13 Sep 2011 BUSI275 Dr. Sean Ho HW1 due Thu 10pm Download and open “SportsShoes.xls”SportsShoes.xls.
t(ea) for Two: Test between the Means of Different Groups When you want to know if there is a ‘difference’ between the two groups in the mean Use “t-test”.
Chapter 9: Non-parametric Tests n Parametric vs Non-parametric n Chi-Square –1 way –2 way.
ANOVA (Analysis of Variance) by Aziza Munir
Between-Groups ANOVA Chapter 12. >When to use an F distribution Working with more than two samples >ANOVA Used with two or more nominal independent variables.
Ch14: Linear Correlation and Regression 13 Mar 2012 Dr. Sean Ho busi275.seanho.com Please download: 09-Regression.xls 09-Regression.xls HW6 this week Projects.
Ch15: Multiple Regression 12.1: One-way ANOVA 20 Mar 2012 Dr. Sean Ho busi275.seanho.com Please download: 10-MultRegr.xls 10-MultRegr.xls HW7 this week.
Chapter 19 Analysis of Variance (ANOVA). ANOVA How to test a null hypothesis that the means of more than two populations are equal. H 0 :  1 =  2 =
Education 793 Class Notes Presentation 10 Chi-Square Tests and One-Way ANOVA.
Section 9-1: Inference for Slope and Correlation Section 9-3: Confidence and Prediction Intervals Visit the Maths Study Centre.
12: Basic Data Analysis for Quantitative Research.
Educational Research Chapter 13 Inferential Statistics Gay, Mills, and Airasian 10 th Edition.
Ch10: T-tests 6 Mar 2012 Dr. Sean Ho busi275.seanho.com Please download: 08-TTests.xls 08-TTests.xls HW5 this week Projects.
Mixed-Design ANOVA 5 Nov 2010 CPSY501 Dr. Sean Ho Trinity Western University Please download: treatment5.sav.
ANOVA: Analysis of Variance.
CHI SQUARE TESTS.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-1 Chapter 11 Chi-Square Tests and Nonparametric Tests Statistics for.
1 ANALYSIS OF VARIANCE (ANOVA) Heibatollah Baghi, and Mastee Badii.
Chapter Outline Goodness of Fit test Test of Independence.
N318b Winter 2002 Nursing Statistics Specific statistical tests Chi-square (  2 ) Lecture 7.
Introduction to Basic Statistical Tools for Research OCED 5443 Interpreting Research in OCED Dr. Ausburn OCED 5443 Interpreting Research in OCED Dr. Ausburn.
Intro to Time Series and Semester Review 3 Apr 2012 Dr. Sean Ho busi275.seanho.com Please download: 12-TheFed.xls 12-TheFed.xls Presentations next week!
Simple Group Comparisons Comparison of a single sample (group) to the population Ho: Sample Statistic - Population Parameter = 0 Comparison of two independent.
Chi-Square X 2. Review: the “null” hypothesis Inferential statistics are used to test hypotheses Whenever we use inferential statistics the “null hypothesis”
Hypothesis test flow chart frequency data Measurement scale number of variables 1 basic χ 2 test (19.5) Table I χ 2 test for independence (19.9) Table.
: Pairwise t-Test and t-Test on Proportions 25 Oct 2011 BUSI275 Dr. Sean Ho HW6 due Thu Please download: Mileage.xls Mileage.xls.
Ch15: Multiple Regression 3 Nov 2011 BUSI275 Dr. Sean Ho HW7 due Tues Please download: 17-Hawlins.xls 17-Hawlins.xls.
Handout Twelve: Design & Analysis of Covariance
Chi-Square X 2. Review: the “null” hypothesis Inferential statistics are used to test hypotheses Whenever we use inferential statistics the “null hypothesis”
Copyright c 2001 The McGraw-Hill Companies, Inc.1 Chapter 11 Testing for Differences Differences betweens groups or categories of the independent variable.
Ch14: Correlation and Linear Regression 27 Oct 2011 BUSI275 Dr. Sean Ho HW6 due today Please download: 15-Trucks.xls 15-Trucks.xls.
: Hypothesis Tests on Regression 1 Nov 2011 BUSI275 Dr. Sean Ho HW7 due next Tues Please download: 16-Banks.xls 16-Banks.xls.
ANCOVA.
Semester Review 6 Dec 2011 BUSI275 Dr. Sean Ho Paper due tomorrow Final this Sat.
© 2006 by The McGraw-Hill Companies, Inc. All rights reserved. 1 Chapter 11 Testing for Differences Differences betweens groups or categories of the independent.
T-tests Chi-square Seminar 7. The previous week… We examined the z-test and one-sample t-test. Psychologists seldom use them, but they are useful to understand.
Jump to first page Inferring Sample Findings to the Population and Testing for Differences.
Ch16: Time Series 24 Nov 2011 BUSI275 Dr. Sean Ho HW8 due tonight Please download: 22-TheFed.xls 22-TheFed.xls.
Nonparametric Statistics
Biostatistics Regression and Correlation Methods Class #10 April 4, 2000.
Mixed-Design ANOVA 13 Nov 2009 CPSY501 Dr. Sean Ho Trinity Western University Please download: treatment5.sav.
Education 793 Class Notes ANCOVA Presentation 11.
Multiple Regression.
CHAPTER 29: Multiple Regression*
Hypothesis testing. Chi-square test
Presentation transcript:

Ch12-13: Factorial ANOVA, Blocking ANOVA, and χ 2 Test 27 Mar 2012 Dr. Sean Ho busi275.seanho.com Please download: 11-ANOVA.xls 11-ANOVA.xls HW8 this week Presentations in two weeks!

27 Mar 2012 BUSI275: ANOVA2 Outline for today Factorial ANOVA (multiple nominal IVs) Graphing Main effects and interaction Randomized Complete Block ANOVA Fixed vs. random effects Post-hoc analysis: Fisher's LSD χ 2 goodness-of-fit test: observed vs. expected Test against uniform distribution  CHIDIST(), CHITEST() Test of normality Test 2 nominal vars for independence  Marginal probabilities

27 Mar 2012 BUSI275: ANOVA3 Overview: regression / ANOVA Both: DV (outcome) quantitative Regression: IVs quant. (or use dummy coding) ANOVA: IVs nominal Global F-test: do all IVs together impact DV? R 2 : fraction of variability in DV explained Main effects: each IV's contribution Significance (p-val) vs. effect size (unique R 2 ) Follow-up (nominal IVs): Tukey-Kramer  See “Delivery” in 11-ANOVA.xls 11-ANOVA.xls Interaction: Multiple regr: include X 1 *X 2 as a predictor Factorial ANOVA (2-way, 3-way, etc.)

27 Mar 2012 BUSI275: ANOVA4 2-way ANOVA Equivalent to multiple regression Except with nominal predictors N-way ANOVA for N predictors IVs are “between-groups” factors: Divide up sample into cells Each participant in only 1 cell If your IVs are mixed continuous / nominal, try regression using dummy-coded variables Although this may result in many IVs! You can also try ANCOVA: Continuous “covariates” are first factored out then regular ANOVA is done on residuals IV1: Gender IV2: Src $40 $20 $25 $32 $17 $21 $19 $22 $30 $26 $25 $22 $19 $40 $45 $52 $43 $39 $48 $50 $60 $55 DV: Purch Amt

27 Mar 2012 BUSI275: ANOVA5 2-way: assumptions Same as for regular ANOVA, per cell: DV continuous Independent observations and independent cells (groups) DV normal within each cell Variance of DV similar across all cells:  (largest SD) / (smallest SD) < 2  Better: Levene's test of homoscedasticity The last two are less important as long as: Total sample size is reasonably large (>50) Balanced design: all cells similar sample size No rows/cols are completely empty IV1: Gender IV2: Src $40 $20 $25 $32 $17 $21 $19 $22 $30 $26 $25 $22 $19 $40 $45 $52 $43 $39 $48 $50 $60 $55 DV: Purch Amt

27 Mar 2012 BUSI275: ANOVA6 Graphing 2-way ANOVA data Dataset: “Eukanuba” in 11-ANOVA.xls 11-ANOVA.xls The DV has a different distribution in each cell One way to visualize: condense it down to the average of DV within each cell Pivot Table: Formula (row) Plant (col) Average of Fat (data) Try a line chart:

27 Mar 2012 BUSI275: ANOVA7 2-way ANOVA: model Main effects on each IV, plus interactions: Fat = b 0 + (Formula effect) + (Plant effct) + (Formula*Plant effect) + ε Decomposition of variance: SS tot = SS For + SS Plt + SS For*Plt + SS resid Global F-test looks for any effect of IVs on DV If not significant, check for violations of assumptions Effect size η 2 is akin to R 2 : 1 – (SS resid / SS tot )

27 Mar 2012 BUSI275: ANOVA8 2-way ANOVA: calculating -IV 1 (a levels)IV 2 (b levels)IV 1 *IV 2 (Interaction) SS dfa – 1b – 1(a – 1) * (b – 1) Also find SS tot as before, and SS res df tot = n – 1, and df res = n – ab The SS and df always add up:  Tot = IV 1 + IV 2 + (IV 1 *IV 2 ) + Resid 3 F-tests: IV 1, IV 2, and interaction e.g., main effect on IV 1 : F = MS 1 / MS res

27 Mar 2012 BUSI275: ANOVA9 Main effects A main effect is a one-way ANOVA on one IV, after controlling for the other predictors Analogous to t-tests on slope for each IV in multiple regression Here, the main effects are themselves F-tests E.g., do females spend more at your site, after accounting for source? 2-way ANOVA on both Gender and Source, then look at main effect of Gender E.g., do different formulas have different fat content, across all plants?

27 Mar 2012 BUSI275: ANOVA10 Interactions When the effect of one IV on the DV changes, depending on the level of the moderator e.g., females spend more in response to print ads, but males spend more in response to web e.g., Henderson generally has lower fat than the other plants, except for Large Breed, where it has the second- highest fat: Plot means, note change in shape of the curves

27 Mar 2012 BUSI275: ANOVA11 Outline for today Factorial ANOVA (multiple nominal IVs) Graphing Main effects and interaction Randomized Complete Block ANOVA Fixed vs. random effects Post-hoc analysis: Fisher's LSD χ 2 goodness-of-fit test: observed vs. expected Test against uniform distribution  CHIDIST(), CHITEST() Test of normality Test 2 nominal vars for independence  Marginal probabilities

27 Mar 2012 BUSI275: ANOVA12 Randomized Complete Block Special case of 2-way ANOVA, where each cell has only 1 observation IV1 is the factor: typically a fixed effect Fixed: levels are set in the hypothesis: e.g., gender, province, store branch, plant IV2 is the block: typically a random effect Random: levels are sampled from a population: e.g., customer, truck, day e.g, “Applebees” in 11-ANOVA.xls 11-ANOVA.xls Factor: Restaurant Block: Week DV: Revenue Restaurant Week

27 Mar 2012 BUSI275: ANOVA13 Randomized Block model A complete 2-way ANOVA on this data would have zero residual in each cell So the interaction term serves as “residual” Tot = Factor + Blocking + Residual  df res = (a – 1)(b – 1) Factor effect (IV 1 ): F = MS 1 / MS res This is usually what we're most interested in Blocking effect (IV 2 ): F = MS 2 / MS res If non-sig, then blocking was not necessary and we could've just done a 1-way ANOVA

27 Mar 2012 BUSI275: ANOVA14 Post-hoc: Fisher's LSD test If the factor effect is significant, one post-hoc test we can use is Fisher's least sig. diff. test Like Tukey-Kramer, but for equal-size cells Critical range: t: 2-tails, use df res b: # blocks (IV 2 ) For all pairs of levels of the main factor, if the difference of means |x i – x j | exceeds LSD, then those two groups differ significantly Use the results to cluster the factor levels

27 Mar 2012 BUSI275: ANOVA15 Outline for today Factorial ANOVA (multiple nominal IVs) Graphing Main effects and interaction Randomized Complete Block ANOVA Fixed vs. random effects Post-hoc analysis: Fisher's LSD χ 2 goodness-of-fit test: observed vs. expected Test against uniform distribution  CHIDIST(), CHITEST() Test of normality Test 2 nominal vars for independence  Marginal probabilities

17 Nov 2011 BUSI275: Categorical Data16 Goodness of fit The χ 2 (chi-squared) test is one way to assess goodness of fit: How well an observed distribution fits a hypothesized distribution Hypothesized distribution can be uniform, normal, etc. χ 2 can also be applied to test if two nominal variables are independent Compare pivot table (contingency table) with hypothesized results if vars independent Analogous to correlation for continuous vars

17 Nov 2011 BUSI275: Categorical Data17 χ 2 vs. uniform distribution e.g., are technical support calls evenly distributed across the weekdays? H 0 : evenly distributed, matches uniform dist. Expected # calls per day (uniform distribution): Total observed calls (1300), divided by 5 Test statistic: Use CHIDIST( χ 2, #cells – 1 ) Or CHITEST( obs, exp ) Observed Expected260 itl.nist.gov

17 Nov 2011 BUSI275: Categorical Data18 χ 2 vs. normal distribution e.g., are student test scores normally distrib? Other normality tests: Shapiro-Wilk, K-S Count frequency of test scores by bins How to find expected frequencies? Find mean, SD of the data Use NORMDIST() to find percentage of the data that would lie within each bin on the ideal normal:  NORMDIST(80, μ, σ, 1) – NORMDIST(75, μ, σ, 1) BinFreq Norm Freq

27 Mar 2012 BUSI275: ANOVA19 Outline for today Factorial ANOVA (multiple nominal IVs) Graphing Main effects and interaction Randomized Complete Block ANOVA Fixed vs. random effects Post-hoc analysis: Fisher's LSD χ 2 goodness-of-fit test: observed vs. expected Test against uniform distribution  CHIDIST(), CHITEST() Test of normality Test 2 nominal vars for independence  Marginal probabilities

17 Nov 2011 BUSI275: Categorical Data20 Contingency tables Joint freq. distribs for multiple nominal variables Each cell of the table holds the # (frequency) of observations that match that combo Pivot tables, with Count in the Data field E.g., Handedness vs. Gender H 0 : handedness is independent of gender: the probability of being left-handed stays the same, regardless of the gender  P( left | M ) = P( left | F ) = P( left ) ObservedLeftRight Male17163 Female33167

17 Nov 2011 BUSI275: Categorical Data21 χ 2 on 2-way contingency Expected values assume independence Calculate marginal probabilities: P( female ) = 200/380 ≈ 52.6% P( left ) = 50/380 ≈ 13.2% Assuming independence, P( F ∩ L ) = P(F) * P(L) = (.526)(.132) Thus the expected count for (F ∩ L) is P(F) * P(L) * (total) = (.526)(.132)(380) Calculate χ 2 summed over all cells df = (#rows – 1) (#cols – 1)  = 1 in this case! LRTot M F Tot

17 Nov 2011 BUSI275: Categorical Data22 Summary on χ 2 Test of goodness-of-fit: observed vs. expected May apply to a single nominal variable: Expected distrib. may be uniform, normal, … May apply to two nominal variables: Expected distrib. is that vars are independent Akin to correlation on continuous variables  Large χ 2 ↔ |r| ≈ 1 But only an approximation to the true distrib: Results may be invalid if cell counts are <5 May need to combine levels of a var

27 Mar 2012 BUSI275: ANOVA23 TODO HW8 due Thu Projects: be pro-active and self-led All groups have passed REB by now Presentations on 10Apr (2 weeks from now!) Remember your potential clients: what questions would they like answered? Tell a story/narrative in your presentation me your preferences for presentation slot