|
T TESTName:
<SUBSET/EXCEPT/FOR qualification> where <LOWER TAILED/UPPER TAILED> is an optional keyword that specifies either a lower tailed or an upper tailed test; <y> is a response variable; <mu> is a parameter or number; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax performs a one sample t-test that the mean is equal to <mu> If <mu> is omitted, it is assumed to be zero. The response variable can be a matrix. If neither LOWER TAILED or UPPER TAILED is specified, the t test will return the results for the two-tailed case, the lower tailed case, and the upper tailed case. If LOWER TAILED is specified, then only the results for the lower tailed case will be printed. If UPPER TAILED is specified, then only the results for the upper tailed case will be printed.
<SUBSET/EXCEPT/FOR qualification> where <LOWER TAILED/UPPER TAILED> is an optional keyword that specifies either a lower tailed or an upper tailed test; <y1> ... <yk> is a list of one to 30 response variables; <mu> is a parameter or number; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax performs a one sample t-test that the mean is equal to <mu> for each of the response variables. If <mu> is omitted, it is assumed to be zero. The response variables can be matrices. If neither LOWER TAILED or UPPER TAILED is specified, the t test will return the results for the two-tailed case, the lower tailed case, and the upper tailed case. If LOWER TAILED is specified, then only the results for the lower tailed case will be printed. If UPPER TAILED is specified, then only the results for the upper tailed case will be printed.
<SUBSET/EXCEPT/FOR qualification> where <LOWER TAILED/UPPER TAILED> is an optional keyword that specifies either a lower tailed or an upper tailed test; <PAIRED> is an optional keyword that specifies whether a paired or unpaired t test is performed; <y1> is the first response variable; <y2> is the second response variable; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax performs a two sample t-test. If the keyword PAIRED is given, a paired t test is performed. Otherwise an unpaired t test is performed. The response variables can be matrices. If neither LOWER TAILED or UPPER TAILED is specified, the t test will return the results for the two-tailed case, the lower tailed case, and the upper tailed case. If LOWER TAILED is specified, then only the results for the lower tailed case will be printed. If UPPER will be printed.
<SUBSET/EXCEPT/FOR qualification> where <LOWER TAILED/UPPER TAILED> is an optional keyword that specifies either a lower tailed or an upper tailed test; <PAIRED> is an optional keyword that specifies whether a paired or unpaired t test is performed; <y1> ... <yk> is a list of 1 to 30 response variables; <y2> is the second response variable; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax performs all the pairwise t tests for the listed response variables. If the keyword PAIRED is given, a paired t test is performed. Otherwise an unpaired t test is performed. The response variables can be matrices. If neither LOWER TAILED or UPPER TAILED is specified, the t test will return the results for the two-tailed case, the lower tailed case, and the upper tailed case. If LOWER TAILED is specified, then only the results for the lower tailed case will be printed. If UPPER TAILED is specified, then only the results for the upper tailed case will be printed.
T TEST Y MU LOWER TAILED T TEST Y MU MULTIPLE ONE SAMPLE T TEST Y1 TO Y5 MU T TEST Y1 Y2 T TEST Y1 Y2 SUBSET TAG > 2 UPPER TAILED PAIRED T TEST Y1 Y2 MULTIPLE T TEST Y1 TO Y10
SET T TEST VARIANCE UNEQUAL SET T TEST VARIANCE BOTH The EQUAL keyword specifies that only the equal variance case will be printed, UNEQUAL specifies that only the unequal variances case will be printed, and BOTH resets the default that both the equal and unequal variance cases will be printed.
LET A = ONE SAMPLE T TEST CDF Y MU LET A = ONE SAMPLE T TEST PVALUE Y MU LET A = ONE SAMPLE T TEST LOWER TAIL PVALUE Y MU LET A = ONE SAMPLE T TEST UPPER TAIL PVALUE Y MU If MU is omitted in the above commands, it is assumed to be zero.
LET A = TWO SAMPLE T TEST CDF Y1 Y2 LET A = TWO SAMPLE T TEST PVALUE Y1 Y2 LET A = TWO SAMPLE T TEST LOWER TAIL PVALUE Y1 Y2 LET A = TWO SAMPLE T TEST UPPER TAIL PVALUE Y1 Y2 LET A = TWO SAMPLE PAIRED T TEST Y1 Y2 LET A = TWO SAMPLE PAIRED T TEST CDF Y1 Y2 LET A = TWO SAMPLE PAIRED T TEST PVALUE Y1 Y2 LET A = TWO SAMPLE PAIRED T TEST LOWER TAIL PVALUE Y1 Y2 LET A = TWO SAMPLE PAIRED T TEST UPPER TAIL PVALUE Y1 Y2 Enter HELP STATISTICS to see what commands can use these statistics.
1 SAMPLE is a synonym for ONE SAMPLE.
2011/3: Added support for paired t test 2011/3: Reformatted output for greater clarity 2011/3: Support for one-tailed tests
SKIP 25
READ AUTO83B.DAT Y1 Y2
T TEST Y1 Y2
The following output is generated.
Two Sample t-Test for Equal Means
First Response Variable: Y1
Second Response Variable: Y2
H0: Population Means Are Equal
Ha: Population Means Are Not Equal
Sample One Summary Statistics:
Number of Observations: 249
Sample Mean: 20.14457
Sample Standard Deviation: 6.41469
Sample Standard Deviation of the Mean: 0.40651
Sample Two Summary Statistics:
Number of Observations: 249
Sample Mean: -672.37751
Sample Standard Deviation: 480.11125
Sample Standard Deviation of the Mean: 30.42581
Test When Assume Equal Variances:
Pooled Standard Deviation: 339.52022
Difference (Delta) in Means: 692.52208
Standard Deviation of Delta: 30.42853
t-Test Statistic Value: 22.75897
Degrees of Freedom: 496
CDF Value: 0.99999
P-Value (2-tailed test): 0.00000
P-Value (lower-tailed test): 0.99999
P-Value (upper-tailed test): 0.00000
Test When Assume Unequal Variances:
Bartlett CDF Value: 1.00000
Difference (Delta) in Means: 692.52208
Standard Deviation of Delta: 30.42853
t-Test Statistic Value: 22.75897
Degrees of Freedom: 248
CDF Value: 1.00000
P-Value (2-tailed test): 0.00000
P-Value (lower-tailed test): 1.00000
P-Value (upper-tailed test): 0.00000
Two-Tailed Test (Assume Equal Variances)
H0: u1 = u2; Ha: u1 <> u2
------------------------------------------------------------
Null
Significance Test Critical Hypothesis
Level Statistic Value (+/-) Conclusion
------------------------------------------------------------
50.0% 22.75897 0.67498 REJECT
80.0% 22.75897 1.28326 REJECT
90.0% 22.75897 1.64793 REJECT
95.0% 22.75897 1.96475 REJECT
99.0% 22.75897 2.58577 REJECT
99.9% 22.75897 3.31024 REJECT
Lower One-Tailed Test (Assume Equal Variances)
H0: u1 = u2; Ha: u1 < u2
------------------------------------------------------------
Null
Significance Test Critical Hypothesis
Level Statistic Value (<) Conclusion
------------------------------------------------------------
50.0% 22.75897 0.00000 ACCEPT
80.0% 22.75897 -0.84234 ACCEPT
90.0% 22.75897 -1.28326 ACCEPT
95.0% 22.75897 -1.64793 ACCEPT
99.0% 22.75897 -2.33388 ACCEPT
99.9% 22.75897 -3.10674 ACCEPT
Upper One-Tailed Test (Assume Equal Variances)
H0: u1 = u2; Ha: u1 > u2
------------------------------------------------------------
Null
Significance Test Critical Hypothesis
Level Statistic Value (>) Conclusion
------------------------------------------------------------
50.0% 22.75897 0.00000 REJECT
80.0% 22.75897 0.84234 REJECT
90.0% 22.75897 1.28326 REJECT
95.0% 22.75897 1.64793 REJECT
99.0% 22.75897 2.33388 REJECT
99.9% 22.75897 3.10674 REJECT
Two-Tailed Test (Assume Unequal Variances)
H0: u1 = u2; Ha: u1 <> u2
------------------------------------------------------------
Null
Significance Test Critical Hypothesis
Level Statistic Value (+/-) Conclusion
------------------------------------------------------------
50.0% 22.75897 0.67547 REJECT
80.0% 22.75897 1.28497 REJECT
90.0% 22.75897 1.65101 REJECT
95.0% 22.75897 1.96957 REJECT
99.0% 22.75897 2.59579 REJECT
99.9% 22.75897 3.33017 REJECT
Lower One-Tailed Test (Assume Unequal Variances)
H0: u1 = u2; Ha: u1 < u2
------------------------------------------------------------
Null
Significance Test Critical Hypothesis
Level Statistic Value (<) Conclusion
------------------------------------------------------------
50.0% 22.75897 0.00000 ACCEPT
80.0% 22.75897 -0.84307 ACCEPT
90.0% 22.75897 -1.28497 ACCEPT
95.0% 22.75897 -1.65101 ACCEPT
99.0% 22.75897 -2.34147 ACCEPT
99.9% 22.75897 -3.12340 ACCEPT
Upper One-Tailed Test (Assume Unequal Variances)
H0: u1 = u2; Ha: u1 > u2
------------------------------------------------------------
Null
Significance Test Critical Hypothesis
Level Statistic Value (>) Conclusion
------------------------------------------------------------
50.0% 22.75897 0.00000 REJECT
80.0% 22.75897 0.84307 REJECT
90.0% 22.75897 1.28497 REJECT
95.0% 22.75897 1.65101 REJECT
99.0% 22.75897 2.34147 REJECT
99.9% 22.75897 3.12340 REJECT
Program 2:
let z = normal rand numb for i = 1 1 50
let mu0 = 0.3
set write decimals 5
.
t test z mu0
lower tailed t test z mu0
upper tailed t test z mu0
The following output is generated.
One Sample t-Test for the Mean
Response Variable: Z
H0: Mean Equal 0.30000
Ha: Mean Not Equal 0.30000
Summary Statistics:
Number of Observations: 50
Sample Mean: -0.00822
Sample Standard Deviation: 0.71196
Sample Standard Deviation of the Mean: 0.10068
Test:
Mean - Mu0: -0.30822
t-Test Statistic Value: -3.06121
Degrees of Freedom: 49
CDF Value: 0.00178
P-Value (2-tailed test): 0.00357
P-Value (lower-tailed test): 0.00178
P-Value (upper-tailed test): 0.99821
Two-Tailed Test
H0: u = m0; Ha: u <> m0
------------------------------------------------------------
Null
Significance Test Critical Hypothesis
Level Statistic Value (+/-) Conclusion
------------------------------------------------------------
50.0% -3.06121 0.67952 REJECT
80.0% -3.06121 1.29906 REJECT
90.0% -3.06121 1.67655 REJECT
95.0% -3.06121 2.00957 REJECT
99.0% -3.06121 2.67995 REJECT
99.9% -3.06121 3.50044 ACCEPT
Lower One-Tailed Test
H0: u = m0; Ha: u < m0
------------------------------------------------------------
Null
Significance Test Critical Hypothesis
Level Statistic Value (<) Conclusion
------------------------------------------------------------
50.0% -3.06121 0.00000 REJECT
80.0% -3.06121 -0.84901 REJECT
90.0% -3.06121 -1.29906 REJECT
95.0% -3.06121 -1.67655 REJECT
99.0% -3.06121 -2.40489 REJECT
99.9% -3.06121 -3.26507 ACCEPT
Upper One-Tailed Test
H0: u = m0; Ha: u > m0
------------------------------------------------------------
Null
Significance Test Critical Hypothesis
Level Statistic Value (>) Conclusion
------------------------------------------------------------
50.0% -3.06121 0.00000 ACCEPT
80.0% -3.06121 0.84901 ACCEPT
90.0% -3.06121 1.29906 ACCEPT
95.0% -3.06121 1.67655 ACCEPT
99.0% -3.06121 2.40489 ACCEPT
99.9% -3.06121 3.26507 ACCEPT
One Sample t-Test for the Mean
Response Variable: Z
H0: Mean Equal 0.30000
Ha: Mean Not Equal 0.30000
Summary Statistics:
Number of Observations: 50
Sample Mean: -0.00822
Sample Standard Deviation: 0.71196
Sample Standard Deviation of the Mean: 0.10068
Test:
Mean - Mu0: -0.30822
t-Test Statistic Value: -3.06121
Degrees of Freedom: 49
CDF Value: 0.00178
P-Value (2-tailed test): 0.00357
P-Value (lower-tailed test): 0.00178
P-Value (upper-tailed test): 0.99821
Lower One-Tailed Test
H0: u = m0; Ha: u < m0
------------------------------------------------------------
Null
Significance Test Critical Hypothesis
Level Statistic Value (<) Conclusion
------------------------------------------------------------
50.0% -3.06121 0.00000 REJECT
80.0% -3.06121 -0.84901 REJECT
90.0% -3.06121 -1.29906 REJECT
95.0% -3.06121 -1.67655 REJECT
99.0% -3.06121 -2.40489 REJECT
99.9% -3.06121 -3.26507 ACCEPT
One Sample t-Test for the Mean
Response Variable: Z
H0: Mean Equal 0.30000
Ha: Mean Not Equal 0.30000
Summary Statistics:
Number of Observations: 50
Sample Mean: -0.00822
Sample Standard Deviation: 0.71196
Sample Standard Deviation of the Mean: 0.10068
Test:
Mean - Mu0: -0.30822
t-Test Statistic Value: -3.06121
Degrees of Freedom: 49
CDF Value: 0.00178
P-Value (2-tailed test): 0.00357
P-Value (lower-tailed test): 0.00178
P-Value (upper-tailed test): 0.99821
Upper One-Tailed Test
H0: u = m0; Ha: u > m0
------------------------------------------------------------
Null
Significance Test Critical Hypothesis
Level Statistic Value (>) Conclusion
------------------------------------------------------------
50.0% -3.06121 0.00000 ACCEPT
80.0% -3.06121 0.84901 ACCEPT
90.0% -3.06121 1.29906 ACCEPT
95.0% -3.06121 1.67655 ACCEPT
99.0% -3.06121 2.40489 ACCEPT
99.9% -3.06121 3.26507 ACCEPT
Program 3:
. Example of paired t-test from p. 178 of Bowker and Lieberman
read w1 w2
73 51
43 41
47 43
53 41
58 47
47 32
52 24
38 43
61 53
56 52
56 57
34 44
55 57
65 40
75 68
end of data
set write decimals 5
paired t test w1 w2
The following output is generated.
Two Sample Paired t-Test for Equal Means
First Response Variable: W1
Second Response Variable: W2
H0: Population Means Are Equal
Ha: Population Means Are Not Equal
Sample One Summary Statistics:
Number of Observations: 15
Sample Mean: 54.20000
Sample Standard Deviation: 11.57707
Sample Two Summary Statistics:
Number of Observations: 15
Sample Mean: 46.20000
Sample Standard Deviation: 10.77165
Summary Statistics of Paired Data:
Number of Observations: 15
Sample Mean: 8.00000
Sample Standard Deviation: 11.02594
Sample Standard Deviation of the Mean: 2.84688
Test:
Difference (Delta) in Means: 8.00000
t-Test Statistic Value: 2.81008
Degrees of Freedom: 14
CDF Value: 0.99304
P-Value (2-tailed test): 0.01390
P-Value (lower-tailed test): 0.99304
P-Value (upper-tailed test): 0.00695
Two-Tailed Test
H0: u1 = u2; Ha: u1 <> u2
------------------------------------------------------------
Null
Significance Test Critical Hypothesis
Level Statistic Value (+/-) Conclusion
------------------------------------------------------------
50.0% 2.81008 0.69241 REJECT
80.0% 2.81008 1.34503 REJECT
90.0% 2.81008 1.76130 REJECT
95.0% 2.81008 2.14478 REJECT
99.0% 2.81008 2.97682 ACCEPT
99.9% 2.81008 4.14028 ACCEPT
Lower One-Tailed Test
H0: u1 = u2; Ha: u1 < u2
------------------------------------------------------------
Null
Significance Test Critical Hypothesis
Level Statistic Value (<) Conclusion
------------------------------------------------------------
50.0% 2.81008 0.00000 ACCEPT
80.0% 2.81008 -0.86805 ACCEPT
90.0% 2.81008 -1.34503 ACCEPT
95.0% 2.81008 -1.76130 ACCEPT
99.0% 2.81008 -2.62448 ACCEPT
99.9% 2.81008 -3.78729 ACCEPT
Upper One-Tailed Test
H0: u1 = u2; Ha: u1 > u2
------------------------------------------------------------
Null
Significance Test Critical Hypothesis
Level Statistic Value (>) Conclusion
------------------------------------------------------------
50.0% 2.81008 0.00000 REJECT
80.0% 2.81008 0.86805 REJECT
90.0% 2.81008 1.34503 REJECT
95.0% 2.81008 1.76130 REJECT
99.0% 2.81008 2.62448 REJECT
99.9% 2.81008 3.78729 ACCEPT
|
Privacy
Policy/Security Notice
NIST is an agency of the U.S.
Commerce Department.
Date created: 09/22/2011 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||