















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!
















www.ck12.org Chapter 12. Hypothesis Testing
12.1. Hypothesis Testing www.ck12.org
12.1 (^) Hypothesis Testing
Learning Objectives
Introduction
In everyday life, we often have to make decisions based on incomplete information. These may be decisions that are important to us such as, "Will I improve my biology grades if I spend more time studying vocabulary?" or "Should I become a chemistry major to increase my chances of getting into med school?" This section is about the use of hypothesis testing to help us with these decisions. Hypothesis testing is a kind of statistical inference that involves asking a question, collecting data, and then examining what the data tells us about how to procede.
In a formal hypothesis test, hypotheses are always statements about the population. The hypothesis tests we will examine in this chapter involve statements about the average values (means) of some variable in the population. For example, we may want to know if the average time that college freshmen spend studying each week is really 20 hours per week. We may want to compare this average time spent studying for freshmen that earned a GPA of 3. or higher and those that did not. In later chapters, we will be able to test if the average time studying differs for four groups: freshmen, sophomores, juniors and seniors.
Developing Null and Alternative Hypotheses
In statistical hypothesis testing, there are always two hypotheses. The hypothesis to be tested is called the null hypothesis and given the symbol H 0. The null hypothesis states that there is no difference between a hypothesized population mean and a sample mean. It is the status quo hypothesis.
For example, if we were to test the hypothesis that college freshmen study 20 hours per week, we would express our null hypothesis as:
H 0 : μ = 20
We test the null hypothesis against an alternative hypothesis, which is given the symbol Ha. The alternative hypothesis is often the hypothesis that you believe yourself! It includes the outcomes not covered by the null hypothesis. In this example, our alternative hypothesis would express that freshmen do not study 20 hours per week:
Ha : μ 6 = 20
We have a medicine that is being manufactured and each pill is supposed to have 14 milligrams of the active ingredient. What are our null and alternative hypotheses?
12.1. Hypothesis Testing www.ck12.org
A hypothesis test can be one-tailed or two-tailed. The examples above are all two-tailed hypothesis tests. We indicate that the average study time is either 20 hours per week, or it is not. Computer use averages 3.2 hours per week, or it does not. We do not specify whether we believe the true mean to be higher or lower than the hypothesized mean. We just believe it must be different.
In a two-tailed test, you will reject the null hypothesis if your sample mean falls in either tail of the distribution. For this reason, the alpha level (let’s assume .05) is split across the two tails. The curve below shows the critical regions for a two-tailed test. These are the regions under the normal curve that, together, sum to a probability of 0.05. Each tail has a probability of 0.025. The z-scores that designate the start of the critical region are called the critical values .
If the sample mean taken from the population falls within these critical regions, or "rejection regions," we would conclude that there was too much of a difference and we would reject the null hypothesis. However, if the mean from the sample falls in the middle of the distribution (in between the critical regions) we would fail to reject the null hypothesis.
We would use a single-tail hypothesis test when the direction of the results is anticipated or we are only interested in one direction of the results. For example, a single-tail hypothesis test may be used when evaluating whether or not to adopt a new textbook. We would only decide to adopt the textbook if it improved student achievement relative to the old textbook.
When performing a single-tail hypothesis test, our alternative hypothesis looks a bit different. We use the symbols of greater than or less than. For example, let’s say we were claiming that the average SAT score of graduating seniors was GREATER than 1,110. Remember, our own personal hypothesis is the alternative hypothesis. Then our null and alternative hypothesis could look something like:
H 0 : μ ≤ 1100 Ha : μ > 1100
In this scenario, our null hypothesis states that the mean SAT scores would be less than or equal to 1,100 while the alternate hypothesis states that the SAT scores would be greater than 1,100. A single-tail hypothesis test also means
www.ck12.org Chapter 12. Hypothesis Testing
that we have only one critical region because we put the entire critical region into just one side of the distribution. When the alternative hypothesis is that the sample mean is greater, the critical region is on the right side of the distribution (see below). When the alternative hypothesis is that the sample is smaller, the critical region is on the left side of the distribution.
To calculate the critical regions, we must first find the critical values or the cut-offs where the critical regions start. This will be covered in the next section.
Type I and Type II Errors
Remember that there will be some sample means that are extremes – that is going to happen about 5% of the time, since 95% of all sample means fall within about two standard deviations of the mean. What happens if we run a hypothesis test and we get an extreme sample mean? It won’t look like our hypothesized mean, even if it comes from that distribution. We would be likely to reject the null hypothesis. But we would be wrong.
When we decide to reject or not reject the null hypothesis, we have four possible scenarios:
a. A true hypothesis is rejected. b. A true hypothesis is not rejected. c. A false hypothesis is not rejected. d. A false hypothesis is rejected.
If a hypothesis is true and we do not reject it (Option 2) or if a false hypothesis is rejected (Option 4), we have made the correct decision. But if we reject a true hypothesis (Option 1) or a false hypothesis is not rejected (Option 3) we have made an error. Overall, one type of error is not necessarily more serious than the other. Which type is more serious depends on the specific research situation, but ideally both types of errors should be minimized during the analysis.
www.ck12.org Chapter 12. Hypothesis Testing
hypotheses?
TABLE 12.2:
Decision Made Null Hypothesis is True Null Hypothesis is False Reject Null Hypothesis (1) ___ Correct Decision Do not Reject Null Hypothesis Correct Decision (2) ___
Review Answers
12.2. Critical Values www.ck12.org
12.2 (^) Critical Values
Learning Objective
Critical Values
Critical values are the values that indicate the edge of the critical region. Critical regions describe the entire area of values that indicate you reject the null hypothesis. In other words, the critical region is the area encompassed by the values not included in the initial claim - the area of the ’tails’ of the distribution.
The “tails” of a test are the values outside of the critical values. In other words, the tails are the ends of the distribution, and they begin at the greatest or least value included in the alternative hypothesis (the critical values).
In the graph below, the tails are in red and the rest of the distribution is in green. The critical values of the test in the image are -8 and 28, as these are the dividers between values supporting the alternative and null hypothesis. The area in red can also be seen as the rejection region, since an observed value in this region indicates that the null hypothesis should be rejected.
There are three types of test from a “tails” standpoint:
12.2. Critical Values www.ck12.org
Locating a Critical Value
In this lesson, we will use a table to find critical values. For the moment, we will be dealing only with the Z-score critical values of a normal distribution. (NOTE: The z-table is an appropriate resource for conducting tests when we know what the parameters are of our population. However, we will turn to a new table when we discuss how to conduct your typical hypothesis test with a sample.)
What is the critical value
Z α z
for a 95% confidence level, assuming a two-tailed test?
Solution
A 95% confidence level means that a total of 5% of the area under the curve is considered the critical region.
Since this is a two-tailed test, 12 of 5% = 2.5% of the values would be in the left tail, and the other 2.5% would be in the right tail. Looking up the Z-score associated with 0.025 on a reference table, we find 1.96. Therefore, +1.96 is the critical value of the right tail and -1.96 is the critical value of the left tail.
The critical value for a 95% confidence level is Z = +/− 1. 96.
Sketch the Z-score critical region for Example D.
Solution
Sketch the graph of the normal distribution with the given values and mark the critical values from Example D, then shade the area from the critical values away from the center. The shaded areas are the critical regions.
www.ck12.org Chapter 12. Hypothesis Testing
What would be the critical value for a right-tailed test with α = 0 .01?
Solution
If α = 0 .01, then the area under the curve representing H 1 , the alternative hypothesis, would be 99%, since α (alpha) is the same as the area of the rejection region. Using the Z-score reference table above, we find that the Z-score associated with 0.9900 is approximately 2.33.
It appears that the critical value is Z = 2. 33.
Let’s see if that answer makes sense. Since this is a right-tailed test, α is on the right end of the graph, and 1 − α is on the left. A Z-score of +2.33 is well to the right of the center of the graph, and describes the area under the curve from that point to the left, nearly the entire graph. Since the initial question specified α = 0 .01, indicating that only 1% of the area is in the critical region, Z = + 2 .33 is quite reasonable.
Vocabulary
Critical values are values separating the values that support or reject the null hypothesis. Critical regions are the areas under the distribution curve representing values that support the null hypothesis.
Guided Practice
Solutions
www.ck12.org Chapter 12. Hypothesis Testing
12.3. One-Sample T Test www.ck12.org
12.3 (^) One-Sample T Test
Learning Objectives
Steps of Hypothesis Testing
Recall that hypothesis testing is a form of statistical inference. Previously, we inferred about a population by calculating a confidence interval. We estimated the true mean of a population from a sample mean and created a confidence interval provided a margin of error for our estimate. In this chapter, we also use sample data to help us make decisions about what is true about a population.
When conducting a hypothesis test, we are asking ourselves whether the information in the sample is consistent, or inconsistent, with the null hypothesis about the population. We follow a series of four basic steps:
If we reject the null hypothesis we are saying that the difference between the observed sample mean and the hypothesized population mean is too great to be attributed to chance. When we fail to reject the null hypothesis, we are saying that the difference between the observed sample mean and the hypothesized population mean is probable if the null hypothesis is true. Essentially, we are willing to attribute this difference to sampling error.
Conducting a Hypothesis Test on One Sample Mean When the Population Parameters are Known
Although this is rarely the case, we can use our familiar z-statistic to conduct a hypothesis test on a single sample mean. In short, we find the z-statistic of our sample mean in the sampling distribution and determine if that z-score falls within the critical (rejection) region or not. This test is only appropriate when you know the true mean and standard deviation of the population.
The school nurse thinks the average height of 7th graders has increased. The average height of a 7th grader five years ago was 145 cm with a standard deviation of 20 cm. She takes a random sample of 200 students and finds that the average height of her sample is 147 cm. Are 7th graders now taller than they were before? Conduct a single-tailed hypothesis test using a .05 significance level to evaluate the null and alternative hypotheses.
First, we develop our null and alternative hypotheses:
12.3. One-Sample T Test www.ck12.org
Let’s use the example about the pea farmer. As we mentioned, the farmer is wondering if the number of pea pods per plant has gone up with his new planting technique and finds that out of a sample of 144 peas there is an average number of 147 pods per plant (compared to a previous average of 145 pods). To determine the p− value we ask what is P(z >. 24 )? That is, what is the probability of obtaining a z value greater than .24 is the null hypothesis is true? Using technology, we find this probability to be .49. This indicates that there is a 49% chance that under the null hypothesis the peas will produce more than 145 pods. Alternatively, we can just indicate that p >.05. Since we set alpha at .05, we won’t reject if the probability of observing that sample mean is >.05.
When you use technology to conduct a hypothesis test, as in lab, you will receive a p-value as part of your output. The p-values is the likelihood of observing that particuluar sample value if the null hypothesis were true. Therefore, if the p-value is smaller than your significance level, you can reject the null hypothesis.
Hypothesis Tests When You Don’t Know Your Population Parameters
A z-test makes for an easy hypothesis test, but most of the time we can’t use it. The reality is that most of our analyses are done when we don’t know what is true about a population. We don’t know the true population mean, and we certainly don’t know the true population standard deviation. Instead, we want to conduct a hypothesis test using only our sample and the information it can provide us. How can we do this?
How We Learned to Test Hypotheses on Samples, without Knowledge of the Population
Back in the early 1900’s, a chemist at a brewery in Ireland discovered that when he was working with very small samples, the distributions of the mean differed significantly from the normal distribution. He noticed that as his sample sizes changed, the shape of the distribution changed as well. He published his results under the pseudonym ’Student’ and this concept and the distributions for small sample sizes are now known as “Student’s t−distributions.”
The Student’s t-distribution is similar to the normal distribution, except it is more spread out and wider in appear- ance, and has thicker tails. As the number of observations gets larger, the t-distribution shape becomes more and more like the shape of the normal distribution. In fact, if we had an infinite number of observations, the t distribution would perfectly match the normal distribution. It is the t-distribution that allows us to test hypotheses when we don’t know the true population standard deviation, as we’ll see below.
The differences between the t-distribution and the normal distribution are more exaggerated when there are fewer data points, and therefore fewer degrees of freedom. Degrees of freedom are essentially the number of samples that have the ’freedom’ to change without affecting the sample mean. A clear description of degrees of freedom is beyond the scope of this lesson, but you can find many online lessons describing them if you are interested. For our
www.ck12.org Chapter 12. Hypothesis Testing
purposes, all you really need to know about degrees of freedom is that there is always one less degree of freedom than the number of data points:
d f = n − 1
The reason you need to know how to find the number of degrees of freedom is quite simple: when you use a t- distribution for a hypothesis test, there is a different critical value for each number of degrees of freedom. The larger your sample, the closer the critical value gets to the z-score for your alpha level. Below is the t-table. It shows you the critical value for the selected alpha level (across the top) for the degrees of freedom of your test. If you were conducting a two-tailed hypothesis test on a sample of 25 students, your df = 24 and your critical value at α=0.05 is ±2.064 because there is 0.025 in each tail.
Conditions for Using T-Test
The t−distribution can be used with any statistic having a bell-shaped distribution. The Central Limit Theorem states the sampling distribution of a statistic will be close to normal with a large enough sample size. As a rough estimate, the Central Limit Theorem predicts a roughly normal distribution under any of the following conditions:
T Table
TABLE 12.3: Upper-Tail Probability
DF 0.25 0.20 0.15 0.10 0.05 0.025 0.01 0.005 0. 1 1.000 1.376 1.963 3.078 6.314 12.710 31.820 63.660 318. 2 0.816 1.061 1.386 1.886 2.920 4.303 6.965 9.925 22. 3 0.765 0.978 1.250 1.638 2.353 3.182 4.541 5.841 10. 4 0.741 0.941 1.190 1.533 2.132 2.776 3.747 4.604 7. 5 0.727 0.920 1.156 1.476 2.015 2.571 3.365 4.032 5. 6 0.718 0.906 1.134 1.440 1.943 2.447 3.143 3.707 5. 7 0.711 0.896 1.119 1.415 1.895 2.365 2.998 3.499 4. 8 0.706 0.889 1.108 1.397 1.860 2.306 2.896 3.355 4. 9 0.703 0.883 1.100 1.383 1.833 2.262 2.821 3.250 4. 10 0.700 0.879 1.093 1.372 1.812 2.228 2.764 3.169 4. 11 0.697 0.876 1.088 1.363 1.796 2.201 2.718 3.106 4. 12 0.695 0.873 1.083 1.356 1.782 2.179 2.681 3.055 3. 13 0.694 0.870 1.079 1.350 1.771 2.160 2.650 3.012 3. 14 0.692 0.868 1.076 1.345 1.761 2.145 2.624 2.977 3. 15 0.691 0.866 1.074 1.341 1.753 2.131 2.602 2.947 3. 16 0.690 0.865 1.071 1.337 1.746 2.120 2.583 2.921 3. 17 0.689 0.863 1.069 1.333 1.740 2.110 2.567 2.898 3. 18 0.688 0.862 1.067 1.330 1.734 2.101 2.552 2.878 3. 19 0.688 0.861 1.066 1.328 1.729 2.093 2.539 2.861 3. 20 0.687 0.860 1.064 1.325 1.725 2.086 2.528 2.845 3. 21 0.686 0.859 1.063 1.323 1.721 2.080 2.518 2.831 3.
www.ck12.org Chapter 12. Hypothesis Testing
The high school athletic director is asked if football players are doing as well academically as the other student athletes. We know from a previous study that the average GPA for the student athletes is 3.10. After an initiative to help improve the GPA of student athletes, the athletic director randomly samples 20 football players and finds that the average GPA of the sample is 3.18 with a sample standard deviation of 0.54. Is there a significant improvement? Use a 0.05 significance level.
H 0 : μ = 3. 10 Ha : μ 6 = 3. 10
We were told that we should use a 0.05 significance level. We assume that each football player is indepen- dently tested –that their GPA is not related to another football player’s GPA. Without the data, we have to assume that the sample is nearly normal (the sample is an indication of the population shape). The size of the sample also helps here, as we have 20 players. So, we can conclude that the assumptions for the single sample t-test have been met.
We use our t-test formula:
t = x¯ − μ 0 √^ s n
(^0) √. 54 20
We know that we have 20 observations, so our degrees of freedom for this test is 19. Nineteen degrees of freedom at the 0.05 significance level gives us a critical value of ± 2.093.
Since our calculated t-test value is lower than our t-critical value, we fail to reject the Null Hypothesis. Therefore, the average GPA of the sample of football players is not significantly different from the average GPA of student athletes. Therefore, we can conclude that the difference between the sample mean and the hypothesized value is not sufficient to attribute it to anything other than sampling error. Thus, the athletic director can conclude that the mean academic performance of football players does not differ from the mean performance of other student athletes.
Duracell manufactures batteries that the CEO claims will last an average of 300 hours under normal use. A researcher randomly selected 20 batteries from the production line and tested these batteries. The tested batteries had a mean life span of 270 hours with a standard deviation of 50 hours. Do we have enough evidence to suggest that the claim of an average lifetime of 300 hours is false?
12.3. One-Sample T Test www.ck12.org
H 0 : μ = 300 HA : μ 6 = 300
We’ll use the standard significance level of 0.05, and we assume a normal population distribution.
First, we need to calculate the Standard Error: SEx¯ = √s n SEx¯ = √^50 20
Now, we’ll use that value in out t-test formula: t = x¯SE−μx¯ = 27011 −. 18300 = − 2. 68 We know that we have 20 batteries, so our degrees of freedom for this test is (20-1)= 19. Nineteen degrees of freedom at the 0.05 significance level gives us a critical value of ± 2.093. What does this look like visually?
Since our calculated t-test value is outside of our t-critical value –it lies in the critical region –we reject the Null Hypothesis. The average battery life of the sample is significantly different from the average battery life claim by the CEO.