## p-value for Z-test

If the test statistic $Z$ has standard normal distribution and the observed value of the test statistic is $Z_{obs}$, then the $p$-value of the test for testing

a. left-tailed alternative is $p$-value = `$P(Z\leq Z_{obs})$`

.

b. right-tailed alternative is $p$-value = `$P(Z\geq Z_{obs})$`

.

c. two-tailed alternative is $p$-value = `$2P(Z\geq |Z_{obs}|)$`

.

## Formula

The $p$-value of Z-test for left tailed alternative is

### $p$-value = $P(Z\leq Z_{obs})$

The $p$-value of Z-test for right tailed alternative is

### $p$-value = $P(Z\geq Z_{obs})$

The $p$-value of Z-test for two tailed alternative is

### $p$-value = $2P(Z\geq |Z_{obs}|)$

where,

`$Z_{obs}$`

is the value of test statistic