CS 147: Computer Systems Performance Analysis

Similar documents
Fractional Factorial Designs

Two-Factor Full Factorial Design with Replications

Two Factor Full Factorial Design with Replications

One Factor Experiments

CS 5014: Research Methods in Computer Science. Experimental Design. Potential Pitfalls. One-Factor (Again) Clifford A. Shaffer.

2 k, 2 k r and 2 k-p Factorial Designs

CS 5014: Research Methods in Computer Science

1 The Randomized Block Design

Two-Way Analysis of Variance - no interaction

Factorial designs. Experiments

CS 5014: Research Methods in Computer Science

Statistics For Economics & Business

Theorem A: Expectations of Sums of Squares Under the two-way ANOVA model, E(X i X) 2 = (µ i µ) 2 + n 1 n σ2

EEC 686/785 Modeling & Performance Evaluation of Computer Systems. Lecture 19

Outline. Simulation of a Single-Server Queueing System. EEC 686/785 Modeling & Performance Evaluation of Computer Systems.

ANOVA: Analysis of Variation

Allow the investigation of the effects of a number of variables on some response

STAT 705 Chapter 19: Two-way ANOVA

Factorial ANOVA. Psychology 3256

Two or more categorical predictors. 2.1 Two fixed effects

STAT 705 Chapter 19: Two-way ANOVA

Analysis of Variance and Design of Experiments-I

1-Way ANOVA MATH 143. Spring Department of Mathematics and Statistics Calvin College

Chapter 6 Randomized Block Design Two Factor ANOVA Interaction in ANOVA

If we have many sets of populations, we may compare the means of populations in each set with one experiment.

Chapter 11: Factorial Designs

Orthogonal contrasts for a 2x2 factorial design Example p130

Chap The McGraw-Hill Companies, Inc. All rights reserved.

Grant MacEwan University STAT 252 Dr. Karen Buro Formula Sheet

Two-Way Factorial Designs

MAT3378 ANOVA Summary

Outline Topic 21 - Two Factor ANOVA

Multiple Linear Regression

In a one-way ANOVA, the total sums of squares among observations is partitioned into two components: Sums of squares represent:

BALANCED INCOMPLETE BLOCK DESIGNS

STAT Final Practice Problems

Multiple Predictor Variables: ANOVA

STAT22200 Spring 2014 Chapter 8A

ANOVA Situation The F Statistic Multiple Comparisons. 1-Way ANOVA MATH 143. Department of Mathematics and Statistics Calvin College

The Random Effects Model Introduction

Lecture 3: Inference in SLR

CHAPTER 4 Analysis of Variance. One-way ANOVA Two-way ANOVA i) Two way ANOVA without replication ii) Two way ANOVA with replication

Factorial Within Subjects. Psy 420 Ainsworth

Stat 217 Final Exam. Name: May 1, 2002

Topic 9: Factorial treatment structures. Introduction. Terminology. Example of a 2x2 factorial

Multiple Comparisons. The Interaction Effects of more than two factors in an analysis of variance experiment. Submitted by: Anna Pashley

Remedial Measures, Brown-Forsythe test, F test

Key Features: More than one type of experimental unit and more than one randomization.

STAT 401A - Statistical Methods for Research Workers

ANOVA Randomized Block Design

Example - Alfalfa (11.6.1) Lecture 16 - ANOVA cont. Alfalfa Hypotheses. Treatment Effect

Biostatistics for physicists fall Correlation Linear regression Analysis of variance

Unit 8: 2 k Factorial Designs, Single or Unequal Replications in Factorial Designs, and Incomplete Block Designs

STAT 506: Randomized complete block designs

Chapter 4: Randomized Blocks and Latin Squares

CS 147: Computer Systems Performance Analysis

Two-factor studies. STAT 525 Chapter 19 and 20. Professor Olga Vitek

Definitions of terms and examples. Experimental Design. Sampling versus experiments. For each experimental unit, measures of the variables of

Unit 12: Analysis of Single Factor Experiments

3. Factorial Experiments (Ch.5. Factorial Experiments)

Dr. Shalabh Department of Mathematics and Statistics Indian Institute of Technology Kanpur

Ch. 1: Data and Distributions

Categorical Predictor Variables

3. Design Experiments and Variance Analysis

4.1. Introduction: Comparing Means

Linear Regression. Chapter 3

G E INTERACTION USING JMP: AN OVERVIEW

Multiple Predictor Variables: ANOVA

Wolf River. Lecture 19 - ANOVA. Exploratory analysis. Wolf River - Data. Sta 111. June 11, 2014

Lecture 13 Extra Sums of Squares

