One-Way ANOVA Calculations: In-Class Exercise Psychology 311 Spring, 2013

Similar documents
The Chi-Square Distributions

16.3 One-Way ANOVA: The Procedure

The Chi-Square Distributions

The One-Way Repeated-Measures ANOVA. (For Within-Subjects Designs)

Lecture 15. Hypothesis testing in the linear model

Sampling distribution of t. 2. Sampling distribution of t. 3. Example: Gas mileage investigation. II. Inferential Statistics (8) t =

STAT763: Applied Regression Analysis. Multiple linear regression. 4.4 Hypothesis testing

Multiple Regression: Example

1-Way Fixed Effects ANOVA

Solutions to Final STAT 421, Fall 2008

Lecture 3: Inference in SLR

Variance Decomposition and Goodness of Fit

" M A #M B. Standard deviation of the population (Greek lowercase letter sigma) σ 2

Lecture 18: Analysis of variance: ANOVA

Two-Sample Inferential Statistics

CHAPTER 10 ONE-WAY ANALYSIS OF VARIANCE. It would be very unusual for all the research one might conduct to be restricted to

23. Fractional factorials - introduction

STAT 135 Lab 6 Duality of Hypothesis Testing and Confidence Intervals, GLRT, Pearson χ 2 Tests and Q-Q plots. March 8, 2015

SCHOOL OF MATHEMATICS AND STATISTICS

Psychology 282 Lecture #4 Outline Inferences in SLR

Recall that a measure of fit is the sum of squared residuals: where. The F-test statistic may be written as:

Topic 22 Analysis of Variance

LAB 2. HYPOTHESIS TESTING IN THE BIOLOGICAL SCIENCES- Part 2

Lecture 6 Multiple Linear Regression, cont.

Regression and the 2-Sample t

POLI 443 Applied Political Research

1 Use of indicator random variables. (Chapter 8)

Chapter 16 One-way Analysis of Variance

Power & Sample Size Calculation

PSYC 331 STATISTICS FOR PSYCHOLOGISTS

Variance Decomposition in Regression James M. Murray, Ph.D. University of Wisconsin - La Crosse Updated: October 04, 2017

Inference for Regression

Lecture 10: F -Tests, ANOVA and R 2

The legacy of Sir Ronald A. Fisher. Fisher s three fundamental principles: local control, replication, and randomization.

Analysis of Variance: Part 1

Biostatistics 380 Multiple Regression 1. Multiple Regression

CHAPTER 10. Regression and Correlation

Stat 311: HW 9, due Th 5/27/10 in your Quiz Section

Chapter 7 Comparison of two independent samples

Factorial designs. Experiments

The One-Way Independent-Samples ANOVA. (For Between-Subjects Designs)

BIOSTATS 640 Spring 2018 Unit 2. Regression and Correlation (Part 1 of 2) R Users

ANOVA (Analysis of Variance) output RLS 11/20/2016

Review: General Approach to Hypothesis Testing. 1. Define the research question and formulate the appropriate null and alternative hypotheses.

Simple Linear Regression: One Quantitative IV

This module focuses on the logic of ANOVA with special attention given to variance components and the relationship between ANOVA and regression.

STA 101 Final Review

Statistics Lab #6 Factorial ANOVA

BIOL Biometry LAB 6 - SINGLE FACTOR ANOVA and MULTIPLE COMPARISON PROCEDURES

Estimating σ 2. We can do simple prediction of Y and estimation of the mean of Y at any value of X.

Hypothesis Testing for Var-Cov Components

The Distribution of F

One-Way ANOVA. Some examples of when ANOVA would be appropriate include:

Nature vs. nurture? Lecture 18 - Regression: Inference, Outliers, and Intervals. Regression Output. Conditions for inference.

Process Capability Analysis Using Experiments

CBA4 is live in practice mode this week exam mode from Saturday!

MS&E 226: Small Data

ST430 Exam 2 Solutions

Ch18 links / ch18 pdf links Ch18 image t-dist table

Table 1: Fish Biomass data set on 26 streams

2 and F Distributions. Barrow, Statistics for Economics, Accounting and Business Studies, 4 th edition Pearson Education Limited 2006

Sociology 6Z03 Review II

Chapter 8: Hypothesis Testing Lecture 9: Likelihood ratio tests

22s:152 Applied Linear Regression. Chapter 8: 1-Way Analysis of Variance (ANOVA) 2-Way Analysis of Variance (ANOVA)

y ˆ i = ˆ " T u i ( i th fitted value or i th fit)

An inferential procedure to use sample data to understand a population Procedures

1.) Fit the full model, i.e., allow for separate regression lines (different slopes and intercepts) for each species

Multiple Pairwise Comparison Procedures in One-Way ANOVA with Fixed Effects Model

ANOVA: Analysis of Variance

