Hypothesis Testing: p-value

__Definition:__ A **p-value** is the probability that the test statistic would take a value *AS EXTREME OR MORE EXTREME* than that ACTUALLY OBSERVED when H_o, the null hypothesis, is true. If the p-value is samll, it gives evidence against H_o.

Consider the test for the pouplation mean μ of a normal population with known population variance.

__Case (i):__

Ho: μ=μ_o

Ha: μ>μ_o

p-value=P(Z>Z_stat) where Z~N(0,1)

Here I can understand the > here since the "as extreme or more extreme" is the direction away from H_o towards H_a.

__Case (ii):__

Ho: μ=μ_o

Ha: μ<μ_o

p-value=P(Z<Z_stat)

Here I can understand the < here since the "as extreme or more extreme" is the direction away from H_o towards H_a.

__Case (iii): __

Ho: μ = μ_o

Ha: μ ≠ μ_o

p-value = P(Z<-|Z_stat|) + P(Z>|Z_stat|) = 2 P(Z>|Z_stat|)

This part I don't understand. How does the "*as extreme or more extreme*" idea above translates into this formula for p-value?

So, for example, if the observed value of the test statistic for a two-tailed test is 1.65, then the direction away from H_o towards H_a should be to the right (I believe), so it looks like p-value = P(Z>1.65), but the above says that p-value = P(Z>1.65) + P(Z<-1.65). How come?

I think I am confused about the meaning of the sentence "a value AS EXTREME OR MORE EXTREME than that ACTUALLY OBSERVED". What does it actually mean?

Thanks for explaining!