1.3 Deciding on a hypothesis¶
At this step, the agent works from column names, what they are documented to mean, and the data summary written in step one to help you formulate a hypothesis.
This is the stage to spend time on. The agent is good at importing data and wrangling it into shape, particularly if your files were already tidy. What it cannot do for you is make sure the hypothesis it writes down is the one you wanted to test.
Say what you are testing before you look¶
I opened the data files in step one, but I did not plot anything. The hypothesis comes first. That does not make this confirmatory analysis. Other people have already studied this data, so I am still exploring.
The agent might offer suggestions of approaches. In this case it was the environmental Kuznets curve — the idea that forest loss rises with income among poorer countries, peaks, then falls among the richest. That was close to the question I already had, so I asked it for two or three testable hypotheses about whether the pattern still holds over the last twenty years.
Read what it gives you properly. Writing the hypotheses out by hand yourself is a good way to find out whether you agree with them.
Question and make it explain¶
Its first hypothesis fitted a quadratic in log GDP per capita, and it did not say why. So I asked whether that was standard practice for a Kuznets curve, and then went and read up on it myself — Wikipedia first, then Google Scholar. That turned up Stern (2004), a heavily cited review that is sceptical of the whole idea. Its abstract reports developing countries addressing environmental problems with only a short lag behind wealthy ones, and sometimes doing better. So the theory was already in doubt twenty years ago, and there is good reason to expect it may not hold in this data.
Doing this checking is your job, not the agent's.
When I asked it to explain the Kuznets curve properly, it changed its method completely. It produced the actual equation it proposed to fit, and then worked out that its own test was too weak: the sign of the squared term is not enough to establish a turning point, because a negative quadratic can peak outside the range of the data. You need the slope at each end.
The details of this particular fix do not matter. What matters is that you are responsible for the analysis it runs, so you need to follow the logic of any test it proposes. Narrow it down over several exchanges until you understand it and it matches the question you care about.
Know what your variables measure¶
I asked it to explain what "loss" meant in this data, and how it would handle the different years.
The answer changed the analysis. Portugal, Sweden and Finland lose forest to fire, and that land grows back. Other countries clear forest for agriculture, and it does not. Treating those as the same number would have been wrong, so the question split in two: one hypothesis about permanent conversion, a second about total loss including fire and other temporary disturbance.
I also dropped the year-by-year series from the first hypothesis — cumulative loss across the period is simpler and is what I actually wanted to know — and settled the predictor as mean income over the same period. That last one is a judgement call with a known flaw, since clearing forest for timber and agriculture itself adds to GDP, but the mean gives a more stable comparison than picking a year.
Then I asked how the data tells burnt-then-farmed apart from burnt-then-regrown. It does, using imagery from after the loss to classify what the land became. That rests on a model, which here we take on trust — but it is the kind of thing worth knowing you are trusting.
In the list below are seven questions I asked, which revealed three errors: a false factual claim, a specification that could not be estimated as stated, and a wrong number carried over from step one's console output instead of recomputed. The other four questions forced decisions that would otherwise have been made silently, about normalisation, scale, and which way a bias points.
Two patterns are worth carrying to your own analysis. The costly error came from a true fact about one data layer plus an unchecked assumption about another, and it looked like sound inference the whole way. And the underspecified hypothesis had variables, an outcome and a named test, and still could not be estimated — fluency hid the gap.
Updating the report¶
At the end of this step, the agent writes the research questions into the Introduction of Report.md, before anything is tested, so what was asked is fixed in the report before any result is known. The workings go to Appendix.md.
For this analysis the questions came out as: whether the share of forest permanently converted between 2001 and 2024 follows an inverted U in average income over those years; whether the same holds when fire and other temporary disturbance are counted as loss; and a descriptive look at how permanent loss has changed over the period in individual countries.
The agent will push on to step three. Stop and read the introduction first, because it is the context the next stage is built on. It is also worth asking it to tidy the appendix — it writes a great deal into it, and more than you need.
List of questions¶
These are questions I asked about whether a measure means what it is being asked to mean, which is what a domain expert can always interrogate.
1. "Countries vary in size. How are we going to deal with this?"
- Absolute hectares lost is close to a measure of how big a country is
- Absolute loss and loss-as-share-of-forest rank countries at only ρ = 0.51, and their top-ten lists share no country
- Forced a minimum-forest floor: Mauritania has 33.3 ha of tree cover and lost 33.2 of it, a "99.8% deforestation rate"
2. "Explain fitting a Kuznets curve. Is H1 consistent with that method?"
- H1 was underspecified: a 24-year cumulative outcome against an income whose year was never stated
- The answer criterion was too weak — a negative quadratic can have its peak outside the data
- Surfaced the bounded-resource problem: a country cannot clear forest it does not have, so a falling right limb may be depletion rather than conservation
3. "Explain the outcome in terms of loss more clearly. How do you handle different years?"
- The denominator was vague, and the obvious construction was wrong
- Subtracting all prior loss over-depletes countries whose forest regrows: Portugal lost 56.9% of its tree cover but only 1.6% permanently
4. "How do you measure cumulative loss?"
- Cumulative share and annualised rate are monotone transforms, ρ = 1.000000, with identical rankings
- The naive average (C ÷ years) understates by up to 16% exactly where loss is highest
- Skew is 2.10 raw but −0.02 in logs, which decided the functional form
5. "How does the data distinguish burnt-then-farmed from burnt-then-regrown?"
- Caught a factual error already written into the appendix
- The claim that post-fire conversion was invisible is false — the classifier uses post-loss imagery and reassigns burnt-then-farmed land to agriculture
- The error came from reasoning about the loss layer and drawing a conclusion about the driver layer, without checking the driver layer
6. "Could the same forest burn twice and be counted twice?"
- No. One loss year per pixel, and the empirical ceiling is 54.4%
- It exposed the opposite bias though: repeat disturbance is undercounted, concentrated in rich fast-rotation countries
- That tilts the curve's rich end downward, which is a bias in favour of the hypothesis being tested
7. "Tidy the appendix. Method will be decided next step."
- Caught a statistical test committed to during the framing step
- Prompted verifying every appendix number against the dataset, which found one wrong: 4,914,810 should be 4,914,809
Also see¶
- 1.4 Visualisation — steps 3 and 4, once the question is fixed.
- 1.2 Importing data