Lectures 5 & 6: Hypothesis Testing

ANOVA: Analysis of Variance

EXST Regression Techniques Page 1. We can also test the hypothesis H :" œ 0 versus H :"

SMA 6304 / MIT / MIT Manufacturing Systems. Lecture 10: Data and Regression Analysis. Lecturer: Prof. Duane S. Boning

Multiple comparisons - subsequent inferences for two-way ANOVA

R 2 and F -Tests and ANOVA

EC2001 Econometrics 1 Dr. Jose Olmo Room D309

Introduction to the Analysis of Variance (ANOVA) Computing One-Way Independent Measures (Between Subjects) ANOVAs

Lecture 14: ANOVA and the F-test

Analysis of Covariance. The following example illustrates a case where the covariate is affected by the treatments.

FACTORIAL DESIGNS and NESTED DESIGNS

Statistics 191 Introduction to Regression Analysis and Applied Statistics Practice Exam

22s:152 Applied Linear Regression. 1-way ANOVA visual:

HYPOTHESIS TESTING. Hypothesis Testing

36-707: Regression Analysis Homework Solutions. Homework 3

MAT3378 (Winter 2016)

Visual interpretation with normal approximation

Extensions of One-Way ANOVA.

13 Simple Linear Regression

Confidence Intervals, Testing and ANOVA Summary

One-Way ANOVA Cohen Chapter 12 EDUC/PSY 6600

AGEC 621 Lecture 16 David Bessler

Multilevel Models in Matrix Form. Lecture 7 July 27, 2011 Advanced Multivariate Statistical Methods ICPSR Summer Session #2

16.400/453J Human Factors Engineering. Design of Experiments II

(ii) Scan your answer sheets INTO ONE FILE only, and submit it in the drop-box.

AMS 7 Correlation and Regression Lecture 8

The MBESS Package. August 22, 2006

Extensions of One-Way ANOVA.

Simple Linear Regression: One Qualitative IV

