### Stata Teaching Tools:  Calculating z-scores

Purpose:  The purpose of this program is to calculate z-scores for either sample (i.e., single) observations or for sample means.  In each case the formula is displayed.

Use of program:  To use this program, in the Stata command window type zcalc and then either (1) three numbers indicating x (i.e., the value of an observation), the mean and the standard deviation, or (2) four numbers, indicating the mean, mu, the standard deviation and n (i.e., the sample size).

Examples:  The following example shows how to use zcalc to calculate the z-score for a single observation.  In this example, x(observation) = 20, mean = 10 and standard deviation = 50.

The following example shows how to use zcalc to calculate the z-score for sample means.  In this example, the mean = 20, mu = 10, the standard deviation = 50 and n = 50.

The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California.