Experimental Statistics - week 5

Slides:



Advertisements
Similar presentations
Randomized Complete Block and Repeated Measures (Each Subject Receives Each Treatment) Designs KNNL – Chapters 21,
Advertisements

Analysis of Variance (ANOVA)
Chapter 11 Analysis of Variance
Other Analysis of Variance Designs Chapter 15. Chapter Topics Basic Experimental Design Concepts  Defining Experimental Design  Controlling Nuisance.
STT 511-STT411: DESIGN OF EXPERIMENTS AND ANALYSIS OF VARIANCE Dr. Cuixian Chen Chapter 14: Nested and Split-Plot Designs Design & Analysis of Experiments.
Analysis of Variance (ANOVA) W&W, Chapter 10. Introduction Last time we learned about the chi square test for independence, which is useful for data that.
Design of Experiments and Analysis of Variance
Chapter 11 Analysis of Variance
Experimental Design & Analysis
Lesson #23 Analysis of Variance. In Analysis of Variance (ANOVA), we have: H 0 :  1 =  2 =  3 = … =  k H 1 : at least one  i does not equal the others.
Chapter Topics The Completely Randomized Model: One-Factor Analysis of Variance F-Test for Difference in c Means The Tukey-Kramer Procedure ANOVA Assumptions.
Chapter 3 Analysis of Variance
Lecture 9: One Way ANOVA Between Subjects
13-1 Designing Engineering Experiments Every experiment involves a sequence of activities: Conjecture – the original hypothesis that motivates the.
13 Design and Analysis of Single-Factor Experiments:
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 10-1 Chapter 10 Analysis of Variance Statistics for Managers Using Microsoft.
Chap 10-1 Analysis of Variance. Chap 10-2 Overview Analysis of Variance (ANOVA) F-test Tukey- Kramer test One-Way ANOVA Two-Way ANOVA Interaction Effects.
Biostatistics-Lecture 9 Experimental designs Ruibin Xi Peking University School of Mathematical Sciences.
1 Experimental Statistics - week 3 Statistical Inference 2-sample Hypothesis Tests Review Continued Chapter 8: Inferences about More Than 2 Population.
1 Experimental Statistics - week 7 Chapter 15: Factorial Models (15.5) Chapter 17: Random Effects Models.
1 Experimental Statistics - week 6 Chapter 15: Randomized Complete Block Design (15.3) Factorial Models (15.5)
Chapter 14: Repeated-Measures Analysis of Variance.
1 Experimental Statistics - week 4 Chapter 8: 1-factor ANOVA models Using SAS.
© 2002 Prentice-Hall, Inc.Chap 9-1 Statistics for Managers Using Microsoft Excel 3 rd Edition Chapter 9 Analysis of Variance.
1 Design of Engineering Experiments Part 10 – Nested and Split-Plot Designs Text reference, Chapter 14, Pg. 525 These are multifactor experiments that.
Completing the ANOVA From the Summary Statistics.
Chapter 10 Analysis of Variance.
Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc. Chap th Lesson Analysis of Variance.
Psychology 301 Chapters & Differences Between Two Means Introduction to Analysis of Variance Multiple Comparisons.
Copyright © 2013 Pearson Education, Inc. All rights reserved Chapter 10 Analysis of Variance Comparing More than Two Means.
Discussion 3 1/20/2014. Outline How to fill out the table in the appendix in HW3 What does the Model statement do in SAS Proc GLM ( please download lab.
1 Nested (Hierarchical) Designs In certain experiments the levels of one factor (eg. Factor B) are similar but not identical for different levels of another.
Lecture 9-1 Analysis of Variance
Analysis of Variance (One Factor). ANOVA Analysis of Variance Tests whether differences exist among population means categorized by only one factor or.
Previous Lecture: Phylogenetics. Analysis of Variance This Lecture Judy Zhong Ph.D.
Single-Factor Studies KNNL – Chapter 16. Single-Factor Models Independent Variable can be qualitative or quantitative If Quantitative, we typically assume.
ONE WAY ANALYSIS OF VARIANCE ANOVA o It is used to investigate the effect of one factor which occurs at h levels (≥3). Example: Suppose that we wish to.
1 Experimental Statistics - week 9 Chapter 17: Models with Random Effects Chapter 18: Repeated Measures.
Experimental Statistics - week 3
Chap 11-1 A Course In Business Statistics, 4th © 2006 Prentice-Hall, Inc. A Course In Business Statistics 4 th Edition Chapter 11 Analysis of Variance.
IE241: Introduction to Design of Experiments. Last term we talked about testing the difference between two independent means. For means from a normal.
1 Chapter 14: Repeated-Measures Analysis of Variance.
CHAPTER 10 ANOVA - One way ANOVa.
Chapter 9 More Complicated Experimental Designs. Randomized Block Design (RBD) t > 2 Treatments (groups) to be compared b Blocks of homogeneous units.
STAT 3120 Statistical Methods I Lecture Notes 6 Analysis of Variance (ANOVA)
Analysis of Variance 11/6. Comparing Several Groups Do the group means differ? Naive approach – Independent-samples t-tests of all pairs – Each test doesn't.
ANOVA Analysis of Variance or The F distribution.
1 Experimental Statistics - week 8 Chapter 17: Mixed Models Chapter 18: Repeated Measures.
1 Experimental Statistics - week 5 Chapter 9: Multiple Comparisons Chapter 15: Randomized Complete Block Design (15.3)
Chapter 11 Analysis of Variance
Covariance/ Correlation
i) Two way ANOVA without replication
Chapter 10: Analysis of Variance: Comparing More Than Two Means
Covariance/ Correlation
Covariance/ Correlation
Introduction to Statistics for the Social Sciences SBS200 - Lecture Section 001, Spring 2018 Room 150 Harvill Building 9:00 - 9:50 Mondays, Wednesdays.
Chapter 11 Analysis of Variance
Other Analysis of Variance Designs
Analysis of Variance (ANOVA)
Chapter 13 Group Differences
Chapter 14: Two-Factor Analysis of Variance (Independent Measures)
Chapter 13: Repeated-Measures Analysis of Variance
Covariance/ Correlation
Analysis of Variance Objective
Experimental Statistics - week 8
Chapter 15 Analysis of Variance
Introduction to Statistics for the Social Sciences SBS200 - Lecture Section 001, Spring 2019 Room 150 Harvill Building 9:00 - 9:50 Mondays, Wednesdays.
Principles of Experimental Design
Presentation transcript:

