Unit 1.2
Model Architecture and Parameterization
Lay out a model so its logic is visible, estimate its parameters defensibly, and produce evidence that it was built correctly — and can be rebuilt.
- Unit 1.1
- Unit 1.2
§ Overview
Unit 1.1 decided what kind of model you are building. Unit 1.2 decides how it is built and how it is trusted. Three concerns run through the unit: the physical layout of the model, the estimation of the numbers that go into it, and the evidence that the result is correct and repeatable.
The spreadsheet is treated here as a modelling instrument, not a convenience. A well-architected spreadsheet makes every assumption visible, every formula traceable, and every output reproducible by someone who did not build it. That is the standard Assignment 1 audits against.
Lesson 1
Inputs, calculations, outputs, and documentation
Lesson 2
Parameter estimation and calibration
Lesson 3
Verification, validation, and reproducibility
Laboratories 1–2
Spreadsheet architecture · parameter estimation
§ Learning outcomes
By the end of Unit 1.2 you will be able to
- Design a transparent spreadsheet or code-based model architecture with separated inputs, calculations, and outputs.
- Document a model so that its assumptions, units, and dependencies are explicit.
- Estimate and calibrate model parameters from data, and report the uncertainty in those estimates.
- Distinguish verification, validation, and reproducibility, and produce evidence for each.
- Audit an existing model for transparency, correctness, and reproducibility.
§ Lessons
Inputs, calculations, outputs, and documentation
Lay out a model so its logic is visible, testable, and safe to modify. The three-layer architecture and its documentation conventions.
Lesson 2Parameter estimation and calibration
Fit parameters to data, record the uncertainty in each estimate, and avoid overfitting a model to noise.
Lesson 3Verification, validation, and reproducibility
Separate the two activities, produce evidence for each, and leave a trail another analyst could rerun.
§ The three-layer architecture
The layout below is the one expected in Assignment 1 and used throughout the course. Inputs flow down into calculations, calculations flow down into outputs, and a documentation layer runs alongside all three. No formula should ever be typed directly into a cell that a reader would mistake for an input or an output.
Rules of the architecture
- Inputs are the only hand-edited cells. Everything else is derived.
- Calculations are one formula per row or column, filled consistently. No mixed logic inside a single range.
- Outputs reference calculations, never inputs directly. This keeps a single path from assumption to result.
- Units are stated once and applied consistently. Convert at the input layer, not mid-calculation.
- Documentation is a first-class deliverable, not a comment added at the end.
§ Parameter estimation workflow
Estimating a parameter is a modelling activity, not a spreadsheet function. The workflow below is the one you are expected to follow and to report in Assignment 1.
- State what the parameter means in the model Define it in words and give its units before estimating it.
- Identify the data that constrain it Record the source, the observation window, and the measurement error.
- Choose an estimation method Least squares, maximum likelihood, moment matching, or a domain-specific procedure.
- Fit the parameter Compute the estimate and keep the raw output, not only the rounded value.
- Report the uncertainty A standard error, confidence interval, or posterior spread — not just a point value.
- Check residuals and fit quality Look for structure in what the model fails to explain.
- Test sensitivity to the estimate Re-run the model at the ends of the uncertainty range and compare outputs.
- Document the choice and its limitations State what the estimate depends on and where it would not transfer.
§ Worked example
Estimating a decay parameter, with uncertainty
Suppose a quantity y(t) is believed to follow
y(t) = y₀ · e−kt, and you have noisy
measurements at t = 0, 1, 2, 3, 4, 5.
-
State the parameter.
kis the decay rate, with units of inverse time. It is the quantity of interest;y₀is a nuisance parameter. - Identify the data. Six measurements, each with an instrument precision. Record the source and the observation window.
-
Linearize and fit. Take natural logs:
ln y = ln y₀ − k t. A least-squares line on(t, ln y)gives an estimate ofk. -
Report uncertainty. Compute the standard error of
the slope and report
k ± 1 SE, not a bare number. - Check residuals. Plot the residuals of the log-linear fit. Structure in the residuals suggests the model form is wrong, not that the estimate needs refining.
-
Test sensitivity. Re-run the model at
k − 1 SEandk + 1 SE. If the conclusions change materially, the uncertainty matters and must be reported. - Compare against a direct nonlinear fit. If the log-linear estimate and the nonlinear estimate disagree materially, investigate the discrepancy rather than choosing the better-looking one.
Why report uncertainty at all
A parameter estimate without an uncertainty is not a modelling result; it is a number. The decision the model supports depends on how much the output moves when the parameter moves within its plausible range.
§ Key terms
- Model architecture
- The physical and logical layout of a model: where inputs live, where formulas live, where results are presented, and how the three are documented and connected.
- Three-layer spreadsheet
- An architecture that separates inputs, calculations, and outputs into distinct, clearly labelled regions, so that the only hand-edited cells are inputs.
- Estimation
- Deriving a parameter value from data. The estimate is a random variable, not a fixed truth, and carries uncertainty.
- Calibration
- Adjusting model parameters so that the model reproduces observed behaviour. Calibration is a specific form of estimation, usually applied to several parameters at once.
- Overfitting
- Fitting the noise in a dataset rather than the signal. A model that overfits reproduces its calibration data well and generalises poorly.
- Verification
- Determining whether the implementation matches the specification. It is an internal check: does the spreadsheet compute what you said it would compute?
- Validation
- Determining whether the model represents the real system well enough for its stated purpose. It is an external check against evidence, analytical solutions, or limiting cases.
- Reproducibility
- The property that another analyst, given the same inputs, files, and documented procedure, obtains the same results. Reproducibility is a precondition for audit, not a bonus.
- Model audit
- A structured review of an existing model for transparency, correctness, and reproducibility. Assignment 1 includes an audit component.
§ Common implementation errors
Watch for these
- Hard-coded numbers buried inside formulas. A constant typed into a calculation cannot be found, varied, or documented. Move it to the input layer.
- Mixed units within one column. Convert once, at the input layer, and state the unit in the header.
- Copying a formula down a column without checking the first and last row. Absolute and relative references behave differently at the edges of a range.
- Outputs that reference inputs directly. This creates a second, untested path from assumption to result and breaks the audit trail.
- Reporting a parameter estimate with no uncertainty. Without a spread, there is no way to judge whether a conclusion is robust.
- Treating verification as validation. A spreadsheet that computes exactly what you specified is not thereby a model of the real system.
§ Self-check
Check your understanding
Question 1
In a three-layer spreadsheet architecture, which layer should contain the formulas that transform parameters into results?
Show answer
Calculations. Inputs hold hand-edited values only. Outputs present results and should reference the calculation layer rather than performing calculations themselves. Putting formulas in the input layer destroys the audit trail; putting them in the output layer creates a second, untested path from assumption to result.
Question 2
Verification and validation differ because:
Show answer
Verification checks the implementation against the specification; validation checks the model against the real system. Verification asks "did I build what I said I would build?" Validation asks "is what I built good enough for the purpose?" A model can pass the first and fail the second.
Question 3
A model is reproducible when:
Show answer
Another analyst can rerun it and obtain the same results from the same inputs. Reproducibility is a property of the workflow, not of the output. It requires documented inputs, labelled outputs, stated units, and — for stochastic models — recorded seeds and step sizes.