## Name

tabcmp - Student T and F test for mean and variance comparisons

## Synopsis

tabcmp [parameter=value]

## Description

tabcmp compares two columns from two tables. It uses the Student’s t-test and f-test to assess if their means and variances are significantly different. It also assesses the two distributions using a non-parametric Kolmogorov-Smirnov test.

```t-test      different mean? But variances are expected to be the same
tu-test      different mean? But variances are allowed different
tp-test       different mean? Paired arrays
f-test        different variances? Different arrays allowed
ks2           non-parametric Kolmogorov-Smirnov test
```

## Parameters

The following parameters are recognized in any order if the keyword is also given:
in1=
First dataset, a simple ascii table. No default.
in2=
Second dataset. No default.
col1=
Column from 1st dataset (in1=). Default: 1.
col2=
Column from 2nd dataset (in2=). Default: 1.
nmax=
Max allocated lines in data if from a pipe. Default: 10000.

## Examples

Here is an example to compare two gaussian distributions, fully done through NEMO. First create two simple tables, random gaussian numbers with mean 0 and dispersion 1 (make sure they are not identical, or use seed=-1 in tabmath):
```    % nemoinp 1:20 | tabmath - - "rang(0,1)" all > tab1
% nemoinp 1:20 | tabmath - - "rang(0,1)" all > tab2
% cmp tab1 tab2
% tabcmp tab1 tab2
F-test: f=1.33497  prob=0.535006
T-test: t=-0.77149  prob=0.445188
TU-test: tu=-0.77149  prob=0.445285
TP-test: tp=-0.796496  prob=0.435584
KS2-test: ks2=0.15  prob=0.965485
```

## Bugs

Paired t-Test cannot handle identical arrays.

```http://www.physics.csbsju.edu/stats/KS-test.n.plot_form.html