SlideShare a Scribd company logo
‹#› Het begint met een idee
Experiment design
(advanced)
Ivano Malavolta
Vrije Universiteit Amsterdam
Advanced design types
Instrumentation
2
Roadmap
Ivano Malavolta / S2 group / Experiment design
Vrije Universiteit Amsterdam
3
Line of reasoning
Ivano Malavolta / S2 group / Experiment design
Vrije Universiteit Amsterdam
We can have the following cases:
● 1 factor and 2 treatments (1F-2T)
● 1 factor and >2 treatments (1F-MT)
● 2 factors and 2 treatments (2F-2T)
● >2 factors, each one with >=2 treatments (MF-MT)
4
Advanced design types
Ivano Malavolta / S2 group / Experiment design
Vrije Universiteit Amsterdam
5
2 factors
● Things become more complex
● Interaction must be modeled:
○ 𝜏i : effect of treatment i (level of factor A)
○ 𝛽j : effect of treatment j (level of factor B)
○ (𝜏𝛽)ij : effect of the interaction between 𝜏i and 𝛽j
● Two factors may interact with each other
Ivano Malavolta / S2 group / Experiment design
Vrije Universiteit Amsterdam
6
Definition of effect
Ivano Malavolta / S2 group / Experiment design
● Null hypothesis: no difference in means
● Typical model of an outcome (dependent variable):
○ Yij = 𝜇 + Ti + error
Outcome for
subject j
under
treatment i
Average
of all
values
Effect of
treatment i
(offset)
Vrije Universiteit Amsterdam
7
Definition of effect
Ivano Malavolta / S2 group / Experiment design
𝜇 = avg(Y) Ti = avg(Yi) - avg(Y)
𝜇 𝜇 + Ti
𝜑(Y)
Y
Vrije Universiteit Amsterdam
8
Interaction
Interaction: non-additive effects between factors
Additive model
Yij = 𝜇 + 𝜏i + 𝛽j + error
Non-Additive model
Yij = 𝜇 + 𝜏i + 𝛽j + (𝜏𝛽)ij + error
https://goo.gl/XUq8tp
Vrije Universiteit Amsterdam
9
2 factors, 2 treatments (2F-2T)
Ivano Malavolta / S2 group / Experiment design
● Example:
○ Objects: 8 applications
○ Factor 1: Connection Protocol
■ Treatment 1: HTTP
■ Treatment 2: HTTPS
○ Factor 2: Sorting Algorithm
■ Treatment 1: BubbleSort
■ Treatment 2: QuickSort
Vrije Universiteit Amsterdam
10
2F-2T: factorial design
Ivano Malavolta / S2 group / Experiment design
● Consider all possible combinations of treatments
● Each treatment is randomly assigned to experimental objects
● Balanced design: each combination is assigned to an equal number of objects
Factor 1:
Connection Protocol
Treatment 1:
HTTP
Treatment 2:
HTTPS
Factor 2:
Sorting
Treatment 1:
BubbleSort
Application 4,6 Application 1,7
Treatment 2:
QuickSort
Application 2,3 Application 5,8
Vrije Universiteit Amsterdam
11
2F-2T: factorial design
Ivano Malavolta / S2 group / Experiment design
● 𝜇i: mean of the dependent variable for treatment i
● 𝜇i=avg(P)
● 𝜏i : effect of treatment i (HTTP/HTTPS) of factor A (Conn. Protocol)
● 𝛽j : effect of treatment j (Bubble/Quick) of factor B (Sorting)
● (𝜏𝛽)ij : effect of the interaction between 𝜏i and 𝛽j
Vrije Universiteit Amsterdam
12
2F-2T: factorial design
Ivano Malavolta / S2 group / Experiment design
Null hypothesis: H0A: 𝜏1 = 𝜏2 = 0
Null hypothesis: H0B: 𝛽1 = 𝛽2 = 0
Null hypothesis: H0AB: (𝜏𝛽)ij = 0 ∀ i,j
Vrije Universiteit Amsterdam
13
2F-2T: factorial design
Ivano Malavolta / S2 group / Experiment design
Alternative hypothesis: H1A: ∃ i | 𝜏i ≠ 0
Alternative hypothesis: H1AB: ∃ (i,j) | (𝜏𝛽)ij ≠ 0
Alternative hypothesis: H1B: ∃ j | 𝛽j ≠ 0
Vrije Universiteit Amsterdam
14
2F-2T: 2-stage nested design
Ivano Malavolta / S2 group / Experiment design
● Example:
○ Objects: 8 applications
○ Factor 1: Interface
■ Treatment 1: Web-based
■ Treatment 2: Client-based
○ Factor 2: Programming Language
■ Treatment 1,1: PHP
■ Treatment 1,2: ASP
■ Treatment 2,1: Java
■ Treatment 2,2: C++
Vrije Universiteit Amsterdam
15
2F-2T: 2-stage nested design
Ivano Malavolta / S2 group / Experiment design
● One of the two factors has different treatments with respect to the other factor
● Balanced design, randomized application
Factor 1:
Interface
Treatment 1:
Web-based
Treatment 2:
Client-based
Factor 2:
Programming Language
Factor 2:
Programming Language
Treatment 1,1:
PHP
Treatment 1,2:
ASP
Treatment 2,1:
Java
Treatment 1,2:
C++
Application 1,3 Application 6,2 Application 7,8 Application 5,4
Vrije Universiteit Amsterdam
16
More than 2 factors
Ivano Malavolta / S2 group / Experiment design
● Number of experimental groups explodes
● Total number of trials is at least n*n
● More trials = more subjects (larger sample size)
Vrije Universiteit Amsterdam
17
Factorial designs
FULL-COVERAGE
○ every possible combination of all the alternatives of all
the factors
N = #trials
k = #factors
ni = #levels for i-th factor
Vrije Universiteit Amsterdam
18
Factorial designs
Discover the effects of each factor and its interactions with the
other factors
BEWARE: combinatorial curse
N = #trials
k = #factors
ni = #levels for i-th factor
SOLUTIONS?
Vrije Universiteit Amsterdam
19
Latin square designs
Ivano Malavolta / S2 group / Experiment design
● Latin Square: an n x n array with n different symbols
● Divide factors in main factor and co-factors (or blocking factor)
○ Levels of the main factors are the "letters” (in the cells)
○ Levels of the co-factors are rows and columns
● All levels of the main factor occurs per each blocking factor
Vrije Universiteit Amsterdam
20
Latin square designs
Ivano Malavolta / S2 group / Experiment design
● 3 factors
○ Code Size: Small, Medium, Large (Main Factor)
○ Programming Language: Java, C++, C (Blocking Factor)
○ Operating System: Windows, Linux, OS X (Blocking Factor)
● Total number of groups:
○ Full 33 factorial design: 27
○ Latin Square: 9
Vrije Universiteit Amsterdam
21
Latin square designs
Ivano Malavolta / S2 group / Experiment design
Factor 1:
Programming Language
Treatment 1:
Java
Treatment 2:
C++
Treatment 3:
C
Factor 2:
Operating
System
Treatment 1:
Windows Small Medium Large
Treatment 2:
Linux Medium Large Small
Treatment 2:
OS X Large Small Medium
Vrije Universiteit Amsterdam
22
Another example
● Main factor: object-orientation of language (A, B, C, D)
● Co-factor 1: size of the project (Very small to Very large)
● Co-factor 2: team experience (T1, T2, T3, T4)
Vrije Universiteit Amsterdam
23
Pitfalls of Latin squares
Ivano Malavolta / S2 group / Experiment design
● Incomplete or partial design
○ Key: balancing + randomization
● Assumption: factors do not interact
● Randomization is limited by design
Vrije Universiteit Amsterdam
24
Latin squares applicabile to 1-factor studies
● 1 factor - 1 block
Uninteresting factor
Factor of interest
Vrije Universiteit Amsterdam
25
Latin squares applicabile to 1-factor studies
● 1 factor à2 blocks
It is equivalent to superimposing two different Latin squares:
Vrije Universiteit Amsterdam
26
Instrumentation
Ivano Malavolta / S2 group / Experiment design
Vrije Universiteit Amsterdam
27
Instrumentation
● Instrumentation must not affect our control of the experiment
Goal: Provide a way to conduct and monitor the experiment
● Types of instrumentation:
○ Objects (e.g. servers, apps)
○ Guidelines (checklists, documentation)
○ Measurement tools (power meters, profiling software, etc.)
Ivano Malavolta / S2 group / Experiment design
Vrije Universiteit Amsterdam
● You know how to design an experiment
● Experiment design is an essential choice when doing an
experiment
● Constraints on statistical methods
● If possible, use a simple design
● Maximize the usage of the available objects
▪ automation will be your friend here
28
What this lecture means to you?
Ivano Malavolta / S2 group / Experiment design
Vrije Universiteit Amsterdam
29 Ivano Malavolta / S2 group / Experiment design
Readings
Chapter 8 Chapter 5
IMPORTANT - Checklist for making a good experiment design
(section 5.9)