Experimental Statistics - week 5 Chapters 8, 9: Miscellaneous topics Chapter 14: Experimental design concepts Chapter 15: Randomized Complete Block Design (15.3)

yij = mi + eij yij = m + ai + eij 1-Factor ANOVA Model or observed data unexplained part mean for ith treatment

were rewritten as:

In words: TSS(total SS) = total sample variability among yij values SSB(SS “between”) = variability explained by differences in group means SSW(SS “within”) = unexplained variability (within groups)

Analysis of Variance Table Note: unequal sample sizes allowed

Extracted from From Ex. 8.2, page 390-391 3 Methods for Reducing Hostility 12 students displaying similar hostility were randomly assigned to 3 treatment methods. Scores (HLT) at end of study recorded. Method 1 96 79 91 85 Method 2 77 76 74 73 Method 3 66 73 69 66 Test:

ANOVA Table Output – extracted hostility data - calculations done in class   Source SS df MS F p-value Between 767.17 2 383.58 16.7 <.001   samples Within 205.74 9 22.86 Totals 972.91

Fisher’s Least Significant Difference (LSD) Protected LSD: Preceded by an F-test for overall significance. Only use the LSD if F is significant. X Unprotected: Not preceded by an F-test (like individual t-tests).

Hostility Data - Completely Randomized Design The GLM Procedure t Tests (LSD) for score NOTE: This test controls the Type I comparisonwise error rate, not the experimentwise error rate. Alpha 0.05 Error Degrees of Freedom 9 Error Mean Square 22.86111 Critical Value of t 2.26216 Least Significant Difference 7.6482 Means with the same letter are not significantly different. t Grouping Mean N method A 87.750 4 1 B 75.000 4 2 B B 68.500 4 3

Notice unequal sample sizes Ex. 8.2, page 390-391 3 Methods for Reducing Hostility 24 students displaying similar hostility were randomly assigned to 3 treatment methods. Scores (HLT) at end of study recorded. Method 1 96 79 91 85 83 91 82 87 Method 2 77 76 74 73 78 71 80 Method 3 66 73 69 66 77 73 71 70 74 Notice unequal sample sizes Test:

ANOVA Table Output – full hostility data   Source SS df MS F p-value Between 1090.6 2 545.3 29.57 <.0001   samples Within 387.2 21 18.4 Totals 1477.8 23

