T Test Demo

There are three basic modes for the T-test. The first applies to a single wave and tests the hypothesis that the mean of the distribution is the specified value. In the second mode the test is used to compare the means of two waves. The third mode is used to compare

1. Testing a single wave

The wave data1 contains the following values: 19.2, 12.51, 19.05, 20.17, 19.87, 20.49,1 8.33, 22.87, 19.19, 15.55, 16.02, 20.04, 20.7, 19.5, 8, 24.1. To run the T-test execute the command:

StatsTTest/T=1/Q /CI/Mean=20  data1

The results are displayed in the T-Test table:

n115
DF114
avg119.178
stdv12.83594
sxBar0.732237
t_statistic-1.12259
critical2.14479
CI_low17.6075
CI_high20.7485

Since the magnitude of the test statistic is smaller than the critical value, we can't reject H0: mean=20.

2. Testing two waves

In this example the two waves have different lengths. The test compares the means of the two distributions. To run the test execute:

StatsTTest/T=1/Q /CI  data1,data2

The results are displayed in the T-Test table:

n115
DF114
avg119.178
stdv12.83594
n210
DF29
avg221.731
stdv22.45896
t_statistic-2.39024
P0.0254172
DFc21.281
lowCritical-2.07794
highCritical2.07794
CI_1_Low18.7725
CI_1_High19.5835
CI_2_Low21.1747
CI_2_High22.2873
Accept0

In this case the statistic is outside the critical values interval and so H0: the two waves have the same means, must be rejected.

3. Testing paired samples

The values in the wave data3 are: 14.61, 13.07, 17.92, 19.14, 17.72, 22.13, 19.98, 22.04, 21.2, 15.47, 13.08, 18.1, 19.61, 21.81, 21.81.

StatsTTest/T=1/Q /CI/PAIR  data1,data3

The results are displayed in the T-Test table:

n15
dBar0.665334
sdBar0.514836
tValue1.29232
df14
critical2.14479
P0.21717

In this example the statistic is smaller than the critical value and so we accept H0, i.e., there is no difference between the entries in data1 and data3.