Using SPSS to compute normal distribution cdf values & other
probabilities
Below are instructions for obtaining
P(Z <= 1) = Φ(1) and
P(-1 < Z <= 1), where Z is a standard normal
random variable. (Scroll down to see how to deal with other normal
distributions.)
- Start SPSS. The Data Editor spreadsheet should appear in the
background with a smaller window/box opened on top of it. Click the
Type in data "button" and then click OK.
- Enter the value 1 into the first row of the first
column on the Data Editor spreadsheet. To name the column, click on
Variable View at the bottom of the Data Editor window, and then
replace VAR00001 in the first row of the name column by
z (or you can use some other name, or simply just let the name
stay as VAR00001). Finally, click of Data View at the bottom of
the window to get back the original spreadsheet.
- Click on Transform on the main menu bar near the top of the
window, pull down, and select Compute. This should cause a
Compute Variable window to open.
- In the Target Variable box on the Compute Variable window,
type prob. Next, in the Functions box, scroll down and
find CDFNORM(zvalue). Highlight (click on it to make it blue)
CDFNORM(zvalue). At this point, the "up arrow" next to
Functions should become "active." Click on the arrow, and
CDFNORM(?) should appear in the Numeric Expression box, with the
? highlighted blue.
- Highlight z in the Type & Label box. Next, click on
the "right arrow" between the Type & Label and Numeric
Expression boxes, which should cause the previously highlighted
? to become z.
- Now click OK at near the bottom of the Compute
Variable window. This should cause the number .84
to appear in a column (the 2nd column) of the Data Editor
window, with the column named prob. This value is the desired
probability --- the value of P(Z<=1).
- An annoying thing is that the probability has been rounded to
the nearest hundreth. To get more digits, click on Variable View
at the bottom of the Data Editor window, and then click on the cell in
the 2nd row (the prob row) of the Decimals column. (This
cell should contain a 2.) Clicking the cell should make up and down
arrows appear the the cell. Click the up arrow twice to change the 2 to
a 4. Then click Data View at the bottom of the Data
Editor window. Now you should see that the desired probability in
the 2nd column have been expressed with 4 digits after the decimal.
- To obtain P(-1 < Z <= 1), we can subtract P(Z <= -1)
from P(Z <= 1). To do this, once again click on
Transform and select Compute. You should find that
CDFNORM(z) is still in
the Numeric
Expression box. Click in the box right after
CDFNORM(z) and use your keyboard to type a minus sign right after
CDFNORM(z). Then once again highlight
CDFNORM(zvalue)
in the Functions box and click the up arrow to put
CDFNORM(?) after the minus sign. Use your keyboard to change the
? to -1, and then click OK. When you agree to
change the existing variable (SPSS will query you about this), the value
of prob should become 0.6827, which is the desired probability
(rounded to 4 decimal places).
To obtain
P(X <= 1),
where X is a normally distributed
random variable having mean 2 and standard deviation 0.5, you can follow
steps 1 through 7 above, only selecting
CDF.NORMAL(q,mean,stddev) instead of
CDFNORM(zvalue), and also using your keyboard to change the last
two question marks to 2 and 0.5 (the desired values for the mean and
standard deviation) before clicking OK. (Note: When you use the
up arrow,
CDF.NORMAL(q,mean,stddev) becomes
CDF.NORMAL(?,?,?) in the
Numeric Expression box.) The value of prob that you
obtain should be .0228.