-
Description
Performs a T.H. on Single C.T. against a given value
(=µ0) by using t-test.
Calculated p-value is for two-sided by default.
-
H0: µ = µ0
Ha: µ ≠ µ0
For one-sided test, divide the p-value in half.
-
H0: µ = µ0
Ha: µ > µ0
or
Ha: µ < µ0
Undelying assumption for this
TTEST procedure is
that the observations are random samples drawn
from an independent and normally distributed
population.
If these assumptions could not be
satisfied or ascertained, you *should* use
Nonparametric statistics
techniques instead for testing your hypothesis on C.T..
(see
NPAR1WAY procedure)
Example)
Normally distributed with an unknown pop. variance.
n=20, xbar=26.035 and s=4.785
You want to test whether the system C.T., µ exceeds 25 at
α=0.01 (=99%);
-
H0: µ = 25
Ha: µ > 25 (since xbar=26.035!)
In this example, you are testing one-sided (i.e., Ha: µ > 25).
Thus be sure to divide the p-value (reported by SAS) in half
to conclude.
OPTIONS LINESIZE=70;
TITLE1 '=========================================================';
TITLE2 'T.H. on Single C.T. against a given value (=µ0) by using t-test';
TITLE3 '=========================================================';
DATA Rainfall;
/* @@ means a loop in reading input variable sequence */
INPUT ac_ft @@;
CARDS;
18.0 30.7 19.8 27.1 22.3 18.8 31.8
23.4 21.2 27.9 31.9 27.1 25.0 24.7
26.9 21.8 29.2 34.8 26.7 31.6
;
RUN;
/* Descriptive Statistics & Normality Check */
PROC UNIVARIATE PLOT NORMAL DATA=Rainfall;
TITLE1 '=========================================================';
TITLE2 'Univariate / Descriptive Statistics & Normality Check';
TITLE3 '=========================================================';
VAR ac_ft;
RUN;
/* Pairwise t-test for C.T. Comparison */
/* Mean overland runoff volume greater than 25 ac-ft? */
PROC TTEST DATA=Rainfall H0=25 ALPHA=0.01;
TITLE1 '=========================================================';
TITLE2 'T.H. on Single C.T. against ';
TITLE3 'µ0 = 25 ac-ft @ alpha=0.01 by using t-test';
TITLE4 '=========================================================';
VAR ac_ft;
RUN;
|
SAS User Guide (SUG) for Procedures (PROC) used in the Source
|
-
|