More Related Content

PDF
[05-A] Experiment design (basics)
Ivano Malavolta
 
PDF
[02-A] The experimental process
Ivano Malavolta
 
PDF
[02-B] Experiment scoping
Ivano Malavolta
 
PDF
The Green Lab - [09 A] Statistical tests and effect size
Ivano Malavolta
 
PDF
The Green Lab - [01 C] Empirical software engineering
Ivano Malavolta
 
PDF
The Green Lab - [05 B] Experiment design (advanced)
Ivano Malavolta
 
PDF
The Green Lab - [05 A] Experiment design (basics)
Ivano Malavolta
 
PDF
The Green Lab - [03 B] Measurement theory basics
Ivano Malavolta
 
[05-A] Experiment design (basics)
Ivano Malavolta
 
[02-A] The experimental process
Ivano Malavolta
 
[02-B] Experiment scoping
Ivano Malavolta
 
The Green Lab - [09 A] Statistical tests and effect size
Ivano Malavolta
 
The Green Lab - [01 C] Empirical software engineering
Ivano Malavolta
 
The Green Lab - [05 B] Experiment design (advanced)
Ivano Malavolta
 
The Green Lab - [05 A] Experiment design (basics)
Ivano Malavolta
 
The Green Lab - [03 B] Measurement theory basics
Ivano Malavolta
 

