ConductScience Sample Size & Power Calculator: method and validation record
The calculation behind ConductScience's free sample size and power calculator, with six worked examples that check it.
ConductScience
- Published
- September 28, 2026
- Version
- 1.0.0
- Files
- 11 release files
About this dataset
Overview
Method and validation record for the free Sample Size & Power Calculator at conductscience.com/tools/sample-size-calculator. For two-sided tests, the tool computes the sample size needed for a target power, or the power reached with a given sample size: exactly from the noncentral t distribution for independent and paired t-tests given Cohen's d, and from the normal approximation for two proportions. Five t-test examples, including a very small effect (d = 0.1), are checked against the exact method G*Power uses (Faul et al. 2007), and one two-proportion example is worked by hand. The page's ANOVA option is an approximation and is not part of this record. The record holds the calculation source files, the worked examples, a validation report with each file's SHA-256, and what changed on the tool page when the record was written.
Inspect before download
Data preview
cases.csv · first 6 rows
| id | title | source_type | expected | pass |
|---|---|---|---|---|
| cross-check-two-sample-d05 | Two independent groups, medium effect (d = 0.5), 80% power, alpha 0.05 | cross-check | {"sampleSizePerGroup":64} | true |
| cross-check-paired-d05 | Paired design, medium effect (d = 0.5), 80% power, alpha 0.05 | cross-check | {"sampleSizePerGroup":34} | true |
| cross-check-two-sample-d20 | Two independent groups, very large effect (d = 2.0), 80% power, alpha 0.05 | cross-check | {"sampleSizePerGroup":6} | true |
| cross-check-power-two-sample-d20-n5 | Achieved power with 5 per group at d = 2.0, alpha 0.05 | cross-check | {"power":0.790542} | true |
| hand-worked-proportions | Two proportions, 50% against 30%, 80% power, alpha 0.05 | hand-worked | {"sampleSizePerGroup":93} | true |
| edge-tiny-effect | Two independent groups, very small effect (d = 0.1), 80% power, alpha 0.05 | cross-check | {"sampleSizePerGroup":1571} | true |
Read the columns
Data dictionary
cases.csvOne row per worked example.7 entries
| Name | Type | Units or values | Meaning |
|---|---|---|---|
| id | string | e.g. cross-check-two-sample-d05 | Case identifier; edge cases start with "edge-" |
| title | string | What the case checks | |
| source_type | string | cross-check, hand-worked | Where the expected answer comes from: published, hand-worked, analytic or cross-check |
| citation | string | Source of the method or the expected answer | |
| locator | string | Section, formula or table of the source that the case relies on | |
| expected | JSON object | null: not computable | Expected outputs as JSON; null means not computable |
| pass | boolean | true, false | true when every expected output matched the engine within the stated tolerance |
cases.json
The worked examples in full: inputs, expected outputs, tolerances, source passage and the arithmetic behind each expected answer.
validation-report.json
The engine's output for every case, pass or fail, with the byte count and SHA-256 of each calculation and harness file.
engine/pilot-tools.ts
Harness source (MIT). Slugs of the ten tools with validation records; the check accepts only these.
engine/sample-size/calculator.ts
Calculation source (MIT). Sample size and power for t-tests (exact) and two proportions (normal approximation).
engine/sample-size/noncentral-t.ts
Calculation source (MIT). The noncentral t distribution used for exact t-test power.
engine/sample-size/normal.ts
Calculation source (MIT). Normal distribution function (Abramowitz and Stegun, formula 26.2.17).
engine/sample-size/types.ts
Calculation source (MIT). Types for inputs and results.
engine/validation/run.ts
Harness source (MIT). Runs one case: passes its inputs to the tool's adapter and compares each output with the expected value within the tolerance.
engine/validation/tools/sample-size-calculator.ts
Harness source (MIT). Adapter from a case's inputs to this tool's calculation, returning the outputs the cases check.
engine/validation/types.ts
Harness source (MIT). Types for cases, tolerances and results.
Files
tool-sample-size-calculator-record-1.0.0.zip
19.3 kBComplete frozen release: 17 source-manifest files plus MANIFEST.json.
SHA-256 757be23b051f1a16d2f83f3c8c4cb8314ee16c2a236162636006afe09e0900f9
cases.csv
2.8 kBThe worked examples, one row each: what the case checks, the source of the expected answer, the expected outputs and whether the engine matched them.
SHA-256 69e1d8310678ac08957d27b48fc6e01469865f551794ed669c332e24f4c46197
cases.json
5.7 kBThe worked examples in full: inputs, expected outputs, tolerances, source passage and the arithmetic behind each expected answer.
SHA-256 26a605531eb010c7f84fc6767ec6980893db5cf5497f586c97cac0b271250e36
validation-report.json
2.7 kBThe engine's output for every case, pass or fail, with the byte count and SHA-256 of each calculation and harness file.
SHA-256 7512fd73f4e25d751c6acd1205383b3a3227a7f9680dab43ac9f646aa9278ae3
data_dictionary.csv
472 bytesColumns of cases.csv.
SHA-256 96b57ee5185ffcccc5397d98673c42bbc53ff77cc7f676fe5789ef04a7648090
README.md
1.8 kBWhat the tool computes, the files, and how to cite the record.
SHA-256 2b6d7ffb8ba6f538da20fdf68f0da54185a29487c599c0df475ae7739dc66876
METHODS.md
4.5 kBFormulas, input rules, conventions, references and what changed on the tool page.
SHA-256 aa3d3e7ee496c49b75914e69812f7529ff0674ed074298be2c194e028e6e518a
MANIFEST.json
2.6 kBByte count and SHA-256 for every file in the source release.
SHA-256 c56ab8eab21ee72d9d5710ebe14e74dec9f3c92f96a77afb16c29481b7f97461
CITATION.cff
420 bytesCitation metadata.
SHA-256 5a6a6cac7953635b8086931677e06d738a62b7605c327c706b48288f32c90e7f
LICENSE
1.3 kBMIT License for the calculation source files; CC BY 4.0 for everything else.
SHA-256 d2dca2297cc985f3577b9376fbf5a72231ac88be401776098486f6d1e8a4d87a
deposit-receipt.json
3.0 kBConductScience verification and packaging receipt.
SHA-256 b6991d3998709a590fa57c1f544eeb3402360e2e21854f1a7852b782a99f2a25
How it was made
Methods
- 1
Worked examples: each of the six cases gives its inputs, the expected outputs, the source and passage behind the expected answer, and the arithmetic. Expected answers for the t-tests were recomputed with SciPy 1.17.1 by the exact method G*Power uses; the two-proportion example is worked by hand. Cases whose ids start with edge- test inputs at the limits of the method.
- 2
Check: each case was run in Node.js 24 through the tool's calculation source files, and every output was compared with its expected value, exactly or within the tolerance the case states. All six cases pass (validation-report.json), and ConductScience's test suite runs the same cases whenever the tool changes.
- 3
Fingerprint: the validation report gives the byte count and SHA-256 of each calculation file and of the files that ran the check, and engine/ holds those files, so anyone can rerun the cases and tell whether a later version of the calculation differs from this one.
Version history
Version 1.0.0 · current
Published September 28, 2026 from source tag v1.0.0 at commit bda2c69a30ac.