Skip to main content
Scientific computing
Lesson 60 of 75
Review

Reproducible research

Objective. Design transparent computational investigations.

  1. 1. Learn
  2. 2. Worked example
  3. 3. Practice
  4. 4. Feedback
  5. 5. Continue

Learn: the key idea

Reproducible research designs computational investigations so that another researcher, given the same code and data, obtains the same results, requiring version-controlled code, documented software environments, fixed random seeds and clearly recorded data processing steps. For example, publishing a Monte Carlo study without recording the random seed means nobody can regenerate the exact same sample paths, even if the method is correctly described. Workflow tools and notebooks that combine code, output and narrative in one document make each step auditable, and sharing raw data alongside analysis scripts lets reviewers rerun the entire pipeline from scratch.

Worked example

In setting up a reproducible research pipeline for a simulation study, which practice is essential for an independent researcher to exactly regenerate the published random results?

Options
  • Reporting only the final summary statistics
  • Fixing and recording the random seed alongside the versioned code
  • Using the fastest available random number generator
  • Rounding all results to two decimal places
  1. 1Consider what is needed for someone else to regenerate identical random outcomes.
  2. 2Reporting only summary statistics loses the exact sequence of random draws used.
  3. 3Fixing and recording the random seed together with the exact code version allows the same random sequence to be reproduced exactly.
  4. 4Speed of the generator and rounding of results do not affect whether results can be exactly regenerated.

Answer: Fixing and recording the random seed alongside the versioned code

Concept mastery

Based on your past attempts at this lesson — the question types to practise again come first.

Complete a practice set to see your concept breakdown here.

Practice

Practice happens on its own screen, one question at a time. Answers stay hidden until you submit yours, and you can stop and pick up at the same question later.

Start practising

Common mistake. A common mistake is reporting only final results and summary statistics from a Monte Carlo or simulation study without saving the random seed or the code version used, making the exact numerical output impossible to regenerate later.

Your progress

Tick each step as you finish it. Your exact reading position is saved automatically, so Continue drops you back on the same line.

0 of 5 steps complete

Your place saves automatically as you read.

My dashboard