> For the complete documentation index, see [llms.txt](https://docs.exploratory.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.exploratory.io/statistics/t-test.md).

# T-test

## Introduction

Execute t-test, which checks differences of means of variables.

## How to Access?

You can access from 'Add' (Plus) button.

![](/files/-M4oNDfhi6GtsNpKUIj7)

## How to Use?

#### Column Selection

![](/files/-M4oNDfj3V42NYUf7X_V)

* Value Column - Numeric column whose means should be calculated.
* Group Column (Optional) - Label column of 2 groups. Without this argument, one sample test, which compares mean with "True Effect Size" value, will be executed.

### Parameters

* Type of Alternative Hypothesis (Optional) - The default is "two.sided". What kind of alternative hypothesis to be used. This can be
  * "two.sided"
  * "less"
  * "greater"
* True Effect Size (Optional) - The default is 0. If it's one sample test, true value of the mean. If it's two sample test, the difference in means.
* Paired (Optional) - The default is FALSE. If it should be paired t-test, which is often used to test before values and after values are different.
* Equal Variance (Optional) - The default is FALSE. If the variances of the two groups can be considered as equal.
* Confidence Level (Optional) - The default is 0.95. The level of confidence interval.
* Subset (Optional) - A vector to specify a subset of observations to be used.
* NA Action (Optional) - The default is "na.fail". This changes the behaviour of NA data. Can be one of the following.
  * "na.omit"
  * "na.fail"
  * "na.exclude"
  * "na.pass"
  * NULL

Take a look at the [reference document](https://stat.ethz.ch/R-manual/R-devel/library/stats/html/t.test.html) for the 't.test' function from base R for more details on the parameters.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.exploratory.io/statistics/t-test.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