One-factor analysis of variance (ANOVA)

Sociology 6Z03 Review II

Ch 2: Simple Linear Regression

Inference for the Regression Coefficient

Lecture 15 - ANOVA cont.

Example: Poisondata. 22s:152 Applied Linear Regression. Chapter 8: ANOVA

IX. Complete Block Designs (CBD s)

23. Fractional factorials - introduction

WELCOME! Lecture 13 Thommy Perlinger

Unit 7: Random Effects, Subsampling, Nested and Crossed Factor Designs

Model Building Chap 5 p251

Exam details. Final Review Session. Things to Review

Example - Alfalfa (11.6.1) Lecture 14 - ANOVA cont. Alfalfa Hypotheses. Treatment Effect

What If There Are More Than. Two Factor Levels?

Unit 27 One-Way Analysis of Variance

Confidence Interval for the mean response

y response variable x 1, x 2,, x k -- a set of explanatory variables

Unbalanced Data in Factorials Types I, II, III SS Part 1

Factorial and Unbalanced Analysis of Variance

Comparing Several Means: ANOVA

Chapter 8: Hypothesis Testing Lecture 9: Likelihood ratio tests

Statistics 512: Solution to Homework#11. Problems 1-3 refer to the soybean sausage dataset of Problem 20.8 (ch21pr08.dat).

Example: Four levels of herbicide strength in an experiment on dry weight of treated plants.

Diagnostics and Remedial Measures

Open book and notes. 120 minutes. Covers Chapters 8 through 14 of Montgomery and Runger (fourth edition).

2-way analysis of variance

Table of z values and probabilities for the standard normal distribution. z is the first column plus the top row. Each cell shows P(X z).

TYPE I, TYPE II, AND TYPE III SUMS OF SQUARES DAVID C. HOWELL 1/12/2010

Design of Engineering Experiments Part 5 The 2 k Factorial Design

Chapter 1 Statistical Inference

Transcription:

CS 147: Computer Systems Performance Analysis CS 147: Computer Systems Performance Analysis 1 / 34

Overview Overview Overview Adding Replications Adding Replications 2 / 34

Two-Factor Design Without Replications Two-Factor Design Without Replications Two-Factor Design Without Replications Used when only two parameters, but multiple levels for each Test all combinations of levels of the two parameters One replication (observation) per combination For factors A and B with a and b levels, ab experiments required Used when only two parameters, but multiple levels for each Test all combinations of levels of the two parameters One replication (observation) per combination For factors A and B with a and b levels, ab experiments required 3 / 34

4 / 34 When to Use This Design? When to Use This Design? When to Use This Design? System has two important factors Factors are categorical More than two levels for at least one factor Examples: Performance of different processors under different workloads Characteristics of different compilers for different benchmarks Performance of different Web browsers on different sites System has two important factors Factors are categorical More than two levels for at least one factor Examples: Performance of different processors under different workloads Characteristics of different compilers for different benchmarks Performance of different Web browsers on different sites

5 / 34 When to Avoid This Design? When to Avoid This Design? When to Avoid This Design? Systems with more than two important factors Use general factorial design Non-categorical variables Use regression Only two levels per factor Use 2 2 designs Systems with more than two important factors Use general factorial design Non-categorical variables Use regression Only two levels per factor Use 2 2 designs

Model For This Design Model For This Design Model For This Design yij = µ + αj + βi + eij yij is observation µ is mean response αj is effect of factor A at level j βi is effect of factor B at level i eij is error term Sums of αj s and βi s are both zero y ij = µ + α j + β i + e ij y ij is observation µ is mean response α j is effect of factor A at level j β i is effect of factor B at level i e ij is error term Sums of α j s and β i s are both zero 6 / 34

7 / 34 Assumptions of the Model Assumptions of the Model Assumptions of the Model Factors are additive Errors are additive Typical assumptions about errors: Distributed independently of factor levels Normally distributed Remember to check these assumptions! Factors are additive Errors are additive Typical assumptions about errors: Distributed independently of factor levels Normally distributed Remember to check these assumptions!

8 / 34 Computing Effects Computing Effects Computing Effects Need to figure out µ, αj, and βi Arrange observations in two-dimensional matrix b rows, a columns Compute effects such that error has zero mean Sum of error terms across all rows and columns is zero Need to figure out µ, α j, and β i Arrange observations in two-dimensional matrix b rows, a columns Compute effects such that error has zero mean Sum of error terms across all rows and columns is zero

