Sei sulla pagina 1di 4

Technical Support Document

Interpreting and Calculating P-Values


Hypothesis Tests A hypothesis test is a statistical test that is used to determine if there is enough evidence in a sample(s) of data to infer that a certain condition is true for the entire population(s). A hypothesis test consists of two opposing hypotheses (a null hypothesis denoted by H0, and an alternative hypothesis denoted by Ha), a test statistic that follows an assumed distribution, and a rejection region. The alternative hypothesis is the hypothesis the researcher wishes to explore. The null hypothesis is a contradiction of the alternative hypothesis, it is the hypothesis to be tested. Two frequently used hypotheses are given below. Hypothesis to determine if a population mean, , is equal to some target value 0. H0: = 0 Ha: < 0 (a lower-tailed test) or, Ha: > 0 (an upper-tailed test) or, Ha: 0 (a two-tailed test). Hypothesis to determine if one population mean,1 is equal to another population mean, 2 . H0: 1 = 2 Ha: 1 < 2 or, Ha: 1 > 2 or, Ha: 1 2 P-values There are two common ways to determine whether there is enough evidence from the sample(s) to reject H0 or to fail to reject H0. First, you can compare the computed value of the test statistic with a value from the appropriate table at a pre-specified value of , where is the probability of rejecting H0 when H0 is true. Alternatively, you can compare the p-value with . The p-value is a probability that is calculated from the assumed cumulative distribution function (cdf) of the test statistic. Both methods will yield the same conclusions. p-value = probability of observing a value of the test statistic as extreme or more extreme than the observed test statistic calculated from the sample(s), given H0 is true. In other words, the p-value indicates how well the sample evidence supports the decision to reject H0. The smaller the p-value, the stronger the weight of evidence favoring the rejection of H0. Note: For a lower-tailed test, "a more extreme" test statistic is a smaller test statistic. For an upper-tailed test, "a more extreme" test statistic is a larger value of the test statistic. For a two-tailed test, "a more extreme" test statistic means that the absolute value of the test statistic is larger.

Knowledgebase ID 604: http://www.minitab.com/support/answers/answer.aspx?ID=604

Page 1

Technical Support Document

Interpreting and Calculating P-Values


A type I error for a statistical test is the error made by rejecting H0 when it is true. The probability of making a type I error is denoted by the symbol and is often called the significance level of the test. represents the highest probability of incorrectly rejecting H0 that you are comfortable in taking. You can then compare the p-value to to decide if you should reject H0. For any value of , if the p-value is less than , reject H0. For any value of , if the p-value is greater than , fail to reject H0. A value of 0.05 is often used for , that is, if the p-value is less than 0.05 reject H0. Calculating a p-value The p-value is calculated using the test statistic calculated from the sample(s), the assumed distribution, and the type of test being performed (lower-tailed test, upper-tailed test, or two-tailed test). For the two tests mentioned above, the p-value for: a lower-tailed test is given by p-value = P(TS < ts | H0 is true) = cdf(ts) an upper-tailed test is given by p-value = P(TS > ts | H0 is true) = 1 - cdf(ts) a two-sided test is given by p-value = 2 * P(TS > |ts| | H0 is true) = 2 * (1 - cdf(|ts|)) where: P: TS: ts: cdf(): Probability of a random variable taking on the range of values. Random variable associated with the assumed distribution. The test statistic calculated from your sample. Cumulative density function of the assumed distribution.

Minitab automatically displays p-values for most hypothesis tests. But you can also use Minitab to manually compute p-values.

Knowledgebase ID 604: http://www.minitab.com/support/answers/answer.aspx?ID=604

Page 2

Technical Support Document

Interpreting and Calculating P-Values


To manually compute a p-value in Minitab: 1. 2. 3. 4. 5. Choose Calc > Probability Distributions > [Choose the appropriate distribution] Choose Cumulative probability. Provide the parameters if necessary. Choose Input constant and enter [ts] Click OK.

The result is the probability of observing a random variable less than the test statistic, cdf(ts). For a lower-tailed test, the p-value is equal to this probability; p-value = cdf(ts). For an upper-tailed test, the p-value is equal to one minus this probability; p-value = 1 - cdf(ts) For an upper-tailed test, the p-value is equal to two times the p-value for the lower-tailed test if the test statistic is negative, and for the upper-tailed test if the test statistic is positive; p-value = 2 * (1 - cdf(|ts|))

Example 1: Lower-tailed p-value Suppose you perform a one-sample lower-tailed z test and the resulting test statistic is -1.785 (ts= -1.785). You want to calculate a p-value for the z-test. 1. 2. 3. 4. 5. Choose Calc > Probability Distributions > Normal. Choose Cumulative probability. If necessary, enter Mean: 0, and Standard deviation: 1. Choose Input constant and enter 1.785. Click OK.

This value is the probability of observing a random variable less than the test statistic, P(TS < -1.785) = 0.0371. Therefore the p-value = 0.0371

Example 2: Upper-tailed p-value Now suppose you perform a one-sample upper-tailed z test and the resulting test statistic is 1.785 (ts= 1.785). You want to calculate a p-value for the z test. 1. 2. 3. 4. 5. Choose Calc > Probability Distributions > Normal. Choose Cumulative probability. If necessary, enter Mean: 0, and Standard deviation: 1. Choose Input constant and enter 1.785. In Optional storage, enter K1. Click OK.

K1 contains the probability of observing a random variable less than your test statistic, P(TS < 1.785) = 0.9629. For an upper-tailed test, you need to subtract this probability from 1

Knowledgebase ID 604: http://www.minitab.com/support/answers/answer.aspx?ID=604

Page 3

Technical Support Document

Interpreting and Calculating P-Values


6. Choose Calc > Calculator. 7. In Store result in variable, enter K2. 8. In Expression, enter 1-K1. Click OK. 9. Choose Data > Display Data. 10. Choose K2. Click OK. This value is the probability of observing a random variable greater than the test statistic, P(TS > 1.785) = 0.0371. Therefore the p-value = 0.0371. Note: Since the Normal distribution is a symmetric distribution, you could enter 1.785 in step 4 and then you do not have to subtract the value from 1.

Example 3: Two-tailed p-value Finally, suppose you perform a one-sample two-tailed z test and the resulting test statistic is 1.785 (ts= 1.785). You want to calculate a p-value for the z test. 1. Since the test statistic is positive, follow steps 1-10 under Upper-tailed p-value. Note: When the test statistic is negative, follow steps 1-5 under Lower-tailed p-value, except modify step 5 so it says, In Optional storage, enter K2. Click OK. This value is the p-value for a one-tailed test. For a two-tailed test, you need to multiply by this value by 2. 2. 3. 4. 5. 6. Choose Calc > Calculator. In Store result in variable, enter K3. In Expression, enter 2*K2. Click OK. Choose Data > Display Data. Choose K3. Click OK.

This value is 2 times the probability of observing a random variable greater than the absolute value of the test statistic, 2* P(TS > |1.785|) = 2 * 0.0371 = 0.0742. Therefore the p-value = 0.0742. Note: Depending on the test or type of data, the calculations do change, but the p-value is generally interpreted the same way.

Knowledgebase ID 604: http://www.minitab.com/support/answers/answer.aspx?ID=604

Page 4

Potrebbero piacerti anche