Psychology 815:Computer Lab #4
The Z-score and the Z-test
Sept. 20, 1996


Objectives:

  1. The Z-score
  2. The Z-test

Objective 1:

a.) The formula to calculate the Zscore is (X - mean) / SD For your first run, use X=2, mean=4, and SD=2

 b.) To calculate the area above the Zscore, use the following SAS code: areaabov = 1 - (PROBNORM (zscore)); where zscore is defined in part a.

 c.) To calculate the area below the Zscore (areabelo), take: 1 - areaabov

 d.) SAS has now done everything that you wanted. Now, you just have to tell it to show you the results. The PUT statement is used to "print" anything that you want in the output. Here's how to do it:

file print;
if zscore>=0 then put 'The probability above the zscore = ' areaabov;
run;

Now, figure out the SAS code to print the area below the curve when the zscore<0
 

Objective 2:

a.) The formula to compute the Z-test is (sampmean - mu)/se se is the standard error, which is defined as Sigma / (sqrt (N))

Note that the Z-test is significant if it is greater than 1.96 or less than -1.96 Please put this information into your SAS program so that your output tells you whether the Z-test is significant

b.) You've actually already done this -- without even knowing it :) The p-value is actually the probability above the Zscore (if the Zscore is positive) or the probability below the Zscore (if the Zscore is negative). So, just clip and paste the SAS code from Objective 1, part d, into this program, and you're all done.