9 / 34 Two-Factor Full Factorial Example Two-Factor Full Factorial Example Two-Factor Full Factorial Example Want to expand functionality of a file system to allow automatic compression Examine three choices: Library substitution of file system calls New VFS Stackable layers Three different benchmarks Metric: response time Want to expand functionality of a file system to allow automatic compression Examine three choices: Library substitution of file system calls New VFS Stackable layers Three different benchmarks Metric: response time

10 / 34 Data for Example Data for Example Data for Example Compile Benchmark Email Benchmark Web Server Benchmark Library VFS Layers 94.3 89.5 96.2 224.9 231.8 247.2 733.5 702.1 797.4 Compile Benchmark Email Benchmark Web Server Benchmark Library VFS Layers 94.3 89.5 96.2 224.9 231.8 247.2 733.5 702.1 797.4

i i Computing µ Computing µ Computing µ Averaging the j th column, y j = µ + αj + 1 b βi + 1 b By assumption, error terms add to zero Also, the βj s add to zero, so y j = µ + αj Averaging rows produces y i = µ + βi Averaging everything produces y = µ eij Averaging the j th column, y j = µ + α j + 1 b β i + 1 b e ij i i By assumption, error terms add to zero Also, the β j s add to zero, so y j = µ + α j Averaging rows produces y i = µ + β i Averaging everything produces y = µ 11 / 34

Model Parameters Model Parameters Model Parameters Using same techniques as for one-factor designs, parameters are: y = µ αj = y j y βi = y i y Using same techniques as for one-factor designs, parameters are: y = µ α j = y j y β i = y i y 12 / 34

Calculating Parameters for the Example Calculating Parameters for the Example Calculating Parameters for the Example µ = grand mean = 357.4 αj = ( 6.5, 16.3, 22.8) βi = ( 264.1, 122.8, 386.9) So, for example, the model predicts that the email benchmark using a special-purpose VFS will take 357.4 16.3 122.8 = 218.3 seconds µ = grand mean = 357.4 α j = ( 6.5, 16.3, 22.8) β i = ( 264.1, 122.8, 386.9) So, for example, the model predicts that the email benchmark using a special-purpose VFS will take 357.4 16.3 122.8 = 218.3 seconds 13 / 34

Estimating Experimental Errors Estimating Experimental Errors Estimating Experimental Errors Similar to estimation of errors in previous designs Take difference between model s predictions and observations Calculate Sum of Squared Errors Then allocate variation Similar to estimation of errors in previous designs Take difference between model s predictions and observations Calculate Sum of Squared Errors Then allocate variation 14 / 34

Allocating Variation Allocating Variation Allocating Variation Use same kind of procedure as on other models SSY = SS0 + SSA + SSB + SSE SST = SSY SS0 Can then divide total variation between SSA, SSB, and SSE Use same kind of procedure as on other models SSY = SS0 + SSA + SSB + SSE SST = SSY SS0 Can then divide total variation between SSA, SSB, and SSE 15 / 34

Calculating SS0, SSA, SSB Calculating SS0, SSA, SSB Calculating SS0, SSA, SSB SS0 = abµ 2 SSA = b j α2 j SSB = a i β2 i Recall that a and b are numbers of levels for the factors SS0 = abµ 2 SSA = b j α2 j SSB = a i β2 i Recall that a and b are numbers of levels for the factors 16 / 34

Allocation of Variation for Example Allocation of Variation for Example Allocation of Variation for Example SSE = 2512 SSY = 1, 858, 390 SS0 = 1, 149, 827 SSA = 2489 SSB = 703, 561 SST = 708, 562 Percent variation due to A: 0.35% Percent variation due to B: 99.3% Percent variation due to errors: 0.35% SSE = 2512 SSY = 1, 858, 390 SS0 = 1, 149, 827 SSA = 2489 SSB = 703, 561 SST = 708, 562 Percent variation due to A: 0.35% Percent variation due to B: 99.3% Percent variation due to errors: 0.35% 17 / 34

18 / 34 Analysis of Variation Analysis of Variation Analysis of Variation Again, similar to previous models, with slight modifications As before, use an ANOVA procedure Need extra row for second factor Minor changes in degrees of freedom End steps are the same Compare F-computed to F-table Compare for each factor Again, similar to previous models, with slight modifications As before, use an ANOVA procedure Need extra row for second factor Minor changes in degrees of freedom End steps are the same Compare F-computed to F-table Compare for each factor

