You are on page 1of 8

Other sites:

Search this site:

Search

Search

Education

Statistics TOC

Testimonials

Donate

Help

Hypothesis P-value
Contents:
When to use it? Formula How to calculate? Caution - common mistakes? Examples See Also

When to use it?


Knowledge of the "Hypothesis Tests Means" topic about the basic theory of hypothesis testing is required before attempting this topic. P-value is another method of testing a hypothesis. It is faster because there is one calculation instead of two. P-value shows the probability your sample test statistic supports the null hypothesis as true. The smaller the p-value, the less support for the null hypothesis and so the higher the probability support for the alternative hypothesis. For example, a p-value of .55 indicates high support for the null hypothesis so you cannot reject the null. A p-value of .001 indicates a low probability the null hypothesis is true, so support rejecting the null hypothesis. The practical approach is to calculate the p-value and compare it with the level of significance (alpha). If the p-value is smaller than alpha, you can reject the null hypothesis. For example, if your p-value is .0001, and your alpha is set to .05, you have strong evidence to reject the null hypothesis because the p-value is much smaller than alpha. The smaller the p-value in relation to alpha, the more the evidence for rejecting the null hypothesis. Comparing whether the p-value is smaller than alpha is the proper method, but some books provide a general guideline for the amount of evidence for rejecting the null hypothesis based on the p-value. P-value .1 No statistically significant evidence for rejecting the null hypothesis.

P-value < .1 but > .05 P-value < .05 but > .01 P-value < .01

Weak evidence for rejecting the null hypothesis. Strong evidence for rejecting the null hypothesis. Overwhelming evidence to reject the null hypothesis.

Formula
Test Statistic formulae for hypothesis tests for means for large samples: Standard error:

z Score:

The above formulae are fine if you happen to know the population standard deviation, . However, most of the time you will not know it. You can use the sample standard deviation, s, instead. Z Score using s:

Where: is population standard deviation. s is sample standard deviation. n is the sample size. x is sample mean. is population mean. p-value formulae: Excel: 2-tail: p =NORMDIST(sample mean, population mean, standard deviation/SQRT(n),1) 2 1-tail, less than: p =NORMDIST(sample mean, population mean, standard deviation/SQRT(n),1) 1-tail, more than: p =1-NORMDIST(sample mean, population mean, standard deviation/SQRT(n),1) Note that we refer to an alternate hypothesis as "less than" if sample means is less than population means and "more-than" if sample means is more than population

means. Manual: 2-tail: Look up the probability of the Test Statistic z value in the table "Areas Under the One-Tailed Standard Normal Curve" and subtract from .5. Double the value because there are 2 tails. 1-tail: Look up the probability of the Test Statistic z value in the table "Areas Under the One-Tailed Standard Normal Curve" and subtract from .5.