The GLM Procedure t Tests (LSD) for score NOTE: This test controls the Type I comparisonwise error rate, not the experimentwise error rate. Alpha 0.05 Error Degrees of Freedom 21 Error Mean Square 18.43878 Critical Value of t 2.07961 Comparisons significant at the 0.05 level are indicated by ***. Difference method Between 95% Confidence Comparison Means Limits 1 - 2 11.179 6.557 15.800 *** 1 - 3 15.750 11.411 20.089 *** 2 - 1 -11.179 -15.800 -6.557 *** 2 - 3 4.571 0.071 9.072 *** 3 - 1 -15.750 -20.089 -11.411 *** 3 - 2 -4.571 -9.072 -0.071 *** Notice the different format since there is not one LSD value with which to make all pairwise comparisons.

Duncan's Multiple Range Test for score NOTE: This test controls the Type I comparisonwise error rate, not the experimentwise error rate. Alpha 0.05 Error Degrees of Freedom 21 Error Mean Square 18.43878 Harmonic Mean of Cell Sizes 7.91623 NOTE: Cell sizes are not equal. Number of Means 2 3 Critical Range 4.489 4.712 Means with the same letter are not significantly different. Duncan Grouping Mean N method A 86.750 8 1 B 75.571 7 2 C 71.000 9 3 Note: Duncan’s test (another multiple comparison test) avoids the issue of different sample sizes by using the harmonic mean of the ni’s.

Some Multiple Comparison Techniques in SAS FISHER’S LSD (LSD) BONFERONNI (BON)   DUNCAN STUDENT-NEWMAN-KEULS (SNK) DUNNETT    RYAN-EINOT-GABRIEL-WELCH (REGWQ) SCHEFFE TUKEY

Balloon Data Col. 1-2 - observation number   Col. 1-2 - observation number Col. 3 - color (1=pink, 2=yellow, 3=orange, 4=blue) Col. 4-7 - inflation time in seconds 1122.4 2324.6 3120.3 4419.8 5324.3 6222.2 7228.5 8225.7 9320.2 10119.6 11228.8 12424.0 13417.1 14419.3 15324.2 16115.8 17218.3 18117.5 19418.7 20322.9 21116.3 22414.0 23416.6 24218.1 25218.9 26416.0 27220.1 28322.5 29316.0 30119.3 31115.9 32320.3

Balloon Data Col. 1-2 - observation number   Col. 1-2 - observation number Col. 3 - color (1=pink, 2=yellow, 3=orange, 4=blue) Col. 4-7 - inflation time in seconds 1122.4 2324.6 3120.3 4419.8 5324.3 6222.2 7228.5 8225.7 9320.2 10119.6 11228.8 12424.0 13417.1 14419.3 15324.2 16115.8 17218.3 18117.5 19418.7 20322.9 21116.3 22414.0 23416.6 24218.1 25218.9 26416.0 27220.1 28322.5 29316.0 30119.3 31115.9 32320.3

  ANOVA --- Balloon Data General Linear Models Procedure Dependent Variable: TIME Sum of Mean Source DF Squares Square F Value Pr > F Model 3 126.15125000 42.05041667 3.85 0.0200 Error 28 305.64750000 10.91598214 Corrected Total 31 431.79875000 R-Square C.V. Root MSE TIME Mean 0.292153 16.31069 3.3039343 20.256250 Mean Source DF Type I SS Square F Value Pr > F Color 3 126.15125000 42.05041667 3.85 0.0200

ANOVA --- Balloon Data The GLM Procedure t Tests (LSD) for time NOTE: This test controls the Type I comparisonwise error rate, not the experimentwise error rate. Alpha 0.05 Error Degrees of Freedom 28 Error Mean Square 10.91598 Critical Value of t 2.04841 Least Significant Difference 3.3839 Means with the same letter are not significantly different. t Grouping Mean N color A 22.575 8 2 A A 21.875 8 3 B 18.388 8 1 B B 18.188 8 4

Experimental Design: Concepts and Terminology Designed Experiment - an investigation in which a specified framework is used to compare groups or treatments Factors - any feature of the experiment that can be varied from trial to trial - up to this point we’ve only looked at experiments with a single factor

- these are called replicates Treatments - conditions constructed from the factors (levels of the factor considered, etc.) Experimental Units - subjects, material, etc. to which treatment factors are randomly assigned - there is inherent variability among these units irrespective of the treatment imposed Replication - we usually assign each treatment to several experimental units - these are called replicates

Examples: 1. factor 2. treatments 3. experimental units 4. replicates Car Data Hostility Data Balloon Data

Question: Balloon Data 1122.4 2324.6 3120.3 4419.8 5324.3 6222.2 7228.5 8225.7 9320.2 10119.6 11228.8 12424.0 13417.1 14419.3 15324.2 16115.8 17218.3 18117.5 19418.7 20322.9 21116.3 22414.0 23416.6 24218.1 25218.9 26416.0 27220.1 28322.5 29316.0 30119.3 31115.9 32320.3 Balloon Data   Col. 1-2 - observation number (run order) Col. 3 - color (1=pink, 2=yellow, 3=orange, 4=blue) Col. 4-7 - inflation time in seconds Question: Why randomize run order? i.e. why not blow up all the pink balloons first, blue balloons next, etc?

Scatterplot Using GPLOT What do we learn from this plot? Time Run Order What do we learn from this plot?

RECALL: 1-Factor ANOVA Model - random errors follow a Normal (N) distribution, are independently distributed (ID), and have zero mean and constant variance -- i.e. variability does not change from group to group

Checking Validity of Assumptions Model Assumptions: - equal variances - normality Checking Validity of Assumptions Equal Variances 1. F-test similar to 2-sample case - Hartley’s test (p.366 text) - not recommended 2. Graphical - side-by-side box plots

Graphical Assessment of Equal Variance Assumption

Note: Optional approaches if equal variance assumption is violated: 1. Use Kruskal Wallis nonparametric procedure – Section 8.6 2. Transform the data to induce more nearly equal variances – Section 8.5 -- log -- square root Note: These transformations may also help induce normality

Assessing Normality of Errors The e ij’s are called residuals. yij = m + ai + eij so eij = yij - (m + ai) = yij - mi eij is estimated by The e ij’s are called residuals.

SAS Code for Balloon Data proc glm; class color; model time=color; title 'ANOVA --- Balloon Data'; output out=new r=resball; means color/lsd; run; proc sort; by color; proc boxplot; plot time*color; title 'Side-by-Side Box Plots for Balloon Data'; proc univariate; var resball; histogram resball/normal; title 'Histogram of Residuals -- Balloon Data'; proc univariate normal plot; title 'Normal Probability Plot for Residuals - Balloon Data'; proc gplot; plot time*id; title 'Scatterplot of Time vs ID (Run Order)';

Normal Probability Plot 6.5+ +*+ | * *+++ | *+++ | +*+ | *** | **** 0.5+ ***+ | ++** | ++*** | ***** | +*+ | *+*+* -5.5+ * ++++ +----+----+----+----+----+----+----+----+----+----+ -2 -1 0 +1 +2

Caution: Chapter 15 introduces some new notation - i.e. changes notation already defined

Recall: Sum-of-Squares Identity 1-Factor ANOVA In words: Total SS = SS between samples + within sample SS

- new notation for Chapter 15 Recall: Sum-of-Squares Identity 1-Factor ANOVA - new notation for Chapter 15

- new notation for Chapter 15 Recall: Sum-of-Squares Identity 1-Factor ANOVA - new notation for Chapter 15

- new notation for Chapter 15 Recall: Sum-of-Squares Identity 1-Factor ANOVA - new notation for Chapter 15 In words: Total SS = SS for “treatments” + SS for “error”

Revised ANOVA Table for 1-Factor ANOVA (Ch. 15 terminology - p.857)   Source SS df MS F Treatments SST t - 1 Error SSE N - t   Total TSS N - 1

yij = mi + eij yij = m + ai + eij Recall 1-factor ANOVA (CRD) Model for Gasoline Octane Data yij = mi + eij or yij = m + ai + eij observed octane mean for ith gasoline unexplained part -- car-to-car differences -- temperature -- etc.

Similar to diet t-test example: Gasoline Octane Data Question: What if car differences are obscuring gasoline differences? Similar to diet t-test example: Recall: person-to-person differences obscured effect of diet

Possible Alternative Design for Octane Study: Test all 5 gasolines on the same car - in essence we test the gasoline effect directly and remove effect of car-to-car variation Question: How would you randomize an experiment with 4 cars?

Blocking an Experiment - dividing the observations into groups (called blocks) where the observations in each block are collected under relatively similar conditions - comparisons can many times be made more precisely this way

Terminology is based on Agricultural Experiments Consider the problem of testing fertilizers on a crop - t fertilizers - n observations on each

Completely Randomized Design B A A C B B A C A C C B C A t = 3 fertilizers n = 5 replications B - randomly select 15 plots - randomly assign fertilizers to the 15 plots

Randomized Complete Block Strategy A | C | B B | A | C C | B | A A | B | C t = 3 fertilizers C | A | B - select 5 “blocks” - randomly assign the 3 treatments to each block Note: The 3 “plots” within each block are similar - similar soil type, sun, water, etc

