**Let us look at examples for calculating p-values for a given set of information and the type of the test.**

Example 1: Sample mean $\bar{x}$ = 25, $\alpha$ = 0.5 Sample standard deviation s = 2 no of observations in the sample = 36.

Calculate the p values for right tailed test with null hypothesis H$_{0}$ : $\mu$ $\leq$ 24. Explain at what level significance $\alpha$, the null hypothesis will be rejected.

**Solution :**

Z test value is calculated using the formula:

Z = $\frac{\bar{x}-\mu }{\frac{s}{\sqrt{n}}}$

= $\frac{25-24}{\frac{2}{\sqrt{36}}}$

= $\frac{1}{\frac{1}{3}}$

= 3

p-value corresponding to z = 3 is the area to the right of z = 3.

p-value for the test = 0.5 - 0.4987 = 0.0013

You may note the p-value found is less than the $\alpha$ levels, 0.1, 0.05 0.01 and 0.005.

Hence the null hypothesis is rejected for all these significance levels.

** Example 2: **Sample mean $\bar{x}$ = 15, $\mu$ = 16, $\sigma$$^{2}$ = 16 and n = 16.

Calculate the p value for the left tailed test with null hypothesis $H_{0}$ : $\mu$ $\geq$ 16 . Explain at what $\alpha$ level the null hypothesis will be rejected.

Z test value is calculated using formula:

Z = $\frac{\bar{x}-\mu }{\frac{\sigma }{\sqrt{n}}}$

= $\frac{15-16}{\frac{4}{4}}$

= -1

p-value corresponding to z = -1, is the area to the left of z = -1.

p-value for the test = 0.5 - 0.3413 = 0.1587

The p-value found is greater than all $\alpha$ levels less than 0.1

Hence the null hypothesis is not rejected for any of the common $\alpha$ levels chosen.