Analysis of Variation for Our Example Analysis of Variation for Our Example Analysis of Variation for Our Example MSE = SSE/[(a 1)(b 1)] = 2512/[(2)(2)] = 628 MSA = SSA/(a 1) = 2489/2 = 1244 MSB = SSB/(b 1) = 703, 561/2 = 351, 780 F-computed for A = MSA/MSE = 1.98 F-computed for B = MSB/MSE = 560 95% F-table value for A & B is 6.94 So A is not significant, but B is MSE = SSE/[(a 1)(b 1)] = 2512/[(2)(2)] = 628 MSA = SSA/(a 1) = 2489/2 = 1244 MSB = SSB/(b 1) = 703, 561/2 = 351, 780 F-computed for A = MSA/MSE = 1.98 F-computed for B = MSB/MSE = 560 95% F-table value for A & B is 6.94 So A is not significant, but B is 19 / 34

Checking Our Results with Visual Tests Checking Our Results with Visual Tests Checking Our Results with Visual Tests As always, check if assumptions made in the analysis are correct Use residuals vs. predicted and quantile-quantile plots As always, check if assumptions made in the analysis are correct Use residuals vs. predicted and quantile-quantile plots 20 / 34

21 / 34 Residuals vs. Predicted Response for Example 40 Residuals vs. Predicted Response for Example Residuals vs. Predicted Response for Example 40 20 0-20 0 200 400 600 800 20 0-20 0 200 400 600 800

22 / 34 What Does the Chart Reveal? What Does the Chart Reveal? What Does the Chart Reveal? Do we or don t we see a trend in errors? Clearly they re higher at highest level of the predictors But is that alone enough to call a trend? Perhaps not, but we should take a close look at both factors to see if there s reason to look further Maybe take results with a grain of salt Do we or don t we see a trend in errors? Clearly they re higher at highest level of the predictors But is that alone enough to call a trend? Perhaps not, but we should take a close look at both factors to see if there s reason to look further Maybe take results with a grain of salt

23 / 34 Quantile-Quantile Plot for Example Quantile-Quantile Plot for Example Quantile-Quantile Plot for Example 40 20 0-20 -40-2 -1 0 1 2 40 20 0-20 -40-2 -1 0 1 2

24 / 34 Confidence Intervals for Effects Confidence Intervals for Effects Confidence Intervals for Effects Need to determine standard deviation for data as a whole Then can derive standard deviations for effects Use different degrees of freedom for each Complete table in Jain, p. 351 Need to determine standard deviation for data as a whole Then can derive standard deviations for effects Use different degrees of freedom for each Complete table in Jain, p. 351

Standard Deviations for Example Standard Deviations for Example Standard Deviations for Example se = 25 Standard deviation of µ: sµ = se/ ab = 25/ 3 3 = 8.3 Standard deviation of αj: sα j = se (a 1)/ab = 25 2/9 = 11.8 Standard deviation of βi: sβ i = se (b 1)/ab = 25 2/9 = 11.8 s e = 25 Standard deviation of µ: s µ = s e / ab = 25/ 3 3 = 8.3 Standard deviation of α j : s αj = s e (a 1)/ab = 25 2/9 = 11.8 Standard deviation of β i : s βi = s e (b 1)/ab = 25 2/9 = 11.8 25 / 34

Calculating Confidence Intervals for Example Calculating Confidence Intervals for Example Calculating Confidence Intervals for Example Only file system alternatives shown here We ll use 95% level 4 degrees of freedom CI for library solution: ( 39, 26) CI for VFS solution: ( 49, 16) CI for layered solution: ( 10, 55) So none of the solutions are significantly different from mean at 95% confidence Only file system alternatives shown here We ll use 95% level 4 degrees of freedom CI for library solution: ( 39, 26) CI for VFS solution: ( 49, 16) CI for layered solution: ( 10, 55) So none of the solutions are significantly different from mean at 95% confidence 26 / 34

Looking a Little Closer Looking a Little Closer Looking a Little Closer Do zero CI s mean that none of the alternatives for adding functionality are different? Not necessarily Use contrasts to check (see Section 18.5 & p. 366) Do zero CI s mean that none of the alternatives for adding functionality are different? Not necessarily Use contrasts to check (see Section 18.5 & p. 366) 27 / 34

