Psychology 815:Computer Lab #5
Correlations: Z-test and confidence intervals
Sept. 27, 1996


Objectives:

  1. Brief review of last week's lab
  2. The Z-test for correlations
  3. Compute confidence intervals

Objective 1:

The variables ztest and zscore from last week are actually the same variable. To calculate the ztest, use the the formula:

        (sampmean - mu)/se where se is the standard error, which is defined as Sigma / (sqrt (N))
To calculate the p-value for the Zscore, use the following SAS code:
        areaabov = 1 - (PROBNORM (ztest)); where ztest is defined above.

        areabelo = 1- areaabov



Sorry about the confusion!

Objective 2:

 a.) The formula to compute the Z-test for a correlation is r * (sqrt (N-1))

        r  = .24

        N  =  40
b.) Same decision rule as before: If Z-test >= 1.96 or the Z-test is <= -1.96, the Z-test is significant
note: the above is NOT in SAS code. Refer back to last week's lab if you need help

c.) compute the p-value for the Z-test. Use the same formulas as last week. Don't forget to specify that you want SAS to do different things, depending on whether the Z-score is negative or positive.


Objective 3:
 

a.)  Create a 2-sided 95% confidence interval



        1.)  calculate the standard error: se = (1- r**) / (sqrt (N-1))

        2.)  error band = 1.96 (se)

        3.)  Lower Bound (LB) = r - error band

             Upper Bound (UB) = r + error band



b.) Create a 1-sided confidence interval

        1.)  calculate the se using the formula above

        2.)  error band = 1.65 (se)

        3.)  Worst Case (WC) = r - error band

             Best Case (BC)    = r + error band