Question: how to calculate z value from p value?
Answer: For right-tail event, p-value is the probability of obtaining a result equal to or greater than observed x. In this case, p-value is the value of one minus cumulative distribution function of x, as shown on picture below. To find out z-score, we just need to get inverse of CDF of one minus p-value.