Stat Ttest
stat_ttestRun independent, paired, or one-sample t-tests to compare means, with options for Welch correction, effect size, and confidence intervals.
Instructions
t-test: independent samples, paired, or one-sample.
WHEN TO USE
Two independent groups, continuous outcome, roughly normal, variances similar.
Same participants in two conditions →
paired=Truewithsubject.One sample against a reference value → pass
x(andyas the constant, or omit).
WHEN NOT TO USE
Three or more groups →
stat_anova(a t-test on all pairs inflates Type I error).Ordinal outcome, or badly non-normal with small n →
stat_nonparametric_2.Variances unequal → still a t-test, but set
correction=Trueto get Welch's.To claim two groups are equivalent →
stat_equivalence_test; a non-significant t-test is not evidence of equivalence.
Always report the effect size (Cohen's d, given in the output) and the CI.
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": {
"name": "<name>",
"dv": "<dv>"
},
"name": "stat_ttest"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | For one-sample or two-vector mode. | |
| y | No | Second variable for two-vector mode. | |
| dv | Yes | Dependent variable. | |
| name | Yes | Session dataset name. | |
| group | No | Column with exactly two levels (omit when using x/y). | |
| paired | No | True for within-subject / matched designs. | |
| subject | No | Participant identifier — required when paired=True. | |
| confidence | No | Confidence level for the CI. | |
| correction | No | 'auto' (Welch when sizes/variances differ) | True | False. | auto |
| alternative | No | two-sided | less | greater. | two-sided |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |