Design recap

After Class 4 · Preparing for simulation

Gavin Simpson

Aarhus University

Thursday, 1 October 2026

After the workshop

Use this deck on your own, with your group’s allocation table beside you.

Activity What to do Time
1. Recall Answer before looking at the explanations 5 minutes
2. Review Check the design and interpret an interaction 10 minutes
3. Prepare Describe a response for next class’s simulation 8 minutes

Pause at each question. Write an answer, then advance to check it.

Recall

Activity 1 · Answer from memory

Units and allocation

Our study used 16 pens in four rooms, with six pigs per pen. Each pen received one diet and one housing treatment.

  1. What was the experimental unit? Explain why.
  2. What was the observational unit when we weighed every pig?
  3. Where did we randomise the four treatment combinations?

Write one sentence for each answer before continuing.

Replication and evidence

  1. How many independent pen replicates did each of the four treatment combinations have?
  2. A layout has equal treatment counts in every room. Does that show that someone randomised it?
  3. One pig leaves a pen. How does this differ from losing all usable observations from that pen?

For each answer, state what you would count or check.

Units: answers

Question Answer and reason
Experimental unit Pen. Diet and housing are assigned to the whole pen.
Observational unit Pig, when the recorded response is an individual pig’s weight.
Randomisation Within each room. Randomly assign one of each combination to its four pens.

The unit of observation depends on the response. Next class, we will work with one response per pen.

Replication: answers

  • Four independent pens per combination: one in each of four rooms.
  • Balance describes the result. To establish randomisation, check how the allocation was generated and recorded.
  • One pig lost: the pen can still supply an outcome, but with fewer pig measurements.
  • One pen outcome lost: one combination now has only three usable pen outcomes, and that room is incomplete.

Repeated measurements cannot replace a missing independent pen replicate.

Review

Activity 2 · Explain the design

The LEGO model

LEGO instruction-style inventory: one baseplate, four room plates, sixteen pen plates, ninety-six pink pig bricks, eight green and eight red diet tiles, and eight transparent blue housing markers.

  • Azure plates represent rooms.
  • Yellow plates represent pens.
  • Pink bricks represent pigs.
  • Green/red tiles mark standard/high-fibre diet.
  • Blue marker absent/present marks standard/enriched housing.

The allocation table

One possible room in the completed factorial design:

Pen Room Position Diet Housing
P01 1 1 High fibre Enriched
P02 1 2 Standard Standard
P03 1 3 High fibre Standard
P04 1 4 Standard Enriched
  • Keep one allocation row per pen, with a unique pen identifier.
  • Check that each of the other rooms also contains all four combinations.
  • Preserve the method used to generate the allocation.

Why rooms matter

Course sketch illustrating possible room differences in sunlight, ventilation, disturbance and shade.

  • Rooms may differ in conditions that influence growth.
  • Comparing treatments within rooms helps separate treatment differences from room differences.
  • Blocking is most useful when units within a block are relatively similar.

Design structure

Decision What it specifies Our example
Factorial treatment structure Which factor levels occur together Both diets under both housing conditions
Blocking Which units form groups for treatment comparisons Four pens in each room
Randomisation How treatments reach particular units Shuffle all four combinations separately within each room

The two structural decisions are compatible: a factorial experiment can use a randomised complete block design.

An interaction?

Hypothetical mean daily gain, in grams per day:

Housing Standard diet High-fibre diet
Standard 750 730
Enriched 760 810
  • Calculate high-fibre minus standard diet within each housing condition.
  • Does one diet difference adequately describe both conditions?
  • Explain the biological meaning in one sentence.

Interaction: answer

Interaction plot of hypothetical means: diet difference is minus twenty grams per day in standard housing and plus fifty grams per day in enriched housing.

  • Standard housing: −20 g/day.
  • Enriched housing: +50 g/day.
  • The diet effect depends on housing: an interaction.
  • The equally weighted average diet effect is +15 g/day, which hides this difference.

More factors

With 16 independent pens and two levels per treatment factor:

Treatment factors Combinations Pens per combination
2 4 4
3 8 2
4 16 1

These counts assume equal allocation and set aside the four-room complete-block restriction.

With four factors, each combination occurs once. Six pigs per pen still give only one independent allocation per combination.

Targeted reading

