PROC MEANS
calculates the
t statistic as
where
![](images/proc-proc-means-leqn52.png)
is the sample mean,
![](images/proc-proc-means-leqn53.png)
is the number of nonmissing values for a variable,
and
![](images/proc-proc-means-leqn54.png)
is the sample standard deviation. Under the null
hypothesis, the population mean equals
![](images/proc-proc-means-leqn55.png)
. When the data values are approximately normally
distributed, the probability under the null hypothesis of a
t statistic
as extreme as, or more extreme than, the observed value (the
p-value)
is obtained from the
t distribution with
![](images/proc-proc-means-leqn56.png)
degrees of freedom. For large
![](images/proc-proc-means-leqn57.png)
, the
t statistic is asymptotically
equivalent to a
z test.
When you use the WEIGHT
statement or WEIGHT= in a VAR statement and the default value of VARDEF=,
which is DF, the Student's
t statistic is calculated
as
where
![](images/proc-proc-means-leqn58.png)
is the weighted mean,
![](images/proc-proc-means-leqn59.png)
is the weighted standard deviation, and
![](images/proc-proc-means-leqn60.png)
is the weight for
![](images/proc-proc-means-leqn61.png)
observation. The
![](images/proc-proc-means-leqn62.png)
statistic is treated as having a Student's
t distribution
with
![](images/proc-proc-means-leqn63.png)
degrees of freedom. If you specify the EXCLNPWGT
option in the PROC statement, then
![](images/proc-proc-means-leqn64.png)
is the number of nonmissing observations when the
value of the WEIGHT variable is positive. By default,
![](images/proc-proc-means-leqn65.png)
is the number of nonmissing observations for the
WEIGHT variable.