What's hot (20)

PDF
[03-A] Experiment planning
Ivano Malavolta
 
PDF
[13 - B] Experiment reporting
Ivano Malavolta
 
PDF
The Green Lab - [09 B] Experiment validity
Ivano Malavolta
 
PDF
The Green Lab - [02 B] Experiment scoping
Ivano Malavolta
 
PDF
The Green Lab - [03 A] Experiment planning
Ivano Malavolta
 
PDF
[09-A] Statistical tests and effect size
Ivano Malavolta
 
PDF
[03-B] Measurement theory basics
Ivano Malavolta
 
PDF
The Green Lab - [02 A] The experimental process
Ivano Malavolta
 
PDF
[13 - A] Experiment validity
Ivano Malavolta
 
PDF
The Green Lab - [07-A] Data Analysis
Giuseppe Procaccianti
 
PDF
The Green Lab - [11-A] Data Visualization
Giuseppe Procaccianti
 
PDF
[07-B] Statistical hypothesis testing
Ivano Malavolta
 
PDF
[01-B] Empirical software engineering
Ivano Malavolta
 
PDF
The Green Lab - [13 B] Future research challenges
Ivano Malavolta
 
PDF
The Green Lab - [12-A] Data visualization in R
Giuseppe Procaccianti
 
PDF
[07-A] Descriptive Statistics and data exploration
Ivano Malavolta
 
