Best for
- A researcher is designing a new behavioral, EEG, or fMRI experiment and needs sample size justification
- A grant proposal requires a power analysis section
- A preregistration document needs effect size justification and sample size rationale
NeuroAIHub/BrainPilot/packages/skills/skills/02_Cross-Domain_Foundation/cogsci-power-analysis/SKILL.md
Domain-specific statistical power analysis guidance for cognitive and neuroscience research, encoding effect size priors and sample size recommendations by modality
Decision brief
Domain-specific statistical power analysis guidance for cognitive and neuroscience research, encoding effect size priors and sample size recommendations by modality
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/NeuroAIHub/BrainPilot --skill "packages/skills/skills/02_Cross-Domain_Foundation/cogsci-power-analysis"Inspect the Agent Skill "cogsci-power-analysis" from https://github.com/NeuroAIHub/BrainPilot/blob/e9ddc112cab9b1c6272dae0c8a6bdceb5c9c3880/packages/skills/skills/02_Cross-Domain_Foundation/cogsci-power-analysis/SKILL.md at commit e9ddc112cab9b1c6272dae0c8a6bdceb5c9c3880. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
This skill was generated by AI from academic literature. All parameters, thresholds, and citations require independent verification before use in research. If you find errors, please open an issue.
Determine which modality and design type apply:
Determine which modality and design type apply:
Do not use generic benchmarks (Cohen's "small/medium/large"). Instead:
Choose method based on design complexity:
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 92/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 424 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
This skill encodes domain-specific knowledge for planning adequately powered studies in cognitive science and neuroscience. It provides:
An AI agent needs this because generic power analysis advice (e.g., "use G*Power with d = 0.5") fails to capture the enormous variability in effect sizes across cognitive science paradigms, and because neuroimaging modalities have unique statistical considerations.
Before executing the domain-specific steps below, you MUST:
For detailed methodology guidance, see the research-literacy skill.
This skill was generated by AI from academic literature. All parameters, thresholds, and citations require independent verification before use in research. If you find errors, please open an issue.
Determine which modality and design type apply:
| Modality | Common Designs | Key Consideration |
|---|---|---|
| Behavioral | Between-groups, within-subjects, mixed | Effect sizes vary enormously by paradigm |
| EEG/ERP | Within-subjects repeated measures | Trial count matters as much as participant count |
| fMRI (task) | Within-subjects block/event-related | Whole-brain vs. ROI analysis affects power |
| fMRI (individual differences) | Correlational, between-subjects | Requires much larger N than task contrasts |
| Clinical/Developmental | Case-control, longitudinal | Recruitment constraints often limit N; adjust design |
Do not use generic benchmarks (Cohen's "small/medium/large"). Instead:
references/effect-sizes.md for a curated library organized by modality.Modality-level median effect sizes (use only when paradigm-specific estimates are unavailable):
| Modality | Median Effect Size | Source |
|---|---|---|
| Behavioral (cognitive psychology) | d = 0.40 | Brysbaert, 2019 |
| EEG/ERP component differences | d = 0.50 - 1.00 | Boudewyn et al., 2018; Clayson et al., 2019 |
| fMRI task activation | d = 0.75 - 1.00 (within-subject) | Poldrack et al., 2017 |
| fMRI brain-behavior correlation | r = 0.10 - 0.20 | Marek et al., 2022 |
| Clinical group differences | d = 0.30 - 0.80 | Leucht et al., 2015; Button et al., 2013 |
Critical warning: The median statistical power in neuroscience has been estimated at only 21% (Button et al., 2013, Nature Reviews Neuroscience). Many published effect sizes are inflated by publication bias. Always apply skepticism to effect sizes from underpowered, unreplicated studies.
Choose method based on design complexity:
Use analytic solutions via G*Power or pwr (R):
Target: 80% power (minimum) or 90% power (recommended)
Alpha: 0.05 (two-tailed unless directional hypothesis is justified)
pwr.t.test(d = effect_size, power = 0.80, sig.level = 0.05, type = "two.sample")pwr.t.test(d = effect_size_dz, power = 0.80, sig.level = 0.05, type = "paired")pwr.r.test(r = effect_size, power = 0.80, sig.level = 0.05)Use simulation-based power analysis:
references/sample-size-guide.md for worked examples.Use these as sanity checks, not replacements for formal power analysis:
| Modality | Minimum N (per group/condition) | Basis |
|---|---|---|
| Behavioral (medium effect, d ≈ 0.5) | n = 30-50 per group | Brysbaert, 2019 |
| Behavioral (small effect, d ≈ 0.2) | n = 80-100 per group | Brysbaert, 2019 |
| Behavioral (within-subjects, d_z ≈ 0.4) | n = 50-65 | Brysbaert, 2019 |
| EEG/ERP (within-subjects) | n = 25-40 | Boudewyn et al., 2018 |
| fMRI (task activation, within-subjects) | n = 30-50 | Cremers et al., 2017; Poldrack et al., 2017 |
| fMRI (individual differences / brain-behavior) | n = 100+ (ideally 200+) | Marek et al., 2022 |
| fMRI (clinical group comparison) | n = 30-50 per group | Button et al., 2013 |
| Clinical/patient studies | n = 20-30 per group (minimum) | Leucht et al., 2015 |
| Developmental (cross-sectional age groups) | n = 25-40 per age group | Mills & Tamnes, 2014 |
For preregistration and manuscripts, the power analysis section must include:
Template language:
"Based on the meta-analytic effect size of d = [X] reported by [Author, Year], a power analysis using [tool] indicated that N = [X] participants per group would be needed to detect this effect with [80/90]% power at alpha = .05 (two-tailed). Anticipating a [X]% attrition/exclusion rate, we plan to recruit N = [adjusted X]."
Using Cohen's generic benchmarks as effect size priors: Cohen (1988) himself warned these were rough guidelines. Cognitive science effects range from d = 0.1 to d = 3.0+ depending on the paradigm. Always use paradigm-specific estimates (Brysbaert, 2019).
Ignoring the distinction between d and d_z: Between-subjects Cohen's d and within-subjects d_z are not interchangeable. Within-subjects designs typically yield larger d_z due to reduced error variance. Confusing them leads to incorrect sample size estimates (Lakens, 2013).
Powering for whole-brain fMRI but reporting ROI results (or vice versa): Whole-brain analyses with multiple comparison correction require larger effects to survive thresholding. Power calculations must match the planned analysis (Mumford & Nichols, 2008).
Treating pilot effect sizes as population estimates: Pilot studies with N = 10-20 produce wildly variable effect size estimates. Apply a correction factor or use the lower bound of the CI (Albers & Lakens, 2018).
Ignoring trial count in EEG/ERP power: For ERP analyses, both participant N and trial count per condition affect statistical power. Insufficient trials per condition reduces signal-to-noise ratio regardless of participant count (Boudewyn et al., 2018; Luck, 2014).
Assuming brain-behavior correlations are large: Marek et al. (2022) demonstrated that brain-wide association studies require thousands of participants for reliable effects. Planning an fMRI individual-differences study with N = 30 is almost certainly underpowered.
| Question | Answer | Recommended Action |
|---|---|---|
| "How many subjects for a Stroop study?" | Within-subjects Stroop effect is very large (d ≈ 1.0-1.5) | N = 15-25 likely sufficient (Brysbaert, 2019) |
| "How many for an ERP study of N400?" | N400 semantic violation effect d ≈ 0.8-1.5 | N = 20-30 (Boudewyn et al., 2018) |
| "How many for fMRI brain-behavior correlation?" | True r likely 0.10-0.20 | N = 200+ minimum (Marek et al., 2022) |
| "How many for a patient vs. control comparison?" | Effects vary widely (d ≈ 0.3-0.8) | N = 30-80 per group depending on expected effect |
| "Can I use my pilot N=12 effect size?" | Pilot effect is unreliable | Use meta-analytic estimate instead; if unavailable, use lower CI bound of pilot |
See references/effect-sizes.md for the full effect size reference library and references/sample-size-guide.md for detailed sample size guidance by modality.
Frequently asked questions
Domain-specific statistical power analysis guidance for cognitive and neuroscience research, encoding effect size priors and sample size recommendations by modality
The source record exposes this install command: npx skills add https://github.com/NeuroAIHub/BrainPilot --skill "packages/skills/skills/02_Cross-Domain_Foundation/cogsci-power-analysis". Inspect the command and pinned source before running it.
Alternatives
prowler-cloud/prowler
PostgreSQL indexing best practices for Prowler: index design, partial indexes, partitioned table indexing, EXPLAIN ANALYZE validation, concurrent operations, monitoring, and maintenance. Trigger: When creating or modifying PostgreSQL indexes, analyzing query performance with EXPLAIN, debugging slow queries, reviewing index usage statistics, reindexing, dropping indexes, or working with partitioned table indexes. Also trigger when discussing index strategies, partial indexes, or index maintenance
brucesongs/kali-claw
Insecure Design (OWASP A06:2025) focuses on security flaws in system architecture and design phases, rather than code implementation-level bugs.
NintendaDev/unikit-ai
Generate and maintain the project's TECHNICAL documentation from its codebase — scans the project structure, tech stack, and module boundaries, then writes a lean README landing page plus detailed topic pages (architecture, modules, setup, build, APIs), only the docs that are relevant. Use whenever the user wants to create, update, or validate documentation of the CODE or the project itself, e.g. "generate documentation", "create docs", "write the README", "update the project docs", "document th
Aperivue/medsci-skills
Generate publication-ready figures and visual abstracts for medical research papers. Supports ROC curves, forest plots, CONSORT/STARD/PRISMA flow diagrams, calibration plots, Kaplan-Meier curves, Bland-Altman plots, confusion matrices, pipeline diagrams, and journal-specific visual/graphical abstracts (python-pptx template-based).