28 / 34 Comparing Contrasts Comparing Contrasts Comparing Contrasts Is library approach significantly better than layers? Define a contrast: u = a j=1 hjαj where hj s are chosen so that a j=1 hj = 0 To compare library vs. layers, set h = (1, 0, 1) Contrast mean = a j=1 hjy j = 350.9 380.267 = 29.367 Contrast variance = se( 2 a j=1 h2 j )/b = 25 2/3 = 16.667, so contrast s.d. = 4.082 Using t [1 α/2;(a 1)(b 1)] = t [.975;4] = 2.776, confidence interval is 29.367 4.082 2.776 = ( 40.7, 18.0) So library approach is better, at 95% Is library approach significantly better than layers? Define a contrast: u = a j=1 h jα j where h j s are chosen so that a j=1 h j = 0 To compare library vs. layers, set h = (1, 0, 1) Contrast mean = a j=1 h jy j = 350.9 380.267 = 29.367 Contrast variance = se( 2 a j=1 h2 j )/b = 25 2/3 = 16.667, so contrast s.d. = 4.082 Using t [1 α/2;(a 1)(b 1)] = t [.975;4] = 2.776, confidence interval is 29.367 4.082 2.776 = ( 40.7, 18.0) So library approach is better, at 95%

29 / 34 Missing Observations Sometimes experiments go awry Missing Observations Missing Observations Sometimes experiments go awry You don t want to discard an entire study away just because one observation got lost Solution: Calculate row/column means and standard deviations based on actual observation count Degrees of freedom in SS* also must be adjusted See book for example Alternatives exist but are controversial If lots of missing values in a column or row, throw it out entirely Best is to have only 1 2 missing values You don t want to discard an entire study away just because one observation got lost Solution: Calculate row/column means and standard deviations based on actual observation count Degrees of freedom in SS* also must be adjusted See book for example Alternatives exist but are controversial If lots of missing values in a column or row, throw it out entirely Best is to have only 1 2 missing values

Adding Replications Replicated For r replications of each experiment, model becomes Adding Replications Replicated Replicated For r replications of each experiment, model becomes yijk = µ + αj + βi + γij + eijk γij represents interaction between factor A at level j and B at level i As before, effect sums αj and βi are zero Interactions are zero for both row and column sums: a b i γij = 0 j γij = 0 j=1 i=1 Per-experiment errors add to zero: r i, j y ijk = µ + α j + β i + γ ij + e ijk k=1 eijk = 0 γ ij represents interaction between factor A at level j and B at level i As before, effect sums α j and β i are zero Interactions are zero for both row and column sums: i a γ ij = 0 j b γ ij = 0 j=1 i=1 Per-experiment errors add to zero: i, j r e ijk = 0 k=1 30 / 34

31 / 34 Adding Replications Calculating Effects Adding Replications Calculating Effects Calculating Effects Same as usual: Calculate grand mean y, row and column means y i and y j and per-experiment means y ij µ = y αj = y j µ βi = y i µ γij = y ij αj βi µ eijk = yijk y ij Same as usual: Calculate grand mean y, row and column means y i and y j and per-experiment means y ij µ = y α j = y j µ β i = y i µ γ ij = y ij α j β i µ e ijk = y ijk y ij

Adding Replications Analysis of Variance Adding Replications Analysis of Variance Analysis of Variance Again, extension of earlier models See Table 22.5, p. 375, for formulas As usual, must do visual tests Again, extension of earlier models See Table 22.5, p. 375, for formulas As usual, must do visual tests 32 / 34

Adding Replications Why Can We Find Interactions? Adding Replications Why Can We Find Interactions? Why Can We Find Interactions? Without replications, two-factor model didn t give interactions Why not? Without replications, two-factor model didn t give interactions Why not? This slide has animations. In unreplicated experiment, we could have assumed no experimental errors and attributed variation to interaction instead (but that wouldn t be wise). 33 / 34

33 / 34 Adding Replications Why Can We Find Interactions? Adding Replications Why Can We Find Interactions? Why Can We Find Interactions? Without replications, two-factor model didn t give interactions Why not? Insufficient data Variation from predictions was attributed to errors, not interaction Interaction is confounded with errors Now, we have more info For given A, B setting, errors are assumed to cause variation in r replicated experiments Any remaining variation must therefore be interaction Without replications, two-factor model didn t give interactions Why not? Insufficient data Variation from predictions was attributed to errors, not interaction Interaction is confounded with errors Now, we have more info For given A, B setting, errors are assumed to cause variation in r replicated experiments Any remaining variation must therefore be interaction This slide has animations. In unreplicated experiment, we could have assumed no experimental errors and attributed variation to interaction instead (but that wouldn t be wise).

34 / 34 Adding Replications General Full Factorial Designs Adding Replications General Full Factorial Designs General Full Factorial Designs Straightforward extension of two-factor designs Average along axes to get effects Must consider all interactions (various axis combinations) Regression possible for quantitative effects But should have more than three data points If no replications, errors confounded with highest-level interaction Straightforward extension of two-factor designs Average along axes to get effects Must consider all interactions (various axis combinations) Regression possible for quantitative effects But should have more than three data points If no replications, errors confounded with highest-level interaction