PPTX
Analysis results-of-multiple-choice-tests
yousra_zarli
 
PDF
Resume_xuezhi
XUEZHI TANG
 
PDF
Cause effect graphing technique
Ankush Kumar
 
PPT
Test design techniques
Manindra Simhadri
 
[03-A] Experiment planning
Ivano Malavolta
 
[13 - B] Experiment reporting
Ivano Malavolta
 
The Green Lab - [09 B] Experiment validity
Ivano Malavolta
 
The Green Lab - [02 B] Experiment scoping
Ivano Malavolta
 
The Green Lab - [03 A] Experiment planning
Ivano Malavolta
 
[09-A] Statistical tests and effect size
Ivano Malavolta
 
[03-B] Measurement theory basics
Ivano Malavolta
 
The Green Lab - [02 A] The experimental process
Ivano Malavolta
 
[13 - A] Experiment validity
Ivano Malavolta
 
The Green Lab - [07-A] Data Analysis
Giuseppe Procaccianti
 
The Green Lab - [11-A] Data Visualization
Giuseppe Procaccianti
 
[07-B] Statistical hypothesis testing
Ivano Malavolta
 
[01-B] Empirical software engineering
Ivano Malavolta
 
The Green Lab - [13 B] Future research challenges
Ivano Malavolta
 
The Green Lab - [12-A] Data visualization in R
Giuseppe Procaccianti
 
[07-A] Descriptive Statistics and data exploration
Ivano Malavolta
 
Analysis results-of-multiple-choice-tests
yousra_zarli
 
Resume_xuezhi
XUEZHI TANG
 
Cause effect graphing technique
Ankush Kumar
 
Test design techniques
Manindra Simhadri
 
Ad

Similar to [05-B] Experiment design (advanced) (20)

PPT
Doe05 lsd
Arif Rahman
 
PDF
User Experiments in Human-Computer Interaction
Dr. Arindam Dey
 
PPT
Experimental design
metalkid132
 
PPTX
ppt2.pptx
shreyaparti1
 
PDF
Tests
Eiji Slideshare
 
PPT
Doe01 intro
Arif Rahman
 
PPTX
Marketing Experimentation - Part I
Minha Hwang
 
PDF
Design and Application of Experiments and User Studies
Victor Adriel Oliveira
 
PPT
classfeb24.ppt
RangothriSreenivasaS
 
PPT
classfeb24.ppt
minaketan81
 
PDF
Analytic emperical Mehods
M Surendar
 
PPTX
causal-research-1219342132452457-8.pptx
Tamil Mathi
 
PPTX
Ch. 7 finish and review
jbnx
 
PPT
Experimental designs
rx_sonali
 
