Hello,

I am making a Java program that can run a full 1-sample z-test for sample mean and I would like to know how to calculate the p-value by hand once you have the z-statistic. I have learned how to calculate it by looking at the z-table and with a calculator, but for the sake of my program I would need to be able to understand how to calculate it manually or through some kind of formula.

EDIT:

I'm explicitly asking how to do what a z-table or calculator does when it gives you the p-value. It would be great if the process could be told as simply as possible, I am not the most advanced statistician.

Thanks!

-A possible stat major and freshman in college

I am making a Java program that can run a full 1-sample z-test for sample mean and I would like to know how to calculate the p-value by hand once you have the z-statistic. I have learned how to calculate it by looking at the z-table and with a calculator, but for the sake of my program I would need to be able to understand how to calculate it manually or through some kind of formula.

EDIT:

I'm explicitly asking how to do what a z-table or calculator does when it gives you the p-value. It would be great if the process could be told as simply as possible, I am not the most advanced statistician.

Thanks!

-A possible stat major and freshman in college

Last edited: