This HTML automatically generated with rman for NEMO
Table of Contents


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


tabcmp [parameter=value]


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


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


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


Paired t-Test cannot handle identical arrays.

See Also

tabhist(1NEMO) , tabplot(1NEMO) , table(5NEMO) , nemoinp(1NEMO) , tabmath(1NEMO)
Filessrc/kernel/tab/tabcmp.c AuthorPeter Teuben Update History
7-Oct-97    V0.1 adopted from Numerical Recipes routines    PJT
8-oct-97    V0.2 added col1=,col2= and same-table processing    PJT
5-oct-00    V0.3 added KS2 test, also from NR    PJT
10-aug-03    fixed kstwo() indexing error    PJT

Table of Contents