In Ruxton and Colegrave, Experimental Design for the Life Sciences, fourth edition:

  • Chapter 8, §§8.1–8.3: revisit treatment combinations and interactions. Explain why testing both diets under both housing conditions is useful.
  • Chapter 9, §§9.1–9.2: revisit blocking. Explain why each room contains every treatment combination.

Write two short paragraphs using your group’s experiment. Revisit Chapter 5 if the distinction between pigs and pen replicates remains unclear.

Prepare

Activity 3 · Ready for Class 5

Next class’s study

We will use a simpler experiment to concentrate on simulating responses.

Feature Class 4 workshop Class 5 simulation
Experimental units 16 pens 16 pens
Blocks Four rooms Four rooms
Treatment factors Diet and housing Diet only
Allocation within room One of each combination Two pens per diet
Response Planned measurements One simulated response per pen

Housing will not vary as an experimental treatment in the Class 5 exercise.

A response per pen

Hand sketch of possible outcomes from pig pens: weight gain, whether treatment was needed, treatment events and feed conversion.

Possible responses include:

  • Mean daily weight gain.
  • Whether any pig needed veterinary treatment.
  • Number of treatment events.
  • Feed conversion ratio.

The response definition determines what values one observation can take.

Possible values

For each response, describe its possible values. Do this before choosing a statistical distribution.

Response Questions to consider
Mean daily gain Could it include decimals? Could it be negative?
Any pig treated Which two values encode no and yes?
Treatment events Could it be zero? Could it be 2.5?
Feed conversion ratio With positive feed intake and positive gain, could it be negative?

Pause and write your answers before continuing.

Values: answers

Response Possible observed values
Mean daily gain Continuous values, including negative values if pigs lose weight
Any pig treated 0 or 1 for each pen
Treatment events Whole numbers: 0, 1, 2, and so on
Feed conversion ratio Positive continuous values under our stated conditions

A probability of 0.2 can describe the chance that a pen needs treatment. The observed yes/no outcome is still 0 or 1.

Design before data

Illustrative rows for the new diet-only study:

Pen Room Position Diet Response
P01 1 1 High fibre Not yet generated
P02 1 2 Control Not yet generated
P03 1 3 Control Not yet generated
P04 1 4 High fibre Not yet generated
  • The allocation table can exist before any outcome is measured.
  • A simulation supplies an outcome under stated assumptions.
  • A fresh simulated dataset can use the same allocation table.

Assumed means

Suppose we assume these expected mean daily gains:

Room Control diet High-fibre diet
1 750 g/day 770 g/day
2 780 g/day 800 g/day
  • The assumed diet difference is 20 g/day in both rooms.
  • The assumed room difference is 30 g/day for both diets.
  • Individual pen outcomes can vary around these means.

These numbers describe a hypothetical scenario, not results from the workshop.

What changes?

Suppose we retain the same allocation and the same assumed means, but generate another set of pen outcomes.

  • Must the observed diet difference be exactly 20 g/day?
  • Does a different set of outcomes mean that the treatment allocation changed?
  • What additional information do we need beyond the expected means to simulate realistic observations?

Pause and explain each answer in words. No calculation or R code is needed.

Simulation: answers

  • A simulated treatment estimate can differ from the assumed 20 g/day because outcomes vary among pens.
  • The allocation can remain fixed while the simulated responses change.
  • We need assumptions about the response distribution and variation, as well as expected means.

Next class, we will distinguish randomising treatment allocation from generating responses, and record the random seeds used for each operation.

Ready for Class 5

Bring your allocation table and a short response to these prompts:

  • Which pen-level outcome would you like to investigate, and over what period?
  • What values could one observation take?
  • What diet difference would matter biologically?
  • What evidence could inform your assumptions about room differences and variation among pens?

You may write “I need more information” where appropriate. State what information you would seek.

Sources

Ruxton, G. D., and Colegrave, N. (2016). Experimental Design for the Life Sciences. Fourth edition. Oxford University Press. Book and contents.

  • Units and replication: Chapters 4–5.
  • Randomisation: Chapter 7.
  • Factorial designs and interactions: Chapter 8.
  • Blocking: Chapter 9.

The simulation preparation follows the course’s Class 5 teaching plan. All numerical cases are hypothetical. Illustrations are reused course artwork.