PPTX
Common Shortcomings in SE Experiments (ICSE'14 Doctoral Symposium Keynote)
Natalia Juristo
 
PPT
The 5-step Approach to Controlled Experiment Design for Human Computer Intera...
National University of Singapore
 
PPTX
Desain Eksperimen pertemuan 5 membahas terkait two factor factorial design
WarstekTV
 
PPTX
Revised Design of Experiments and Analytical Techniques.pptx
sirajkatale
 
PPT
ch06 solution design of experiment for eng
ashaby
 
Doe05 lsd
Arif Rahman
 
User Experiments in Human-Computer Interaction
Dr. Arindam Dey
 
Experimental design
metalkid132
 
ppt2.pptx
shreyaparti1
 
Doe01 intro
Arif Rahman
 
Marketing Experimentation - Part I
Minha Hwang
 
Design and Application of Experiments and User Studies
Victor Adriel Oliveira
 
classfeb24.ppt
RangothriSreenivasaS
 
classfeb24.ppt
minaketan81
 
Analytic emperical Mehods
M Surendar
 
causal-research-1219342132452457-8.pptx
Tamil Mathi
 
Ch. 7 finish and review
jbnx
 
Experimental designs
rx_sonali
 
Common Shortcomings in SE Experiments (ICSE'14 Doctoral Symposium Keynote)
Natalia Juristo
 
The 5-step Approach to Controlled Experiment Design for Human Computer Intera...
National University of Singapore
 
Desain Eksperimen pertemuan 5 membahas terkait two factor factorial design
WarstekTV
 
Revised Design of Experiments and Analytical Techniques.pptx
sirajkatale
 
ch06 solution design of experiment for eng
ashaby
 
Ad

More from Ivano Malavolta (20)

PDF
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
Ivano Malavolta
 
PDF
Conducting Experiments on the Software Architecture of Robotic Systems (QRARS...
Ivano Malavolta
 
PDF
The H2020 experience
Ivano Malavolta
 
PDF
The Green Lab - Research cocktail @Vrije Universiteit Amsterdam (October 2020)
Ivano Malavolta
 
PDF
Software sustainability and Green IT
Ivano Malavolta
 
PDF
Navigation-aware and Personalized Prefetching of Network Requests in Android ...
Ivano Malavolta
 
PDF
How Maintainability Issues of Android Apps Evolve [ICSME 2018]
Ivano Malavolta
 
PDF
Collaborative Model-Driven Software Engineering: a Classification Framework a...
Ivano Malavolta
 
PDF
Experimenting on Mobile Apps Quality - a tale about Energy, Performance, and ...
Ivano Malavolta
 
PDF
Modeling objects interaction via UML sequence diagrams [Software Design] [Com...
Ivano Malavolta
 
PDF
Modeling behaviour via UML state machines [Software Design] [Computer Science...
Ivano Malavolta
 
PDF
Object-oriented design patterns in UML [Software Design] [Computer Science] [...
Ivano Malavolta
 
PDF
Structure modeling with UML [Software Design] [Computer Science] [Vrije Unive...
Ivano Malavolta
 
PDF
Requirements engineering with UML [Software Design] [Computer Science] [Vrije...
Ivano Malavolta
 
PDF
Modeling and abstraction, software development process [Software Design] [Com...
Ivano Malavolta
 
PDF
[2017/2018] Agile development
Ivano Malavolta
 
PDF
Reconstructing microservice-based architectures
Ivano Malavolta
 
PDF
[2017/2018] AADL - Architecture Analysis and Design Language
Ivano Malavolta
 
PDF
[2017/2018] Architectural languages
Ivano Malavolta
 
PDF
[2017/2018] Introduction to Software Architecture
Ivano Malavolta
 
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
Ivano Malavolta
 
Conducting Experiments on the Software Architecture of Robotic Systems (QRARS...
Ivano Malavolta
 
The H2020 experience
Ivano Malavolta
 
The Green Lab - Research cocktail @Vrije Universiteit Amsterdam (October 2020)
Ivano Malavolta
 
Software sustainability and Green IT
Ivano Malavolta
 
Navigation-aware and Personalized Prefetching of Network Requests in Android ...
Ivano Malavolta
 
How Maintainability Issues of Android Apps Evolve [ICSME 2018]
Ivano Malavolta
 
Collaborative Model-Driven Software Engineering: a Classification Framework a...
Ivano Malavolta
 
Experimenting on Mobile Apps Quality - a tale about Energy, Performance, and ...
Ivano Malavolta
 
Modeling objects interaction via UML sequence diagrams [Software Design] [Com...
Ivano Malavolta
 
Modeling behaviour via UML state machines [Software Design] [Computer Science...
Ivano Malavolta
 
Object-oriented design patterns in UML [Software Design] [Computer Science] [...
Ivano Malavolta
 
Structure modeling with UML [Software Design] [Computer Science] [Vrije Unive...
Ivano Malavolta
 
Requirements engineering with UML [Software Design] [Computer Science] [Vrije...
Ivano Malavolta
 
Modeling and abstraction, software development process [Software Design] [Com...
Ivano Malavolta
 
[2017/2018] Agile development
Ivano Malavolta
 
Reconstructing microservice-based architectures
Ivano Malavolta
 
[2017/2018] AADL - Architecture Analysis and Design Language
Ivano Malavolta
 
[2017/2018] Architectural languages
Ivano Malavolta
 
[2017/2018] Introduction to Software Architecture
Ivano Malavolta
 

Recently uploaded (20)

PDF
Protecting the Digital World Cyber Securit
dnthakkar16
 
PDF
Appium Automation Testing Tutorial PDF: Learn Mobile Testing in 7 Days
jamescantor38
 
PDF
Teaching Reproducibility and Embracing Variability: From Floating-Point Exper...
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
PPTX
Explanation about Structures in C language.pptx
Veeral Rathod
 
PPTX
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
PPTX
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
PPTX
Role Of Python In Programing Language.pptx
jaykoshti048
 
PDF
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
PDF
vAdobe Premiere Pro 2025 (v25.2.3.004) Crack Pre-Activated Latest
imang66g
 
PDF
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
PDF
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
PDF
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
PPTX
Presentation about Database and Database Administrator
abhishekchauhan86963
 
PPTX
PFAS Reporting Requirements 2026 Are You Submission Ready Certivo.pptx
Certivo Inc
 
PDF
Jenkins: An open-source automation server powering CI/CD Automation
SaikatBasu37
 
PPTX
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
PDF
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
PDF
Bandai Playdia The Book - David Glotz
BluePanther6
 
PPTX
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
Protecting the Digital World Cyber Securit
dnthakkar16
 
Appium Automation Testing Tutorial PDF: Learn Mobile Testing in 7 Days
jamescantor38
 
Teaching Reproducibility and Embracing Variability: From Floating-Point Exper...
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
Explanation about Structures in C language.pptx
Veeral Rathod
 
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
Role Of Python In Programing Language.pptx
jaykoshti048
 
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
vAdobe Premiere Pro 2025 (v25.2.3.004) Crack Pre-Activated Latest
imang66g
 
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
Presentation about Database and Database Administrator
abhishekchauhan86963
 
PFAS Reporting Requirements 2026 Are You Submission Ready Certivo.pptx
Certivo Inc
 
Jenkins: An open-source automation server powering CI/CD Automation
SaikatBasu37
 
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
Bandai Playdia The Book - David Glotz
BluePanther6
 
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 

[05-B] Experiment design (advanced)

  • 1. ‹#› Het begint met een idee Experiment design (advanced) Ivano Malavolta
  • 2. Vrije Universiteit Amsterdam Advanced design types Instrumentation 2 Roadmap Ivano Malavolta / S2 group / Experiment design
  • 3. Vrije Universiteit Amsterdam 3 Line of reasoning Ivano Malavolta / S2 group / Experiment design
  • 4. Vrije Universiteit Amsterdam We can have the following cases: ● 1 factor and 2 treatments (1F-2T) ● 1 factor and >2 treatments (1F-MT) ● 2 factors and 2 treatments (2F-2T) ● >2 factors, each one with >=2 treatments (MF-MT) 4 Advanced design types Ivano Malavolta / S2 group / Experiment design
  • 5. Vrije Universiteit Amsterdam 5 2 factors ● Things become more complex ● Interaction must be modeled: ○ 𝜏i : effect of treatment i (level of factor A) ○ 𝛽j : effect of treatment j (level of factor B) ○ (𝜏𝛽)ij : effect of the interaction between 𝜏i and 𝛽j ● Two factors may interact with each other Ivano Malavolta / S2 group / Experiment design
  • 6. Vrije Universiteit Amsterdam 6 Definition of effect Ivano Malavolta / S2 group / Experiment design ● Null hypothesis: no difference in means ● Typical model of an outcome (dependent variable): ○ Yij = 𝜇 + Ti + error Outcome for subject j under treatment i Average of all values Effect of treatment i (offset)
  • 7. Vrije Universiteit Amsterdam 7 Definition of effect Ivano Malavolta / S2 group / Experiment design 𝜇 = avg(Y) Ti = avg(Yi) - avg(Y) 𝜇 𝜇 + Ti 𝜑(Y) Y
  • 8. Vrije Universiteit Amsterdam 8 Interaction Interaction: non-additive effects between factors Additive model Yij = 𝜇 + 𝜏i + 𝛽j + error Non-Additive model Yij = 𝜇 + 𝜏i + 𝛽j + (𝜏𝛽)ij + error https://goo.gl/XUq8tp
  • 9. Vrije Universiteit Amsterdam 9 2 factors, 2 treatments (2F-2T) Ivano Malavolta / S2 group / Experiment design ● Example: ○ Objects: 8 applications ○ Factor 1: Connection Protocol ■ Treatment 1: HTTP ■ Treatment 2: HTTPS ○ Factor 2: Sorting Algorithm ■ Treatment 1: BubbleSort ■ Treatment 2: QuickSort
  • 10. Vrije Universiteit Amsterdam 10 2F-2T: factorial design Ivano Malavolta / S2 group / Experiment design ● Consider all possible combinations of treatments ● Each treatment is randomly assigned to experimental objects ● Balanced design: each combination is assigned to an equal number of objects Factor 1: Connection Protocol Treatment 1: HTTP Treatment 2: HTTPS Factor 2: Sorting Treatment 1: BubbleSort Application 4,6 Application 1,7 Treatment 2: QuickSort Application 2,3 Application 5,8
  • 11. Vrije Universiteit Amsterdam 11 2F-2T: factorial design Ivano Malavolta / S2 group / Experiment design ● 𝜇i: mean of the dependent variable for treatment i ● 𝜇i=avg(P) ● 𝜏i : effect of treatment i (HTTP/HTTPS) of factor A (Conn. Protocol) ● 𝛽j : effect of treatment j (Bubble/Quick) of factor B (Sorting) ● (𝜏𝛽)ij : effect of the interaction between 𝜏i and 𝛽j
  • 12. Vrije Universiteit Amsterdam 12 2F-2T: factorial design Ivano Malavolta / S2 group / Experiment design Null hypothesis: H0A: 𝜏1 = 𝜏2 = 0 Null hypothesis: H0B: 𝛽1 = 𝛽2 = 0 Null hypothesis: H0AB: (𝜏𝛽)ij = 0 ∀ i,j
  • 13. Vrije Universiteit Amsterdam 13 2F-2T: factorial design Ivano Malavolta / S2 group / Experiment design Alternative hypothesis: H1A: ∃ i | 𝜏i ≠ 0 Alternative hypothesis: H1AB: ∃ (i,j) | (𝜏𝛽)ij ≠ 0 Alternative hypothesis: H1B: ∃ j | 𝛽j ≠ 0
  • 14. Vrije Universiteit Amsterdam 14 2F-2T: 2-stage nested design Ivano Malavolta / S2 group / Experiment design ● Example: ○ Objects: 8 applications ○ Factor 1: Interface ■ Treatment 1: Web-based ■ Treatment 2: Client-based ○ Factor 2: Programming Language ■ Treatment 1,1: PHP ■ Treatment 1,2: ASP ■ Treatment 2,1: Java ■ Treatment 2,2: C++
  • 15. Vrije Universiteit Amsterdam 15 2F-2T: 2-stage nested design Ivano Malavolta / S2 group / Experiment design ● One of the two factors has different treatments with respect to the other factor ● Balanced design, randomized application Factor 1: Interface Treatment 1: Web-based Treatment 2: Client-based Factor 2: Programming Language Factor 2: Programming Language Treatment 1,1: PHP Treatment 1,2: ASP Treatment 2,1: Java Treatment 1,2: C++ Application 1,3 Application 6,2 Application 7,8 Application 5,4
  • 16. Vrije Universiteit Amsterdam 16 More than 2 factors Ivano Malavolta / S2 group / Experiment design ● Number of experimental groups explodes ● Total number of trials is at least n*n ● More trials = more subjects (larger sample size)
  • 17. Vrije Universiteit Amsterdam 17 Factorial designs FULL-COVERAGE ○ every possible combination of all the alternatives of all the factors N = #trials k = #factors ni = #levels for i-th factor
  • 18. Vrije Universiteit Amsterdam 18 Factorial designs Discover the effects of each factor and its interactions with the other factors BEWARE: combinatorial curse N = #trials k = #factors ni = #levels for i-th factor SOLUTIONS?
  • 19. Vrije Universiteit Amsterdam 19 Latin square designs Ivano Malavolta / S2 group / Experiment design ● Latin Square: an n x n array with n different symbols ● Divide factors in main factor and co-factors (or blocking factor) ○ Levels of the main factors are the "letters” (in the cells) ○ Levels of the co-factors are rows and columns ● All levels of the main factor occurs per each blocking factor
  • 20. Vrije Universiteit Amsterdam 20 Latin square designs Ivano Malavolta / S2 group / Experiment design ● 3 factors ○ Code Size: Small, Medium, Large (Main Factor) ○ Programming Language: Java, C++, C (Blocking Factor) ○ Operating System: Windows, Linux, OS X (Blocking Factor) ● Total number of groups: ○ Full 33 factorial design: 27 ○ Latin Square: 9
  • 21. Vrije Universiteit Amsterdam 21 Latin square designs Ivano Malavolta / S2 group / Experiment design Factor 1: Programming Language Treatment 1: Java Treatment 2: C++ Treatment 3: C Factor 2: Operating System Treatment 1: Windows Small Medium Large Treatment 2: Linux Medium Large Small Treatment 2: OS X Large Small Medium
  • 22. Vrije Universiteit Amsterdam 22 Another example ● Main factor: object-orientation of language (A, B, C, D) ● Co-factor 1: size of the project (Very small to Very large) ● Co-factor 2: team experience (T1, T2, T3, T4)
  • 23. Vrije Universiteit Amsterdam 23 Pitfalls of Latin squares Ivano Malavolta / S2 group / Experiment design ● Incomplete or partial design ○ Key: balancing + randomization ● Assumption: factors do not interact ● Randomization is limited by design
  • 24. Vrije Universiteit Amsterdam 24 Latin squares applicabile to 1-factor studies ● 1 factor - 1 block Uninteresting factor Factor of interest
  • 25. Vrije Universiteit Amsterdam 25 Latin squares applicabile to 1-factor studies ● 1 factor à2 blocks It is equivalent to superimposing two different Latin squares:
  • 26. Vrije Universiteit Amsterdam 26 Instrumentation Ivano Malavolta / S2 group / Experiment design
  • 27. Vrije Universiteit Amsterdam 27 Instrumentation ● Instrumentation must not affect our control of the experiment Goal: Provide a way to conduct and monitor the experiment ● Types of instrumentation: ○ Objects (e.g. servers, apps) ○ Guidelines (checklists, documentation) ○ Measurement tools (power meters, profiling software, etc.) Ivano Malavolta / S2 group / Experiment design
  • 28. Vrije Universiteit Amsterdam ● You know how to design an experiment ● Experiment design is an essential choice when doing an experiment ● Constraints on statistical methods ● If possible, use a simple design ● Maximize the usage of the available objects ▪ automation will be your friend here 28 What this lecture means to you? Ivano Malavolta / S2 group / Experiment design
  • 29. Vrije Universiteit Amsterdam 29 Ivano Malavolta / S2 group / Experiment design Readings Chapter 8 Chapter 5 IMPORTANT - Checklist for making a good experiment design (section 5.9)