# 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