Exercise I.1 I.2 I.3 I.4 II.1 II.2 III.1 III.2 III.3 IV.1 Question (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Answer

Answer Key: Problem Set 6

Transcription:

One-Way ANOVA Calculations: In-Class Exercise Psychology 311 Spring, 2013 1. You are planning an experiment that will involve 4 equally sized groups, including 3 experimental groups and a control. Each group will contain n observations. Your expectation is that each of the 3 experimental treatments will have approximately the same effect, and that this effect will be small roughly one-third a standard deviation improved performance over the control. (a) Calculate the 4 effects α j = µ j µ. Note that you will only be able to express them in standard deviation units. (Hint. At first this may seem impossible, but recall that if the effects must sum to zero, the knowledge that 3 group means all differ from the control by σ/3 allows you to define the 4th effect so that the 4 effects sum to zero.) (b) Once you have the α j values, you should immediately be able to specify the standardized effect values αj = α j/σ. What are they? (c) Suppose that n = 10 per group. Recall from lecture that the F statistic for testing the null hypothesis of equal group means has a general distribution that is noncentral F with a 1 and a(n 1) degrees of freedom and a noncentrality parameter λ given by λ = n a What is the value of λ in this case? (d) If the F test is to be conducted with α = 0.05, what is the critical value (i.e., rejection point)? When calculating the rejection point H 0 is true and λ = 0. (e) What is the power of the test with the proposed value of n = 10? Use R to perform the calculation, then verify it with Gpower 3. α 2 j (f) How large an n would you need to obtain a power of.90? 1

2. Suppose that you run the above experiment, and obtain the data shown below. Control Exp1 Exp2 Exp3 1 118 107 133 134 2 121 165 154 176 3 97 121 91 171 4 86 126 63 159 5 118 87 62 118 6 45 135 164 125 7 119 83 96 100 8 92 100 129 60 9 91 144 128 163 10 72 119 105 111 (a) Perform a 1-way ANOVA on the data. (b) Given the result, compute a 95% confidence interval on the noncentrality parameter λ. Hint. You can use the MBESS routine conf.limits.ncf or my noncentral distribution calculator NDC. (c) Cohen s f can be written as a f = (α j/σ) 2 a Examine the formula for λ, and note that f can be written as a monotonic, strictly increasing function of λ. Derive a formula for converting λ to f, and use it to compute a 95% confidence interval on f. 2

Key to One-Way ANOVA Calculations: In-Class Exercise Psychology 311 Spring, 2013 1. You are planning an experiment that will involve 4 equally sized groups, including 3 experimental groups and a control. Each group will contain n observations. Your expectation is that each of the 3 experimental treatments will have approximately the same effect, and that this effect will be small roughly one-third a standard deviation improved performance over the control. (a) Calculate the 4 effects α j = µ j µ. Note that you will only be able to express them in standard deviation units. (Hint. At first this may seem impossible, but recall that if the effects must sum to zero, the knowledge that 3 group means all differ from the control by σ/3 allows you to define the 4th effect so that the 4 effects sum to zero.) Answer. The group means can be written in terms of their relationship to each other as 0, σ/3, σ/3, σ/3. To express them as effects α j, you have to transform them by subtracting a constant so that their mean is zero. Since the current mean is σ/4, we need to subtract σ/4 from each one. The effects then become σ/4, σ/12, σ/12, σ/12. (b) Once you have the α j values, you should immediately be able to specify the standardized effect values αj = α j/σ. What are they? Answer. We simply divide them all by σ, obtaining 1/4, 1/12, 1/12, 1/12. (c) Suppose that n = 10 per group. Recall from lecture that the F statistic for testing the null hypothesis of equal group means has a general distribution that is noncentral F with a 1 and a(n 1) degrees of freedom and a noncentrality parameter λ given by λ = n a (α j /σ) 2 = n What is the value of λ in this case? Answer. The value of λ is a α 2 j 10(1/16 + 1/144 + 1/144 + 1/144) = 10(12/144) = 5/6 = 0.8333 (d) If the F test is to be conducted with α = 0.05, what is the critical value (i.e., rejection point)? When calculating the rejection point H 0 is true and λ = 0. Answer. The F statistic has 3 and 36 degrees of freedom, and the critical value is 1

> F.crit <- qf(.95,3,36) > F.crit [1] 2.866266 (e) What is the power of the test with the proposed value of n = 10? Use R to perform the calculation, then verify it with Gpower 3. Answer. Power is the area to the right of the rejection point we determined above in a noncentral F distribution with 3 and 36 degrees of freedom and λ = 0.8333. > lambda <- 5/6 > Power <- 1 - pf(f.crit,3,36,lambda) > Power [1] 0.09797938 Power is a pathetic 0.098. We can duplicate those calculations in Gpower 3 as shown in the following screen. Note how we open a side menu. To keep things simple, I defined σ as 3 and chose the means to be 0,1,1,1 yielding the same standardized effects as we calculated above. (f) How large an n would you need to obtain a power of.90? Answer. A total sample size of 688 for the 4 groups, or an n of 172 per group, is required. 2

3

2. Suppose that you run the above experiment, and obtain the data shown below. Control Exp1 Exp2 Exp3 1 118 107 133 134 2 121 165 154 176 3 97 121 91 171 4 86 126 63 159 5 118 87 62 118 6 45 135 164 125 7 119 83 96 100 8 92 100 129 60 9 91 144 128 163 10 72 119 105 111 (a) Perform a 1-way ANOVA on the data. Answer. Typing in the data yields a data frame with 40 rows and 2 columns. The first and last few lines are shown below with the head and tail commands. > head(data) Y Group 1 118 Control 2 121 Control 3 97 Control 4 86 Control 5 118 Control 6 45 Control > tail(data) Y Group 35 118 Exp3 36 125 Exp3 37 100 Exp3 38 60 Exp3 39 163 Exp3 40 111 Exp3 To analyze the data, one standard ANOVA approach is as follows. > results <- anova(lm(y ~ factor(group))) > xtable(results) Note that, in the above code, I use the function xtable to produce typeset tables within L A TEX. The standard R output shown below would be produced simply by typing results. 4

Df Sum Sq Mean Sq F value Pr(>F) factor(group) 3 6632.80 2210.93 2.31 0.0927 Residuals 36 34457.60 957.16 > results Analysis of Variance Table Response: Y Df Sum Sq Mean Sq F value Pr(>F) factor(group) 3 6633 2210.93 2.3099 0.09274. Residuals 36 34458 957.16 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (b) Given the result, compute a 95% confidence interval on the noncentrality parameter λ. Hint. You can use the MBESS routine conf.limits.ncf or my noncentral distribution calculator NDC. Answer. Here is MBESS output > library(mbess) > lambda.ci <- conf.limits.ncf(f.value = 2.3099, df.1 = 3, df.2 = 36 ) > lambda.ci $Lower.Limit [1] NA $Prob.Less.Lower [1] NA $Upper.Limit [1] 19.17194 $Prob.Greater.Upper [1] 0.025 Note that it returns a missing value code NA for the lower value. Since the lower limit cannot be lower than zero, I chose in my routine to return a value of zero. Here is the NDC screen. 5

(c) Cohen s f can be written as a f = (α j/σ) 2 a Examine the formula for λ, and note that f can be written as a monotonic, strictly increasing function of λ. Derive a formula for converting λ to f, and use it to compute a 95% confidence interval on f. Answer. We can write λ f = na > n <- 10; a <- 4 > upper <- sqrt(lambda.ci$upper.limit/(n*a)) > upper [1] 0.6923138 So our confidence interval for f has limits of 0 and 0.6923. 6