Blocking and factorial designs

Class 4 opening activities

Gavin Simpson

Aarhus University

Tuesday, 22 September 2026

Design recall

12:30–12:40

Pig pens

Sixteen pens are arranged in four rooms. Each pen contains six pigs. Feed is delivered through one shared trough in every pen, and every pig is weighed.

What receives the diet independently?

Piece Represents
Yellow 4 × 4 plate One pen
Six pink 1 × 1 bricks Six pigs
Green/red 1 × 4 tile Diet for the whole pen

Treatment structure

Design element Pig study
Treatment factor Diet
Experimental unit Pen
Observational unit Pig
Independent units 16 pens
Observations 96 pigs

Six pigs in one pen provide more information about that pen. They do not create six independent diet allocations.

Measurements and units

Hand-drawn comparison of individually treated calves, pigs sharing feed within pens, and fish sharing controlled water temperatures within tanks.

Which boundary contains the units that receive treatment independently?

Room allocation

Eight pens receive each diet:

  • Rooms 1 and 2: standard diet
  • Rooms 3 and 4: high-fibre diet

What could explain a difference in growth?

Room Diet in all four pens
1 Standard
2 Standard
3 High-fibre
4 High-fibre

Confounding

Diet and room vary together:

  • standard diet occurs only in Rooms 1 and 2
  • high-fibre diet occurs only in Rooms 3 and 4
  • any consistent room difference can appear as a diet difference

Confounding occurs when the design cannot distinguish the effect of the treatment from another explanation.

Recall check

For the 16-pen study, identify:

  1. treatment factor
  2. experimental unit
  3. observational unit
  4. number of independent units
  5. flaw in the room-based allocation

Write first. Compare with a neighbour after one minute.

Blocking

12:40–12:55

Rooms differ

Hand-drawn cutaway of four livestock rooms showing differences in temperature, ventilation, staff disturbance and shade.

Which room differences could affect pig growth?

Nuisance variation

Room conditions matter to the response, but room is not the scientific treatment of interest.

Examples include:

  • temperature and ventilation
  • light and noise
  • staff traffic
  • position within the building

Known background variation can be incorporated into the design before treatments are allocated.

Blocks

A block is a group of experimental units expected to be relatively similar with respect to a known source of variation.

In the pig experiment:

  • each room forms one block
  • the four pens are the experimental units within a block
  • treatments will be compared within rooms

Within-room comparison

Every room contains:

  • two standard-diet pens
  • two high-fibre-diet pens

The diet comparison now occurs among pens sharing the same room conditions.

Room Standard diet High-fibre diet
1 2 pens 2 pens
2 2 pens 2 pens
3 2 pens 2 pens
4 2 pens 2 pens

Blocking gains

Blocking can:

  • keep treatment comparisons from following a known spatial difference
  • remove some predictable background variation from the treatment comparison
  • improve precision when units within a block are genuinely similar

Why might four within-room comparisons be clearer than one comparison across different rooms?

Blocking limits

Blocking by room does not control every difference among pens or pigs.

It does not automatically balance:

  • initial body mass or sex
  • health status
  • pen position within a room
  • unmeasured husbandry differences

Too many small blocks can also restrict allocation without improving precision.

Randomised blocks

12:55–13:05

Three design features

Feature Meaning in the pig study
Balance Equal numbers of pens receive each diet
Blocking Both diets occur within every room
Randomisation Chance assigns diets to pen positions within a room

A layout can be balanced without being randomised.

Within each room

The allocation rule is written before drawing any treatments:

  1. Put two standard-diet and two high-fibre-diet allocations in each room.
  2. Use a chance procedure to assign them to the four pen positions.
  3. Record the resulting allocation.

What remains fixed, and what is allowed to vary?

Random allocation

  1. Label the four pen positions.
  2. Mix two green and two red tiles unseen.
  3. Draw one tile for each position.
  4. Record the order.
  5. Repeat separately for every room.

Repeat the draw separately for each room.

Allocation record

room pen diet
1 1 high-fibre
1 2 standard
1 3 standard
1 4 high-fibre

The record identifies the treatment assigned to every experimental unit.

Why is “we randomised the pens” insufficient documentation?

Valid or not?

Example Pen positions 1–4 Procedure
A G, G, G, G Same diet throughout
B G, R, G, R Deliberately alternating
C R, G, G, R Unseen draw, recorded
D G, R, R, G Procedure unknown