How to calculate?
You can solve p-value problems very quickly using the Excel =NORMDIST function, explained in the Normal Distribution topic. Using the p-value approach, we do not have to calculate a z value for the Decision Rule. We calculate the p-value and compare it with the alpha value. For example: In an experiment, test a hypothesis to show if your sample mean is less than a population mean of 231 and use a 5% level of significance. Your sample of 102 has a mean of 224.07 and standard deviation of 80.85. Do you reject the null hypothesis given your p-value calculation? State evidence. Step 1, State Hypotheses H0 and H1: H0: Sample Mean 224.07 Population Mean 231 H1: Sample Mean 224.07 < Population Mean 231 Step 2, Calculate Test Statistic: Standard error: 80.85 / 10.0995 = 8.0053 z Score: 231) / 8.0053 = -0.86568 Step 3, Prepare Decision Rule: You were given level of significance of 5% which is the same as alpha of 5% (or .05). Decision Rule: Reject the null hypothesis if pvalue is less than the given alpha value .05. H1 is sample mean less-than the population mean, so this is a one-tail test. Excel 1-tail: z = NORMDIST(sample mean, population mean, standard deviation/SQRT(n),1) = = (224.07 = 80.85 / 102 =

Step 4, Calculate p-value:

NORMDIST(224.07,231,80.85/SQRT(102),1) = 0.1933 Manual 1-tail: - Table lookup in a separate window : Areas Under the One-Tailed Standard Normal Curve. Find the probability (pvalue) for test statistic z value -0.866. The closest probabilities are 0.3051 at z = .86 and .3078 at z = .87, so z = .866 would be about halfway between .3051 and .3078, approximately 0.3065. The p-value for a 1-tail test where sample mean is less than population mean, is the area to the left of z = -.866. But for .866 the normal table gives us the probability between .866 and the mean, so we must subtract from .5 to get: P-value = .5 - 0.3065 = .1935. There is a small difference between .1935 and the Excel calculation .1933 because the standard z table has only 2 decimals so we have to approximate the value of z. Excel is more precise. In the diagrams to the left, the top diagram shows critical z which was calculated using the Hypothesis Means method, and a pink reject region, = .05. The diagram below shows the larger .19 p-value area. You can see that part of the p-value area is outside the reject region. Step 5, Decide whether to reject H0: Do not reject the null hypothesis because pvalue of .19 is larger than alpha of .05. There is no statistically significant evidence to reject the null hypothesis because p-value of .19 is more than .10 (see table at beginning of topic).

In your experiment, test a hypothesis to show if the sample mean is less than a population mean of 170 using a 0.1 alpha. Your sample of 136 had a mean of 161.5 and standard deviation of 30.6. Do you reject the null hypothesis using a p-value calculation? State evidence. Step 1, State Hypotheses H0 and H1 H0: Sample Mean 161.5 >= Population Mean 170 H1: Sample Mean 161.5 < Population Mean 170: Standard error: = 30.6 / 136 =

Step 2, Calculate Test Statistic:

30.6 / 11.6619 = 2.6239 z Score: / 2.6239 = -3.239 Step 3, Prepare Decision Rule: Step 3, Calculate p-value: Reject the null hypothesis if the p-value is less than the given alpha value 0.1. Alternative hypothesis, H1, is sample mean less-than the population mean, so this is a onetail test. Excel 1-tail: z = NORMDIST(sample mean, population mean, standard deviation/SQRT(n),1) =NORMDIST(161.5,170,30.6/SQRT(136),1) = .000599. Manual 1-tail: - Table lookup in a separate window : Areas Under the OneTailed Standard Normal Curve. Find the probability for z value . Find the probability (p-value) for test statistic z value -3.239. In the table z value 3.24 has probability 0.4994. The p-value for a 1-tail test where sample mean is less than population mean, is the area to the left of z = -3.24. But for 3.24 the normal table gives us the probability between 3.24 and the mean, so we must subtract from .5 to get: P-value = .5 0.4994 = .0006. Reject the null hypothesis because p-value .0006 (is less than alpha .1. There is overwhelming evidence to reject the null hypothesis since the p-value .0006 is less than .01 (see chart at the beginning of this topic). = (161.5 - 170)

Step 5, Decide whether to reject H0:

Caution - common mistakes?


Remember as p-values become smaller, the evidence for rejecting the null hypothesis increases.

Examples
A. In your experiment, test a hypothesis to show if the sample mean is more than a population mean of 275 using a 1% alpha. Your sample of 60 had a mean of 288.75 and standard deviation of 30.25. Do you reject the null hypothesis using a p-value calculation? Format answers to 2 decimal places and state evidence.

Step 1, State Hypotheses H0 and H1: H0: Sample Mean 288.75 Population Mean 275 H1: Sample Mean 288.75 > Population Mean 275 Step 2, Calculate Test Statistic: Standard error: = 30.25 /

60 = 30.25 / 7.745967 = 3.90526 z Score: 275) / 3.90526 = 3.5209 Step 3, Prepare Decision Rule: Step 4, Calculate p-value: Reject the null hypothesis as long as the pvalue is less than the given alpha value .01. H1 is sample mean more-than the population mean; therefore, this is a one-tail test. Excel 1-tail: =NORMDIST(sample mean, population mean, standard deviation/SQRT(n),1) =1NORMDIST(288.75,275,30.25/SQRT(60),1) = 0.000215047. Manual 1-tail: - Table lookup in a separate window : Areas Under the One-Tailed Standard Normal Curve. Find the probability for z value . The p-value for a 1-tail more-than question, would be to the right of z = 3.5209 Look up z = 3.52 in the table; probability is 0.4998. We want the area to the right of 3.52 but the z table has the area between 3.52 and the mean, so we must subtract from .5. P-value = .5 - 0.4998 = .0002. There is a small discrepancy with the Excel calculation because our standard z table is not as precise because uses only 2 decimals. Rounded to 2 decimals, Excel and the manual method show a p-value of 0.00. Reject the null hypothesis because p-value of 0.00 is smaller than the alpha of .01. = (288.75 -

Step 5, Decide whether to reject H0:

There is overwhelming evidence to reject the null hypothesis since the p-value is less than .01 (see table at beginnig of this topic). B. In your experiment, test a hypothesis to show if the sample mean is not equal to a population mean of 231 using a 1% level of significance. Your sample of 74 had a mean of 219.45 and standard deviation of 43.89. Do you reject the null hypothesis using a p-value calculation? Format using 2 decimal places and state evidence. Step 1, State Hypotheses H0 and H1: H0: Sample Mean 219.45 = Population Mean 231 H1: Sample Mean 219.45 Population Mean 231 Step 2, Calculate Test Statistic: Standard error: = 43.89 /

74 = 43.89 / 8.602325 = 5.1021 z Score: 231) / 5.1021 = -2.26377 Step 3, Prepare Decision Rule: Reject the null hypothesis if the p-value is less than the given alpha (level of significance) value .01. We were asked if the sample mean was not equal to the population mean; therefore, this is a two-tail test. Excel 2-tail: z = NORMDIST(sample mean, population mean, standard deviation/SQRT(n),1) 2 =NORMDIST(219.45,231,43.89/SQRT(74),1) 2 = 0.011794 2 = 0.023588. Manual 2-tail: - Table lookup in a separate window : Areas Under the One-Tailed Standard Normal Curve. Look up the probability for z = 2.26 in the table. Probability is 0.4881. The z table is has the area between 2.26 and the mean, so we must subtract from .5. P-value = .5 - 0.4881 = 0.0119. It's a two tail test, so we double the p-value to 0.0238. There is a small = (219.45 -

Step 4, Calculate p-value:

discrepancy between the Excel p-value 0.023588 and 0.0238 because our standard z table has only 2 decimals and therefore is not as precise as Excel. Rounded to 2 decimals, Excel and the manual method show a p-value of 0.02. Step 5, Decide whether to reject H0: There is strong evidence to reject the null hypothesis since the p-value .02 is less than .05 but not overwhelming evidence because p-value of .02 is larger than .01 (see chart in the beginning of this topic). However, p-value of 0.02 is larger than the alpha of .01; therefore, we cannot reject the null hypothesis despite the strong evidence. Do not reject the null hypothesis.

See Also
Mean, Standard Deviation, Z score, Probability, Normal distribution, Probability to Z, Z to probability, Hypothesis of Means

Return to Statistics Table of Contents


GrowingKnowing.com 2010. All rights reserved. Last updated: June 8, 2011

You might also like