Topic:Hypothesis Testing Using a p-Value

From SharedExperienceProject

Jump to: navigation, search

Contents

Topic Highlights

(What you will learn)

  • What a p-value is
  • How to compute a p-value
  • How to conduct a hypothesis test using a p-value

Introduction and Motivation

(Why learn it)

By now you should know a fair bit about hypothesis testing of the mean from the topics Two Tailed Hypothesis Testing and One Tailed and Small Sample Hypothesis Testing.

In this topic you will round out that knowledge by studying something called a p-value. You will see that the p-value is the largest significance value for which you would not reject your null hypothesis. After learning how to compute the p-value for a given test statistic, you will then see how to use it to test your hypothesis.

This applies for large and small samples, and for both the two- and one-tailed cases.

Learning Activities

(How the levels of understanding will be gained)

Learning activities for this topic
Type Name Direction
Lecture and discussion
Instructor-directed
In-class worksheet Self-directed
Reading Self-directed
Personal activities Self-directed

Learning Objectives

(Levels of understanding to be gained)

Learning objectives for this topic
Level of Understanding Objective(s)
Very best
Highly satisfactory
Satisfactory
Maybe just enough to pass
  • Do I understand what the p-value is, as described at the end of Example 1?

Topic Notes: What is a p-Value?

The p-Value Concept

The concept of a p-value is perhaps best introduced through an example.

Example 1

For a hypothesis of the following form:

H0: Image:Mu_for_poisson.png = Image:Mu_for_poisson.png0
Ha: Image:Mu_for_poisson.png > Image:Mu_for_poisson.png0

a) Would you reject H0 in the following case?

Image:Hypothesis_Testing_with_p-Values_1.png

b) Would you reject H0 in the following case?

Image:Hypothesis_Testing_with_p-Values_2.png

c) How large could the level of significance, Image:Alpha.png, be such that you would not reject H0?



Part c of Example 1 gives rise to the concept of the p-value:

The p-value is the largest value of Image:Alpha.png for which you would not reject H0.

In other words, it is the point at which the five-step hypothesis testing procedure leads us to switch from rejecting H0 to not rejecting it.

Computing p-Value

As you might imagine, the p-value is different for one and two-tailed cases.

The basic steps are:

  1. Determine the equation for p from the table below.
  2. Use either your z-distribution or t-distribution table to find the area


Case Alternative hypothesis, Ha
p-value
Sketch (shown for the standard normal distribution -
the same sketches apply for the t-distribution)
A. two-tailed Ha: Image:Mu_for_poisson.png Image:Not_equal_sign.png Image:Mu_for_poisson.png0

p = 2 x (area right or left of z*)

Image:Hypothesis_Testing_with_p-Values_4.png
B. one-tailed Ha: Image:Mu_for_poisson.png < Image:Mu_for_poisson.png0
p = area left of z* Image:Hypothesis_Testing_with_p-Values_5.png
B. one-tailed Ha: Image:Mu_for_poisson.png > Image:Mu_for_poisson.png0 p = area right of z* Image:Hypothesis_Testing_with_p-Values_6.png


For the t-distribution, the following equations for p-value apply for the above cases:

Case A: p = 2 x (area right or left of z*) = area outside of z*
Case B: p = area left side of z*
Case C: p = area right side of z*

Now try your hand at finding the p-value.

Example 2

You want to test the following hypothesis for the mean of a normally distributed population:

H0: Image:Mu_for_poisson.pngImage:Mu_for_poisson.png0 = 12.5
Ha: Image:Mu_for_poisson.png > 12.5

So, you take a sample of size n=51 to get the following sample mean and standard deviation:

Image:Xbar.png = 13.4
s = 4.1

a) Find z* (rounded to 2 decimal places)

b) Sketch the situation, showing the p-value

c) Find the p-value



Example 3

Now you want to test the following hypothesis:

H0: Image:Mu_for_poisson.png = 12.5
Ha: Image:Mu_for_poisson.png Image:Not_equal_sign.png 12.5

for the same situation, i.e. where z* = 1.57.

a) Sketch the situation

b) Find the p-value


Example 4

You want to test the a hypothesis of the following form for the mean (of a normally distributed random variable):

H0: Image:Mu_for_poisson.pngImage:Mu_for_poisson.png0
Ha: Image:Mu_for_poisson.png < Image:Mu_for_poisson.png0

You take a sample of size n=12 to get a sample mean and standard deviation from which you to compute the following test statistic:

t* = -2.98

a) Sketch the situation

b) In what range is the p-value?


Topic Notes: Hypothesis Testing with a p-Value

Once you've found the p-value, there are two ways it can be used to test the hypothesis.

Standard Test - Significance Level Known

If Image:Alpha.png is given, then the you can determine whether to reject by comparing the p-value to Image:Alpha.png:

Range of p-value

Reject?

p < Image:Alpha.png
reject H0
p > = Image:Alpha.png do not reject H0

Rule of Thumb - Significance Level Unknown

If Image:Alpha.png is not given, then the following rule of thumb applies:

Range of p-value

Reject?

p < 0.01
reject H0
p > 0.10 do not reject H0
otherwise inconclusive!


Note that it is okay to say that the test is inconclusive. This is the downside of not specifying a significance level.

Hypothesis Testing Steps

If you are asked to use the p-value to do a hypothesis test, the following steps apply. Only step 4 is different from what you've seen before:

1. Define the hypotheses
2. Sketch the situation
3. Compute the test statistic
4. Determine whether to reject
4a. Find the p-value as described above
4b. Use the Standard Test (above) if Image:Alpha.png is known, or use the Rule of Thumb (above) if Image:Alpha.png is not known
5. Give a conclusion

Practice Problems

Practice Problem 1

State the conclusion to testing the null hypothesis assuming each of the following situations:

a) p-value = 0.10 and significance level is 0.05

b) p-value = 0.02 and significance level is 0.05

c) p-value = 0.40 and significance level is 0.10

d) p-value = 0.001 and significance level is 0.01


Practice Problem 2

Find the p-values for the following situations, with calculated test statistics given by z*:

a) H0: Image:Mu_for_poisson.png = 50, Ha: Image:Mu_for_poisson.png Image:Not_equal_sign.png 50, z* = 2.53

b) H0: Image:Mu_for_poisson.png = 50, Ha: Image:Mu_for_poisson.png > 50, z* = 2.53

c) H0: Image:Mu_for_poisson.png = 10, Ha: Image:Mu_for_poisson.png Image:Not_equal_sign.png 10, z* = 1.87

d) H0: Image:Mu_for_poisson.png = 10, Ha: Image:Mu_for_poisson.png > 10, z* = 1.87


Practice Problem 3 (ES)

The time it takes a cupcake store to meet an order is normally distributed. Up until now, the population mean has been 10.2 minute and the population standard deviation has been 1.95 minutes. The owner made some changes overnight though, and claims that his new process is more efficient.

You decide to test the claim by taking a sample of 41 orders. You find that the mean is 9.4 minutes and the standard deviation is 2.4 minutes.

a) Use a significance level of 3% to test whether the changes made by the owner have made a significant improvement in the average time to fill an order

b) Calculate the p-value

c) Does a hypothesis test using the p-value lead you to the same conclusion as in a?

d) What would your conclusion have been if no level of significance had been given?


 

Personal tools