G = green, standard diet. R = red, high-fibre diet.

Which layouts are balanced, blocked and randomised?

Block check

Complete the design description:

  • experimental unit: ______
  • blocking factor: ______
  • units per block: ______
  • pens per diet in each block: ______
  • point of randomisation: ______

Factorial designs

13:05–13:20

Two factors

The researcher asks whether pig growth responds to:

  • standard or high-fibre diet
  • standard or enriched housing
  • the combination of diet and housing

Both conditions can be applied at pen level.

How many distinct pen conditions are required?

Factors and levels

A factor is an explanatory variable deliberately varied in an experiment. A level is one specified setting of that factor.

Factor Levels
Diet Standard; high-fibre
Housing Standard; enriched

Four combinations

Diet Housing
Standard Standard
High-fibre Standard
Standard Enriched
High-fibre Enriched

2 × 2 = 4 treatment combinations

Combination Diet tile Transparent blue plate
SS Green Absent
HS Red Absent
SE Green Present
HE Red Present

Fully crossed

In a fully crossed factorial design, every level of one factor occurs with every level of the other factor.

Design A Design B
Standard diet, standard housing Standard diet, standard housing
High-fibre diet, standard housing Standard diet, standard housing
Standard diet, enriched housing High-fibre diet, enriched housing
High-fibre diet, enriched housing High-fibre diet, enriched housing

Factor or level?

Classify each term:

  • diet
  • high-fibre
  • housing
  • enriched
  • high-fibre diet with enrichment

Use the terms factor, level and treatment combination.

Why factorial?

A factorial experiment can estimate:

  • the average effect of diet across both housing conditions
  • the average effect of housing across both diets
  • whether the diet effect changes with housing

The same experimental units contribute information to more than one scientific question.

Factorial check

For the pig experiment:

  1. How many factors are manipulated?
  2. How many levels does each factor have?
  3. How many treatment combinations are required?
  4. What receives each combination independently?
  5. What would make the factors confounded?

Interactions

13:20–13:30

Main effects

The factorial design poses three questions:

  • Diet main effect: do the diets differ when averaged over housing conditions?
  • Housing main effect: do housing conditions differ when averaged over diets?
  • Interaction: does the diet effect depend on housing?

Main effects describe average differences. An interaction describes a changing difference.

Constant effect

The high-fibre diet increases mean average daily gain by 40 g/day under both housing conditions.

  • standard housing: 750 to 790
  • enriched housing: 770 to 810

The diet difference remains constant.

Interaction plot with parallel lines. High-fibre diet exceeds standard diet by 40 grams per day under both standard and enriched housing.

Changing effect

The diet difference changes with housing:

  • standard housing: 750 to 730
  • enriched housing: 760 to 810

The high-fibre diet has different estimated effects under the two housing conditions.

Interaction plot with crossing lines. High-fibre diet reduces average daily gain under standard housing but increases it under enriched housing.

Interaction

An interaction occurs when the effect of one factor differs among the levels of another factor.

For this study:

  • compare the two diets under standard housing
  • compare the two diets under enriched housing
  • judge whether those diet differences are similar

Ready to build

Answer before collecting the LEGO:

  1. What is the experimental unit?
  2. What is the block?
  3. How many treatment factors are there?
  4. How many treatment combinations are there?
  5. Where does randomisation occur?

LEGO legend

Standard diet: green tile

High-fibre diet: red tile

Enrichment: transparent blue plate

  • azure 16 × 16 plate: room or block
  • yellow 4 × 4 plate: pen or experimental unit
  • pink 1 × 1 brick: pig or observational unit
Actual piece Meaning
Grey 32 × 32 baseplate Facility
Azure 16 × 16 plate Room / block
Yellow 4 × 4 plate Pen / experimental unit
Pink 1 × 1 brick Pig / observational unit

Sources

Ruxton, Graeme D., and Nick Colegrave. 2016. Experimental Design for the Life Sciences. 4th ed. Oxford: Oxford University Press. Chapters 4, 5, 7, 8 and 9. ISBN 978-0-19-871735-5. Publisher page.

The animal scenarios, numerical interaction examples and physical representations were created for this course. Illustrations were created with AI assistance and checked against the stated experimental structures.