Input:
z value
Output:
One tail and two tail p-value.
Andrea Padoan (2021). Return a p-value from a given z (standardized distribution) (https://www.mathworks.com/matlabcentral/fileexchange/26541-return-a-p-value-from-a-given-z-standardized-distribution), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
Keep the name, but change the engine by using the more robust ERFC function:
p = 0.5 * erfc(-z ./ sqrt(2))
Do not print the results out on the screen as well, but just return them as an output argument.
Finally, re-design the help section (add H1 line, used by lookfor), a description of the inputs and outputs, an example and a see also line.