The book has the following text(about finding a trust zone).
For $H_0 : \pi = 0.20$, for instance, the score test statistic is $Z(s) = -2.50$, which has two-sided P-value $0.012 < 0.05$, so $0.20$ does not fall in the interval.
It is understood that the score test statistic is $-2.5$ using $n=25$ and $\hat\pi=0$ (in the previous description), but the part where the P-value is $0.012$ is not understood. Ask for help if you know how $0.012$ is calculated. Thank you.
The 2-sided P-value is double the probability below $-2.5$ under the standard normal density curve; that is,
$$P(|Z| > 2.5) = P(Z < -2.5)+P(Z > 2.5) = 2P(Z < -2.5) \\ = 2(0.0062) = 0.0124 < 0.05 = 5\%,$$
so the null hypothesis is rejected at the 5% level.
In R, where
pnormis a normal CDF:Or use printed standard normal CDF tables (usually limited to 4-place accuracy).
In the figure below, the P-value is the total of the areas (probabilities) in the two tails outside the vertical red lines.