Review of one-way ANOVA Kristin Sainani Ph.D. Stanford University Department of Health Research and Policy

Slides:



Advertisements
Similar presentations
Numbers Treasure Hunt Following each question, click on the answer. If correct, the next page will load with a graphic first – these can be used to check.
Advertisements

EcoTherm Plus WGB-K 20 E 4,5 – 20 kW.
1 A B C
Scenario: EOT/EOT-R/COT Resident admitted March 10th Admitted for PT and OT following knee replacement for patient with CHF, COPD, shortness of breath.
Trend for Precision Soil Testing % Zone or Grid Samples Tested compared to Total Samples.
Trend for Precision Soil Testing % Zone or Grid Samples Tested compared to Total Samples.
AGVISE Laboratories %Zone or Grid Samples – Northwood laboratory
Trend for Precision Soil Testing % Zone or Grid Samples Tested compared to Total Samples.
AP STUDY SESSION 2.
1
Slide 1Fig 26-CO, p.795. Slide 2Fig 26-1, p.796 Slide 3Fig 26-2, p.797.
Slide 1Fig 25-CO, p.762. Slide 2Fig 25-1, p.765 Slide 3Fig 25-2, p.765.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
STATISTICS Linear Statistical Models
STATISTICS INTERVAL ESTIMATION Professor Ke-Sheng Cheng Department of Bioenvironmental Systems Engineering National Taiwan University.
Addition and Subtraction Equations
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
David Burdett May 11, 2004 Package Binding for WS CDL.
We need a common denominator to add these fractions.
Create an Application Title 1Y - Youth Chapter 5.
Add Governors Discretionary (1G) Grants Chapter 6.
CALENDAR.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt BlendsDigraphsShort.
CHAPTER 18 The Ankle and Lower Leg
1 Click here to End Presentation Software: Installation and Updates Internet Download CD release NACIS Updates.
The 5S numbers game..
Media-Monitoring Final Report April - May 2010 News.
Break Time Remaining 10:00.
The basics for simulations
Factoring Quadratics — ax² + bx + c Topic
Table 12.1: Cash Flows to a Cash and Carry Trading Strategy.
PP Test Review Sections 6-1 to 6-6
MM4A6c: Apply the law of sines and the law of cosines.
Bellwork Do the following problem on a ½ sheet of paper and turn in.
Regression with Panel Data
Exarte Bezoek aan de Mediacampus Bachelor in de grafische en digitale media April 2014.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Biology 2 Plant Kingdom Identification Test Review.
Adding Up In Chunks.
MaK_Full ahead loaded 1 Alarm Page Directory (F11)
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
Artificial Intelligence
When you see… Find the zeros You think….
Before Between After.
Slide R - 1 Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Prentice Hall Active Learning Lecture Slides For use with Classroom Response.
12 October, 2014 St Joseph's College ADVANCED HIGHER REVISION 1 ADVANCED HIGHER MATHS REVISION AND FORMULAE UNIT 2.
Subtraction: Adding UP
: 3 00.
5 minutes.
1 Non Deterministic Automata. 2 Alphabet = Nondeterministic Finite Accepter (NFA)
1 hi at no doifpi me be go we of at be do go hi if me no of pi we Inorder Traversal Inorder traversal. n Visit the left subtree. n Visit the node. n Visit.
Static Equilibrium; Elasticity and Fracture
Essential Cell Biology
Converting a Fraction to %
Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)
Resistência dos Materiais, 5ª ed.
Clock will move after 1 minute
famous photographer Ara Guler famous photographer ARA GULER.
PSSA Preparation.
Copyright © 2013 Pearson Education, Inc. All rights reserved Chapter 11 Simple Linear Regression.
Physics for Scientists & Engineers, 3rd Edition
Select a time to count down from the clock above
Copyright Tim Morris/St Stephen's School
1.step PMIT start + initial project data input Concept Concept.
1 Dr. Scott Schaefer Least Squares Curves, Rational Representations, Splines and Continuity.
1 Non Deterministic Automata. 2 Alphabet = Nondeterministic Finite Accepter (NFA)
Presentation transcript:

Review of one-way ANOVA Kristin Sainani Ph.D. Stanford University Department of Health Research and Policy

ANOVA for comparing means between more than 2 groups

The F-distribution A ratio of variances follows an F-distribution: The F-test tests the hypothesis that two variances are equal. F will be close to 1 if sample variances are equal.

How to calculate ANOVA’s by hand… Treatment 1Treatment 2Treatment 3Treatment 4 y 11 y 21 y 31 y 41 y 12 y 22 y 32 y 42 y 13 y 23 y 33 y 43 y 14 y 24 y 34 y 44 y 15 y 25 y 35 y 45 y 16 y 26 y 36 y 46 y 17 y 27 y 37 y 47 y 18 y 28 y 38 y 48 y 19 y 29 y 39 y 49 y 110 y 210 y 310 y 410 n=10 obs./group k=4 groups The group means The (within) group variances

Sum of Squares Within (SSW), or Sum of Squares Error (SSE) The (within) group variances + ++ Sum of Squares Within (SSW) (or SSE, for chance error)

Sum of Squares Between (SSB), or Sum of Squares Regression (SSR) Sum of Squares Between (SSB). Variability of the group means compared to the grand mean (the variability due to the treatment). Overall mean of all 40 observations (“grand mean”)

Total Sum of Squares (SST) Total sum of squares(TSS). Squared difference of every observation from the overall mean. (numerator of variance of Y!)

Partitioning of Variance = + SSW + SSB = TSS 10x

ANOVA Table Between (k groups) k-1 SSB (sum of squared deviations of group means from grand mean) SSB/k-1 Go to F k-1,nk-k chart Total variation nk-1TSS (sum of squared deviations of observations from grand mean) Source of variation d.f. Sum of squares Mean Sum of Squares F-statisticp-value Within (n individuals per group) nk-k SSW (sum of squared deviations of observations from their group mean) s 2= SSW/nk-k TSS=SSB + SSW

ANOVA=t-test Between (2 groups) 1 SSB (squared difference in means multiplied by n) Squared difference in means times n Go to F 1, 2n-2 Chart  notice values are just (t 2n-2 ) 2 Total variation 2n-1TSS Source of variation d.f. Sum of squares Mean Sum of SquaresF-statisticp-value Within2n-2SSW equivalent to numerator of pooled variance Pooled variance

Example Treatment 1Treatment 2Treatment 3Treatment 4 60 inches

Example Treatment 1Treatment 2Treatment 3Treatment 4 60 inches Step 1) calculate the sum of squares between groups: Mean for group 1 = 62.0 Mean for group 2 = 59.7 Mean for group 3 = 56.3 Mean for group 4 = 61.4 Grand mean= SSB = [( ) 2 + ( ) 2 + ( ) 2 + ( ) 2 ] xn per group= 19.65x10 = 196.5

Example Treatment 1Treatment 2Treatment 3Treatment 4 60 inches Step 2) calculate the sum of squares within groups: (60-62) 2 + (67-62) 2 + (42-62) 2 + (67-62) 2 + (56-62) 2 + (62- 62) 2 + (64-62) 2 + (59-62) 2 + (72-62) 2 + (71-62) 2 + ( ) 2 + ( ) 2 + ( ) ) 2 + ( ) 2 + ( ) 2 …+….(sum of 40 squared deviations) =

Step 3) Fill in the ANOVA table Source of variation d.f. Sum of squares Mean Sum of Squares F-statistic p-value Between Within Total

Step 3) Fill in the ANOVA table Source of variation d.f. Sum of squares Mean Sum of Squares F-statistic p-value Between Within Total INTERPRETATION of ANOVA: How much of the variance in height is explained by treatment group? R 2= “Coefficient of Determination” = SSB/TSS = 196.5/2275.1=9%

Coefficient of Determination The amount of variation in the outcome variable (dependent variable) that is explained by the predictor (independent variable).

ANOVA example S1 a, n=25 aS2 b, n=25 bS3 c, n=25 cP-value d d Calcium (mg)Mean SD e e Iron (mg)Mean SD0.6 Folate (μg)Mean SD Zinc (mg) Mean SD a School 1 (most deprived; 40% subsidized lunches). b School 2 (medium deprived; <10% subsidized). c School 3 (least deprived; no subsidization, private school). d ANOVA; significant differences are highlighted in bold (P<0.05). Table 6. Mean micronutrient intake from the school lunch by school

Answer Step 1) calculate the sum of squares between groups: Mean for School 1 = Mean for School 2 = Mean for School 3 = Grand mean: 161 SSB = [( ) 2 + ( ) 2 + ( ) 2 ] x25 per group= 98,113

Answer Step 2) calculate the sum of squares within groups: S.D. for S1 = 62.4 S.D. for S2 = 70.5 S.D. for S3 = 86.2 Therefore, sum of squares within is: (24)[ ]=391,066

Answer Step 3) Fill in your ANOVA table Source of variation d.f. Sum of squares Mean Sum of Squares F-statistic p-value Between 298, <.05 Within72 391, Total74 489,179 **R 2 =98113/489179=20% School explains 20% of the variance in lunchtime calcium intake in these kids.

Beyond one-way ANOVA Often, you may want to test more than 1 treatment. ANOVA can accommodate more than 1 treatment or factor, so long as they are independent. Again, the variation partitions beautifully! TSS = SSB1 + SSB2 + SSW

C A B A yi yi x y yi yi C B *Least squares estimation gave us the line (β) that minimized C 2 A 2 =SS y A 2 B 2 C 2 SS total Total squared distance of observations from naïve mean of y Total variation SS reg Distance from regression line to naïve mean of y Variability due to x (regression) SS residual Variance around the regression line Additional variability not explained by x—what least squares method aims to minimize The Regression Picture R 2 =SS reg /SS total

Standard error of y/x S y/x 2 = average residual squared (what we’ve tried to minimize) (equivalent to MSE(=SSW/df) in ANOVA)

Y X The standard error of Y given X is the average variability around the regression line at any given value of X. It is assumed to be equal at all values of X. S y/x