T-test

The program performs Student's t-test for significantly different means. This test is applied when two distributions x and y are thought to have the same variance, but possibly different means. The test evaluates the significance of the t=(x0-y0)/SD, where x0 and y0 are mean estimates for x and y, SD is the "pooled variance". The t value follows Student's t-distribution with Nx + Ny - 2 degrees of freedom, where Nx and Ny are sample sizes for x and y. The significance is the probability that |t| could be this large or larger just by chance, for distributions with equal means; a value of the significance smaller than, for example, 0.05 means that the observed difference is significant at 95% confidence.

This program use statistical functions from "R" free software environment for statistical computing and graphics (http://www.r-project.org).

This program requires the R-package to be installed on your computer.

Input file should contain table of numerical data: lines for observations (cases) columns should be separated by tabulation or user-defines symbol (; , etc); for example, if comma (,) separator is used, the file format is the same as the CSV (comma separated values) format. No missing data allowed.

Example of output data:


T-test for means difference (two-tailed):
VarName	M	Var
Feat1	-2.6040	101.8692
Feat5	2.0072	102.6015
PooledVariance	102.2353
t-statistics	2.2803
df	98
prob	0.0248

First line is the header. Second line is the data descriptions, separated by tabulation (VarName - names for selected variables; M - mean values for variables; Var - variances for variables). Next lines list data for variables (names, means and variances), separated by tabulation. After the variable list the following parameters are printed out: Pooled Variance (PooledVariance), t-statistics, number of degrees of freedom (df) and the probability that |t| could be this large or larger just by chance (prob).

Example of input data file format:


ItemName   Feat1	Feat2		Feat3		Feat4		Feat5	   ClassVar
Item1	-11.761101	-5.295846	-2.491684	4.151158	9.777093	1
Item2	-11.425886	-6.753716	0.136692	5.161748	13.618702	1
Item3	-7.069796	0.545457	0.097140	0.678579	10.302988	1
Item4	-13.480880	-3.867702	0.119297	2.333842	10.992096	1
Item5	-9.707938	-2.597949	-2.329997	2.928526	8.441053	1
Item6	-10.013794	-2.165258	-3.169195	2.625904	10.611103	1
Item7	-9.057161	-4.766594	1.691733	1.655782	7.046236	1
Item8	-8.562761	-1.272652	-3.990204	2.286294	12.768212	1
Item9	-12.724631	-4.710623	-2.114719	2.812189	6.434645	1
Item10	-9.593738	-5.478652	-1.799524	4.306497	9.514756	1
Item11	-7.699759	-1.546648	-0.423322	4.889767	9.228675	1
Item12	-13.158116	-2.891354	0.595935	2.264199	12.004761	1
Item13	-10.509598	-3.414075	-1.962310	1.263863	10.199896	1
Item14	-6.547624	-3.594928	-2.117222	5.168950	10.838221	1
Item15	-12.375988	-3.130436	-2.169164	1.537614	11.112888	1
Item16	-12.953032	-2.805048	0.085116	3.303354	7.405194	1
Item17	-11.370708	-2.848384	-0.848201	3.885525	10.569231	1
Item18	-13.117222	-7.025575	1.406507	7.069338	12.230415	1
Item19	-11.573168	0.288003	-2.826167	4.397137	10.851711	1
Item20	-7.993835	-1.204352	-1.924345	0.829829	10.314768	1
Item21	-9.225135	-2.512925	-1.608051	1.420301	9.766411	1
Item22	-8.402783	-0.890500	3.189703	3.754479	7.481063	1
Item23	-9.888180	-3.345775	1.965667	2.906369	11.488815	1
Item24	-11.686270	-5.389477	2.556932	1.661153	9.717826	1
Item25	-12.599567	-0.266091	-3.936308	0.751762	10.405225	1
Item26	-11.365093	-1.919706	-0.458052	1.861843	9.521104	1
Item27	-11.027619	-2.944884	-2.792962	4.144322	7.958556	1
Item28	-11.795160	-6.769646	0.908383	1.005066	11.240333	1
Item29	-13.629933	0.674184	-3.386853	-0.095859	10.490432	1
Item30	-7.823298	-5.452589	-2.336894	1.919889	9.421125	1
Item31	6.360118	6.794549	4.168188	-4.492538	-12.297555	0
Item32	8.774682	0.492721	1.587909	-5.486587	-12.361278	0
Item33	7.768181	3.989776	3.289377	-0.895444	-13.067171	0
Item34	8.581133	2.922361	3.952544	-4.450362	-6.787133	0
Item35	6.176519	4.526292	-2.771599	-3.477187	-7.316202	0
Item36	11.539781	-0.892880	2.868221	-1.456557	-11.008881	0
Item37	11.743034	3.527726	-0.635792	-2.067965	-7.151524	0
Item38	10.527299	1.460768	0.862300	-1.967742	-8.819727	0
Item39	8.148808	5.157964	-0.916135	-1.551958	-9.467513	0
Item40	9.241432	1.483108	-0.981933	1.046571	-8.504166	0
Item41	9.444197	4.963927	1.127201	-0.523484	-9.102817	0
Item42	11.545396	4.604968	4.818171	-5.046815	-13.494675	0
Item43	11.890988	1.220710	-2.069796	-2.942747	-8.996673	0
Item44	11.810480	2.031465	2.987976	-5.699606	-10.026246	0
Item45	10.806543	5.275155	4.969420	-2.792596	-11.345561	0
Item46	10.261177	3.586077	3.340220	-3.339244	-7.795038	0
Item47	8.407544	2.887997	3.104312	-3.734519	-9.758477	0
Item48	7.317484	5.553850	1.618000	-2.525315	-13.613147	0
Item49	10.654500	2.579577	1.922452	-3.765160	-10.414136	0
Item50	6.940641	3.525834	-0.660756	-4.105869	-10.064455	0