Calculate statistical power or sample size
statistics_power-sample-sizePower or required sample size for a two-sample t-test (noncentral t), one-way ANOVA (noncentral F), two proportions (Cohen's h) and a correlation (Fisher z). Exactly one of n or power is solved. Price $0.02 USDC. POST /api/v1/statistics/power-sample-size. An unpaid call returns the x402 payment terms and does not run.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"test": "<test>"
},
"name": "statistics_power-sample-size"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | n, value. Optional. | |
| r | No | r, value. Optional. | |
| p1 | No | p1, value. Optional. | |
| p2 | No | p2, value. Optional. | |
| test | Yes | test, string, one of t_two_sample, anova_oneway, two_proportions, correlation. Required. | |
| alpha | No | alpha, number. Required. | |
| power | No | power, value. Optional. | |
| groups | No | groups, integer, from 2 to 100. Optional. | |
| effectSize | No | effectSize, value. Optional. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nRaw | No | nRaw. Number. | |
| power | No | power. Number. | |
| method | No | method. String. | |
| totalN | No | totalN. Number. | |
| sources | No | sources. Array. | |
| nPerGroup | No | nPerGroup. Number. | |
| limitations | No | limitations. Array. |