Skip to main content
Glama

power_for_two_sample_t_test

Read-onlyIdempotent

Calculate statistical power for a two-sample t-test from Cohen's d, sample size per group, and alpha. Use it to see whether a study can detect a real effect or if a null result would be inconclusive.

Instructions

Statistical power to detect a given Cohen's d with n_per_group observations per group, using a two-sample t-test. Power is the probability of correctly detecting a real effect of this size at the given alpha; a design with low power means a non-significant result would be inconclusive rather than good evidence the effect doesn't exist. Use sample_size_for_two_sample_t_test instead to solve for n given a target power. Returns a float in [alpha, 1].

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
alphaNosignificance level for the test (and any confidence interval); default 0.05
n_per_groupYesplanned (or actual) observations per group
effect_size_dYesthe Cohen's d you want to be able to detect

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed3 schema fields changedv0.3.0
    • addedInput schema / properties / alpha / description
      Added value: +"significance level for the test (and any confidence interval); default 0.05"
    • addedInput schema / properties / effect_size_d / description
      Added value: +"the Cohen's d you want to be able to detect"
    • addedInput schema / properties / n_per_group / description
      Added value: +"planned (or actual) observations per group"
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already convey read-only, idempotent, non-destructive behavior, and the description adds useful context beyond that by stating the return range is [alpha, 1] and explaining the statistical meaning of power. Minor details like whether the test is one-sided or two-sided and whether equal variances are assumed are not mentioned, but the core behavioral contract is clear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and every sentence earns its place: it states the computation, explains the meaning of power, points to the relevant alternative tool, and states the return range. It is front-loaded with the core purpose and contains no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema, annotations, and high schema coverage, the description is largely complete. It provides return-range information, interpretation guidance, and a sibling-tool alternative. It could be slightly more complete by specifying assumptions such as two-sided testing or equal group sizes, but these are not severe gaps for this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already documents all parameters clearly with 100% coverage, so the description does not need to repeat parameter details. It adds some interpretive context around n_per_group and effect_size_d by embedding them in the power definition, but it does not materially exceed what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly names the resource (statistical power for a two-sample t-test) and the key inputs (Cohen's d, n_per_group, alpha). It distinguishes itself from sibling tools by explicitly focusing on power calculation rather than sample-size estimation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly directs users to sample_size_for_two_sample_t_test when they need to solve for n given target power, which is an actionable usage guideline. It also explains how low power should be interpreted, which helps the agent decide when this tool is relevant.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mrnh/rigor'

If you have feedback or need assistance with the MCP directory API, please join our Discord server