z2p

Converts z-statistic to p-value by integrating the standard normal pdf
431 Downloads
Updated 30 Sep 2010

View License

Converts normally distributed z-statistic to one- or two-tailed p-value
by integrating the standard normal pdf. If no "tails" value is specified, z2p computes the two-tailed value by default. The output p is the same size as z, which can be a scalar, vector, or matrix.

Inputs:
z: normally distributed z-statistic (positive or negative)
(optional) tailed: the number of tails over which to compute the probability value. (Note: by symmetry of the normal distribution, the two-tailed p-value is twice the one-tailed value.)

This function is useful for hypothesis testing when the test statistic is normally distributed.

Cite As

Scott McKinney (2024). z2p (https://www.mathworks.com/matlabcentral/fileexchange/28908-z2p), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0