





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






Chapter 8
Key Ideas Hypothesis (Null and Alternative), Hypothesis Test, Test Statistic, P-value Type I Error, Type II Error, Significance Level, Power
Section 8-1: Overview Confidence Intervals (Chapter 7) are great for estimating the value of a parameter, but in some situations estimation is not the goal. For example, suppose that researchers somehow know that the average number of fast food meals eaten per week by families in the 1990s was 3.5. Furthermore, they are interested in seeing if families today eat more fast food than in the 1990s. In this case, researchers donāt need to estimate how much fast food families eat today. All they need to know is whether that average is larger than 3.5. For the purposes of this example, let μ denote the average number of fast food meals eaten per week by families today. The researchersā question could then be formulated as follows:
Is the average number of meals eaten today the same as in the 1990s (μ = 3.5) or is it more (μ > 3.5)?
There are two different possibilities, and the correct answer is impossible to know, since μ is unknown. However, the researchers could observe the sample mean and determine which possibility is the most likely. This process is called hypothesis testing.
Definition Hypothesis ā A claim or statement about a property of the population (e.g. āμ = 3.5ā from above) Hypothesis Test ā A standard procedure for testing a claim about a property of the population.
To guide this discussion of hypothesis testing, remember the āRare Event Ruleā: If, under a given assumption, the probability of a particular observed event is exceptionally small, we conclude that the assumption is probably not correct.
Example Your friend claims to have a fair coin, and you want to test this claim. If p = P(Head), then we are testing the claim that p = 0.5. Suppose you flip the coin 100 times.
a. If you get 54 heads and 46 tails, would you conclude p = 0.5?
Here, you probably would. We should expect around 50 heads and 50 tails, and this is not far off from the mark. This is the kind of outcome one would expect from a fair coin.
b. If you get 89 heads and 11 tails, would you conclude p = 0.5?
You probably would not say p = 0.5 in this case. Why does the coin seem unfair? If it really was fair, then this kind of outcome (while possible) would have a very low chance of occurring. It is much more likely that the coin is actually unfair. This is the rare event rule mentioned above. Here, the āgiven assumptionā is that the coin is fair. Since the probability of 89 heads and 11 tails on a fair coin is āexceptionally smallā, we conclude that the given assumption (fair coin) is probably not correct.
c. What would you say if you got 40 heads and 60 tails? 65 heads and 35 tails?
This is getting into a kind of gray area where it is hard to decide whether a fair coin would have a good chance of getting these outcomes. When observations are on the borderline like this, it is harder to choose between the two possible scenarios. Making these decisions is where hypothesis testing comes into play.
Section 8-2: Basics of Hypothesis Testing Definitions Null Hypothesis ā The null hypothesis, denoted H 0 , is a statement that the value of a population parameter (e.g. population mean, proportion, or standard deviation) is equal to a particular value. For the purposes of the test, we assume that the null hypothesis is true, and then decide whether there is enough evidence to reject that assumption. For example, here are some null hypotheses:
H 0 : μ = 3.5 H 0 : p = 0.5 H 0 : Ļ = 12 (first example) (second example)
Alternative Hypothesis ā The alternative hypothesis, denoted H 1 , is a statement that the parameter has some value that is different than the one in the null hypothesis. These statements are all inequalities and come in 3 forms: >, <, and ā .
Here are some examples of alternative hypotheses:
H 0 : μ > 3.5 H 0 : p ā 0.5 H 0 : Ļ < 12 (first example) (second example)
Test Statistic ā The test statistic is a value that is used to decide whether to reject the null hypothesis. It is a quantity based on the sample data and has a known distribution when the null hypothesis is true. This process will be discussed in more detail soon.
The General Idea of a Hypothesis Test To run a hypothesis test, there are a few general steps, which will be elaborated on later.
Example: In the fast food example from the start of this chapter, researchers want to test whether the average number of fast food meals eaten per week by modern families is larger than it was in the 1990s, when it was 3.5. Suppose that they know the population standard deviation is Ļ = 0.6, the sample size is 100, and the sample mean was x = 3. 7.
H 0 : μ = 3. H 1 : μ > 3.
Recall:
n
x x Z x
x Ļ
μ Ļ
= has a known distribution.
This distribution is the standard normal distribution.
n
x Z Ļ
μ
Determining Which Values are āUnlikelyā In the previous example, we know that 3.333 was an unlikely value for the standard normal distribution. However, the definition of āunlikelyā is subjective, and it is important to find a way to make a clear cut-off for ātoo unlikelyā versus ālikely enoughā. To do this, we introduce some new terminology:
Definitions Critical Region ā The set of all values of the test statistic that lead to rejection of the null hypothesis (i.e. the area where values would be considered too extreme). Significance Level ā The probability that the test statistic will fall in the critical region when H 0 is actually true. In other words, this is the chance that we would mistakenly reject H 0 even though it is actually true. This probability is denoted α, and it is typically a small value, like α = 0.05 or α = 0.01. Critical Value ā The cut-off value between the critical region and the range of acceptable values.
Types of Error There are two different ways that the hypothesis test could give the wrong conclusion.
Reality
H 0 True H 0 False
Test Decision
Do not reject H 0
Correct Answer
Type II Error (β)
Reject H 0
Type I Error (α)
Correct Answer
In testing situations, α is chosen (most scientists select α = 0.05 or α = 0.01). β cannot be selected, but there are techniques to reduce it:
Remark: The quantity 1 ā β is the probability of rejecting H 0 when it is actually false (see table above). It has a special name, which is the power of a test. Power is something we will not worry about in this class, but to increase it, one can use the techniques above (reducing β is the same as increasing power). See p.400 ā 403 for more information.
Section 8-3: Testing a Claim About a Proportion In order to test a claim about a proportion, the hypothesis test requires that a few conditions be met. These conditions satisfy some of the theoretical assumptions made in using this test. In particular, testing claims about a proportion requires that the Central Limit Theorem be used in order to approximate a Binomial distribution with a Normal distribution (we did not cover that section).
Conditions
(Condition 2 makes sure it is binomial, and Condition 3 is for the approximation with a normal distribution)
Notation n = sample size p = the true population proportion of successes q = 1 ā p p Ė = the sample proportion of successes
Using the Hypothesis Test for a Proportion To run the hypothesis test, we use the following test statistic (notice that the components of it are similar to the ones used in the confidence intervals in the previous chapter):
Test Statistic: p Ė p Z pq n
= Critical Values and P-Values come from the Standard Normal Distribution
(Here, p is the value used in the null hypothesis)
To test a hypothesis about the population proportion, follow these steps:
Solution From the information given, we see that:
n = 64, α = 0.05, p = 0.08, q = 1 ā 0.08 = 0.92, p Ė^ =^964 = 0. 140625
H 0 : p = 0. H 1 : p > 0.
Test Statistic: 1. 788
n
pq
p p Z
P-Value Method
Example The newspaper claims that 50% of Americans own a pet, but Fred thinks that it is different than that. To test this claim, he takes a simple random sample of 100 Americans and finds that 57 of them own pets. Test his claim with significance level α = 0.05.
Solution From the information given, we see that:
n = 100, α = 0.05, p = 0.50, q = 1 ā 0.50 = 0.50, p Ė^ =^57100 = 0. 57
H 0 : p = 0. H 1 : p ā 0.
Test Statistic: 1. 40
n
pq
p p Z
P-Value Method
P-Value Method
Solution From the information given, we see that: n = 500, α = 0.05, μ = 0.1, Ļ = 0.01, x = 0. 999
H 0 : μ = 0. H 1 : μ < 0.
Test Statistic: 2. 236
n
x Z Ļ
μ
P-Value Method
Section 8-5: Testing a Claim About a Mean: Ļ Unknown When Ļ is unknown, we must rely on a different technique for the hypothesis test. However, the Central Limit Theorem is still used, and these conditions verify that the theoretical assumptions are met.
Conditions
(Condition 3 is for the CLT)
Notation n = sample size μ = the true population mean x = the sample mean s = the sample standard deviation df = n ā 1 = degrees of freedom
Using the Hypothesis Test for a Mean To run the hypothesis test, we use the following test statistic (notice that the components of it are similar to the ones used in the confidence intervals in the previous chapter):
Test Statistic:
n
s
x t ā μ = Critical Values and P-Values come from the Student-t Distribution with n ā 1 degrees of freedom
(Here, μ is the value used in the null hypothesis)
To test a hypothesis about the population mean, follow these steps:
Example A power company wants to see if the average amount of current passing through a series of connections is larger than 30 milliamperes (mA). They randomly select 35 of the connections and find a sample average current of 32 mA, with a sample standard deviation of 5 mA. Run a hypothesis test with α = 0.05 to see if the population average current is more than 30 mA.
Solution From the information given, we see that: n = 35, α = 0.05, μ = 30, x = 32 , s = 5, df = n ā 1 = 34
H 0 : μ = 30 H 1 : μ > 30
Test Statistic: 2. 366
n
s
x t μ
P-Value Method
Example 10 years ago, the census bureau estimated the average number of U.S. citizens residing in rural counties to be 75,000. Now, they wish to see if the average has changed. They take a sample of 31 counties across the U.S. From the counties sampled, the average number of residents was 77,000, with a standard deviation of 5700. Using a significance level of α = 0.05, run a test to see if the average has changed over the past decade.
Solution From the information given, we see that: n = 31, α = 0.05, μ = 75,000, x = 77 , 000 , s = 5700, df = n ā 1 = 30
H 0 : μ = 75, H 1 : μ ā 75,
Test Statistic: 1. 954
n
s
x t
μ