Randomized Complete Block Design Randomly assign each treatment once to every block Car Example Car 1: randomly assign each gas to this car Car 2: .... etc. Agricultural Example Randomly assign each fertilizer to one of the 3 plots within each block

Model For Randomized Complete Block (RCB) Design yij = m + ai + bj + eij effect of ith treatment effect of jth block unexplained error (gasoline) (car) -- temperature -- etc.

Previous Data Table from Chapter 8 for 1-factor ANOVA column averages don’t make any sense

Back to Octane data: “Restructured” Data Car Old Data Format Gas Gas Suppose that instead of 20 cars, there were only 4 cars, and we tested each gasoline on each car. “Restructured” Data Car Old Data Format 1 2 3 4 A 91.7 91.2 90.9 90.6 B 91.7 91.9 90.9 90.9 C 92.4 91.2 91.6 91.0 D 91.8 92.2 92.0 91.4 E 93.1 92.9 92.4 92.4 A 91.7 91.2 90.9 90.6 B 91.7 91.9 90.9 90.9 C 92.4 91.2 91.6 91.0 D 91.8 92.2 92.0 91.4 E 93.1 92.9 92.4 92.4 Gas Gas

- using new notation for Chapter 15 Recall: Sum-of-Squares Identity 1-Factor ANOVA - using new notation for Chapter 15 In words: Total SS = SS for “treatments” + SS for “error”

A New Sum-of-Squares Identity In words: Total SS = SS for treatments + SS for blocks + SS for error

Hypotheses: To test for treatment effects - i.e. gas differences we test To test for block effects - i.e. car differences (not usually the research hypothesis) we test

Randomized Complete Block Design ANOVA Table   Source SS df MS F Treatments SST t - 1 Blocks SSB Error SSE   Total TSS bt - 1 See page 866

Test for Treatment Effects Note:

Test for Block Effects

“Restructured” CAR Data - SAS Format A B1 91.7 A B2 91.2 A B3 90.9 A B4 90.6 B B1 91.7 B B2 91.9 B B3 90.9 B B4 90.9 C B1 92.4 C B2 91.2 C B3 91.6 C B4 91.0 D B1 91.8 D B2 92.2 D B3 92.0 D B4 91.4 E B1 93.1 E B2 92.9 E B3 92.4 E B4 92.4 The first variable (A - E) indicates gas as it did with the Completely Randomized Design. The second variable (B1 - B4) indicates car.

SAS file - Randomized Complete Block Design for CAR Data   INPUT gas$ block$ octane; PROC GLM; CLASS gas block; MODEL octane=gas block; TITLE 'Gasoline Example -Randomized Complete Block Design'; MEANS gas/LSD; RUN;

1-Factor ANOVA Table Output - octane data   Source SS df MS F p-value Gas 6.108 4 1.527 6.80 0.0025  (treatments) Error 3.370 15 0.225  Totals 9.478 19

1-Factor ANOVA Table Output - car data   Source SS df MS F p-value Gas 6.108 4 1.527 15.58 0.0001  (treatments) Cars 2.194 3 0.731 7.46 0.0044 (blocks) Error 1.176 12 0.098  Totals 9.478 19

SAS Output -- RCB CAR Data Dependent Variable: OCTANE Sum of Mean Source DF Squares Square F Value Pr > F   Model 7 8.30200000 1.18600000 12.10 0.0001 Error 12 1.17600000 0.09800000 Corrected Total 19 9.47800000 R-Square C.V. Root MSE OCTANE Mean 0.875923 0.341347 0.3130495 91.710000 Source DF Anova SS Mean Square F Value Pr > F GAS 4 6.10800000 1.52700000 15.58 0.0001 BLOCK 3 2.19400000 0.73133333 7.46 0.0044

Multiple Comparisons in RCB Analysis

CAR Data -- LSD Results CRD Analysis RCB Analysis   t Grouping Mean N gas A 92.7000 4 E B 91.8500 4 D B C B 91.5500 4 C C B C B 91.3500 4 B C C 91.1000 4 A RCB Analysis t Grouping Mean N gas   A 92.7000 4 E B 91.8500 4 D B C B 91.5500 4 C C C 91.3500 4 B C 91.1000 4 A 

CAR Data -- Bonferroni Results CRD Analysis   Bon Grouping Mean N gas   A 92.7000 4 E A B A 91.8500 4 D B B 91.5500 4 C B 91.3500 4 B B 91.1000 4 A RCB Analysis Bon Grouping Mean N gas A 92.7000 4 E B 91.8500 4 D B B 91.5500 4 C B 91.3500 4 B B 91.1000 4 A