Stat Power Analysis
stat_power_analysisSolve for the omitted effect size, sample size, power, or alpha by supplying the other three; use it to justify sample size before data collection or report achieved power after a study.
Instructions
Power analysis — solve for whichever of effect size / n / power / alpha is omitted.
WHEN TO USE
Before data collection, to justify the sample size (a priori power analysis).
To report the achieved power of a completed study.
WHEN NOT TO USE: to compute "observed power" from the current sample's effect size and then interpret it — that is circular and adds nothing to the p-value.
Supply exactly three of the four quantities; the fourth is solved for.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "stat_power_analysis"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| d | No | ||
| k | No | number of groups (ANOVA). | |
| m | No | number of repeated measurements (RM-ANOVA). | |
| n | No | sample size per group. | |
| r | No | ||
| w | No | ||
| test | No | ttest | ttest2n | anova | rm_anova | corr | chi2. | ttest |
| alpha | No | significance level. | |
| power | No | target power (0.80 is the conventional threshold). | |
| contrast | No | two-samples | one-sample | paired (for ttest). | two-samples |
| eta_squared | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |