Treatment Control
1 18 49
2 74 100
3 65 47
4 24 71
5 25 89
Designing studies
Covered last time:
Note
✅ Key idea from last lecture
A good test choice can’t rescue a badly designed study. Today is about the design decisions that come before you ever pick a test.

Today we’ll cover Chapter 1 in Whitlock and Schluter:


Lamberti and Resh 1983
Common scientific questions:
Note
📖 Reference
Gotelli & Ellison, A Primer of Ecological Statistics, Ch. 6 — Designing Successful Field Studies.

What sort of experiment is this design, and what are the issues with it?


Example: Spider and lizard populations on small islands
Hypothesis: On small islands, lizard predation controls spider density
We’re interested in causality. How do we get there?

Potential problems:

Good design: stronger inference from natural experiments.

The experimenter directly manipulates the predictor variable and measures the response.
Randomized, controlled trials: the gold standard.
Challenges:

Main problem of study design & interpretation: confounding variables.
Good study design seeks to eliminate confounding through:

Replication is important because:
Without appropriate replication: is the difference due to the manipulation, or something else?
Warning
⚠️ Watch out!
Replication must be on the appropriate scale — match the scale of replication to the population of interest, or you’ll run into pseudoreplication (Hurlbert 1984, Pseudoreplication and the Design of Ecological Field Experiments).


When you pseudoreplicate, you:
Replicates must be on a scale appropriate to the population (and hypothesis!) of interest:

What if replication is impossible, difficult, or expensive?
Example: effect of temperature on phytoplankton growth — 4 chambers (5, 10, 15, 20°C), 10 beakers in each. Are beakers true replicates?
Possible solutions:

Key question: is the response due to the manipulation/hypothesized mechanism, or an external factor?
Controls help address this question:
Examples:

Warning
Activity: designing controls for pine experiments
Work in small groups to design appropriate controls for each experiment:
For each experiment, identify:
Independence of observations is an assumption of many statistical methods. Events are independent if the occurrence of one has no effect on the occurrence of another.
Temporal/spatial autocorrelation: a violation of independence.

Randomization helps deconfound “lurking” variables — it attempts to equalize the effects of confounders.
Random sampling from a population:

Allocation of experimental units to treatment/control:
Randomization is essential at two levels:
Treatment Control
1 18 49
2 74 100
3 65 47
4 24 71
5 25 89
Simple random design:
Note
📖 Reference
Gotelli & Ellison, Ch. 7 — A Bestiary of Experimental and Sampling Designs, covers all four sampling designs on this and the following three slides.

Stratified designs: if there are distinct strata (groups) in the population, you may want to sample each independently.

Cluster designs:

Systematic designs:

Note
Activity: field sampling pine trees
Let’s consider sampling pine needles across campus:

In groups of 3–4, design a sampling strategy to:
For each strategy, describe:
\[\text{Power} \propto \frac{ES \cdot \alpha \cdot \sqrt{n}}{\sigma}\]
Note
📖 Reference
Whitlock & Schluter, Ch. 14 — Designing Experiments, covers planning the sample size needed for a study.
Using power analysis to plan experiments:
Cohen’s d — a standardized measure of effect size, particularly for comparing two means:
Tip
📖 Why standardize?
Cohen’s d helps determine the practical significance of a finding, as opposed to just statistical significance (p-values). A Cohen’s d of 0.8 means the groups differ by 0.8 standard deviations — large enough to be substantial in practical terms.
How many samples do you need to find this difference?
Two-sample t test power calculation
n = 25.52458
d = 0.8
sig.level = 0.05
power = 0.8
alternative = two.sided
NOTE: n is number in *each* group
Tip
🖐 Notice
pwr.t.test() solves for whichever argument you leave out — here, n. Leave out a different argument (e.g., power) and it solves for that instead.
Tip
🖐 Why it matters
Post hoc power can help convince reviewers that you are a good experimenter, but there really is no effect — please publish my non-significant finding!
Two-sample t test power calculation
n = 20
d = 0.5
sig.level = 0.05
power = 0.337939
alternative = two.sided
NOTE: n is number in *each* group
Note
✅ Key idea
Same function as a priori power analysis — pwr.t.test() — just with n supplied and power left out to solve for instead.
Important
Activity: power analysis for a pine needle experiment
Let’s design a study to compare needle lengths between exposed and sheltered pine trees:
[1] 0.8333333
Two-sample t test power calculation
n = 23.60467
d = 0.8333333
sig.level = 0.05
power = 0.8
alternative = two.sided
NOTE: n is number in *each* group
Important
Activity: power analysis for a pine needle experiment

Questions:

Key concepts we covered today:
Important
Remember: