0% found this document useful (0 votes)
263 views16 pages

One-Sample Hypothesis Testing Guide

This document provides an overview of hypothesis testing with one sample. It defines the key concepts of null and alternative hypotheses, types of errors (Type I and Type II), and outlines the process for hypothesis testing as evaluating sample data to determine if there is sufficient evidence to reject the null hypothesis. Specifically: 1. It explains how the null hypothesis represents the status quo and the alternative hypothesis contradicts the null. 2. Hypothesis testing involves setting the probability of a Type I error (rejecting a true null), collecting sample data, and determining if the data provides enough evidence to reject the null. 3. The four possible outcomes of a hypothesis test depend on whether the null is true/false and

Uploaded by

Alexa Lee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
263 views16 pages

One-Sample Hypothesis Testing Guide

This document provides an overview of hypothesis testing with one sample. It defines the key concepts of null and alternative hypotheses, types of errors (Type I and Type II), and outlines the process for hypothesis testing as evaluating sample data to determine if there is sufficient evidence to reject the null hypothesis. Specifically: 1. It explains how the null hypothesis represents the status quo and the alternative hypothesis contradicts the null. 2. Hypothesis testing involves setting the probability of a Type I error (rejecting a true null), collecting sample data, and determining if the data provides enough evidence to reject the null. 3. The four possible outcomes of a hypothesis test depend on whether the null is true/false and

Uploaded by

Alexa Lee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Module 9

Hypothesis Testing with One Sample


Learning objectives:
In this module, you will learn:
a. To define null and alternative hypotheses.
b. To solve problems involving hypothesis testing with One Sample.
Now we are down to the bread and butter work of the statistician: developing and testing hypotheses. It is important to put
this material in a broader context so that the method by which a hypothesis is formed is understood completely.
A statistician will make a decision about these claims. This process is called "hypothesis testing." A hypothesis test
involves collecting data from a sample and evaluating the data. Then, the statistician makes a decision as to whether or not
there is sufficient evidence, based upon analyses of the data, to reject the null hypothesis.

A. Null and Alternative Hypotheses


The actual test begins by considering two hypotheses. They are called the null hypothesis and the alternative
hypothesis. These hypotheses contain opposing viewpoints.

H 0: The null hypothesis: It is a statement of no difference between the variables–they are not related. This can often
be considered the status quo and as a result if you cannot accept the null it requires some action.

H a: The alternative hypothesis: It is a claim about the population that is contradictory to H0 and what we conclude
when we cannot accept H 0. This is usually what the researcher is trying to prove. The alternative hypothesis is the
contender and must win with significant evidence to overthrow the status quo. This concept is sometimes referred to
the tyranny of the status quo because as we will see later, to overthrow the null hypothesis takes usually 90 or greater
confidence that this is the proper decision.

Since the null and alternative hypotheses are contradictory, you must examine evidence to decide if you have enough
evidence to reject the null hypothesis or not. The evidence is in the form of sample data.

After you have determined which hypothesis the sample supports, you make a decision. There are two options for a
decision. They are "cannot accept H 0" if the sample information favors the alternative hypothesis or "do not reject
H 0" or "decline to reject H 0" if the sample information is insufficient to reject the null hypothesis. These conclusions
are all based upon a level of probability, a significance level that is set by the analyst.
The table below presents the various hypotheses in the relevant pairs. For example, if the null hypothesis is equal to
some value, the alternative has to be not equal to that value.
Example 1:
H0: No more than 30% of the registered voters in Santa Clara County voted in the primary election. p ≤ 30
Ha: More than 30% of the registered voters in Santa Clara County voted in the primary election. p > 30

Example 2:
We want to test whether the mean GPA of students in American colleges is different from 2.0 (out of 4.0). The null
and alternative hypotheses are:
H0: μ = 2.0
Ha: μ ≠ 2.0

Example 3:
We want to test if college students take less than five years to graduate from college, on the average. The null and
alternative hypotheses are:
H0: μ ≥ 5
Ha: μ < 5

B. Outcomes and the Type I and Type II Errors


When you perform a hypothesis test, there are four possible outcomes depending on the actual truth (or falseness) of
the null hypothesis H0 and the decision to reject or not. The outcomes are summarized in the following table:
The four possible outcomes in the table are:
1. The decision is cannot reject H0 when H0 is true (correct decision).
2. The decision is cannot accept H0 when H0 is true (incorrect decision known as a Type I error). This case
is described as "rejecting a good null". As we will see later, it is this type of error that we will guard against
by setting the probability of making such an error. The goal is to NOT take an action that is an error.
3. The decision is cannot reject H0 when, in fact, H0 is false (incorrect decision known as a Type II error).
This is called "accepting a false null". In this situation you have allowed the status quo to remain in force
when it should be overturned. As we will see, the null hypothesis has the advantage in competition with the
alternative.
4. The decision is cannot accept H0 when H0 is false (correct decision).

Each of the errors occurs with a particular probability. The Greek letters α and β represent the probabilities.

α = probability of a Type I error = P(Type I error) = probability of rejecting the null hypothesis when the null
hypothesis is true: rejecting a good null.

β ¿ probability of aType II error = P(Type II error) = probability of not rejecting the null hypothesis when the
null hypothesis is false. (1−β ) is called the Power of the Test.
α and β should be as small as possible because they are probabilities of errors.

Statistics allows us to set the probability that we are making a Type I error. The probability of making a Type I error
is α .

Example 1:
Suppose the null hypothesis, H0, is: Frank's rock climbing equipment is safe.
Type I error: Frank thinks that his rock climbing equipment may not be safe when, in fact, it really is safe.
Type II error: Frank thinks that his rock climbing equipment may be safe when, in fact, it is not safe.
α = probability that Frank thinks his rock climbing equipment may not be safe when, in fact, it really is safe.
β = probability that Frank thinks his rock climbing equipment may be safe when, in fact, it is not safe.
Notice that, in this case, the error with the greater consequence is the Type II error. (If Frank thinks his rock climbing
equipment is safe, he will go ahead and use it.)

This is a situation described as "accepting a false null".


Example 2:
Suppose the null hypothesis, H0, is: The victim of an automobile accident is alive when he arrives at the emergency
room of a hospital. This is the status quo and requires no action if it is true. If the null hypothesis cannot be accepted
then action is required and the hospital will begin appropriate procedures.
Type I error: The emergency crew thinks that the victim is dead when, in fact, the victim is alive. Type II error:
The emergency crew does not know if the victim is alive when, in fact, the victim is dead.
α = probability that the emergency crew thinks the victim is dead when, in fact, he is really alive = P(Type I error).
β = probability that the emergency crew does not know if the victim is alive when, in fact, the victim is dead =
P(Type II error).

The error with the greater consequence is the Type I error. (If the emergency crew thinks the victim is dead,
they will not treat him.)

Example 3
A certain experimental drug claims a cure rate of at least 75% for males with prostate cancer. Describe both the Type
I and Type II errors in context. Which error is the more serious?
Type I: A cancer patient believes the cure rate for the drug is less than 75% when it actually is at least 75%.
Type II: A cancer patient believes the experimental drug has at least a 75% cure rate when it has a cure rate that is
less than 75%.

In this scenario, the Type II error contains the more severe consequence. If a patient believes the drug works at least
75% of the time, this most likely will influence the patient’s (and doctor’s) choice about whether to use the drug as a
treatment option.

C. Hypothesis Test for the Mean


Going back to the standardizing formula we can derive the test statistic for testing hypotheses concerning means.

The standardizing formula cannot be solved as it is because we do not have μ, the population mean. However, if we
substitute in the hypothesized value of the mean, μ0 in the formula as above, we can compute a Z value. This is the
test statistic for a test of hypothesis for a mean.
We interpret this Z value as the associated probability that a sample with a sample mean of X́ could have come from a
distribution with a population mean of H0 and we call this Z value Zc for “calculated”.
The horizontal axis of the bottom panel is labeled Z and is the standard normal distribution. Z α and −Z α , called the
2 2

critical values, are marked on the bottom panel as the Z values associated with the probability the analyst has set as
the level of significance in the test, (α ). The probabilities in the tails of both panels are, therefore, the same.
The table below shows the third possibility for the location of the sample mean, X́ . Here the sample mean is within
the two critical values. That is, within the probability of (1−α ) and we cannot reject the null hypothesis.

This gives us the decision rule for testing a hypothesis for a two-tailed test:

This rule will always be the same no matter what hypothesis we are testing or what formulas we are using to make
the test. The only change will be to change the Z c to the appropriate symbol for the test statistic for the parameter
being tested. Stating the decision rule another way: if the sample mean is unlikely to have come from the distribution
with the hypothesized mean we cannot accept the null hypothesis. Here we define "unlikely" as having a probability
less than alpha of occurring.
P-Value Approach
An alternative decision rule can be developed by calculating the probability that a sample mean could be found that
would give a test statistic larger than the test statistic found from the current sample data assuming that the null
hypothesis is true. Here the notion of "likely" and "unlikely" is defined by the probability of drawing a sample with a
mean from a population with the hypothesized mean that is either larger or smaller than that found in the sample data.
Simply stated, the p-value approach compares the desired significance level, α, to the p-value which is the probability
of drawing a sample mean further from the hypothesized value than the actual sample mean. A large p-value
calculated from the data indicates that we should not reject the null hypothesis. The smaller the p-value, the more
unlikely the outcome, and the stronger the evidence is against the null hypothesis. We would reject the null
hypothesis if the evidence is strongly against it. The relationship between the decision rule of comparing the
calculated test statistics, Zc, and the Critical Value, Z a , and using the p-value can be seen below.

Here is a systematic way to make a decision of whether you cannot accept or cannot reject a null hypothesis if using
the p-value and a preset or preconceived α (the "significance level"). A preset α is the probability of a Type I error
(rejecting the null hypothesis when the null hypothesis is true). It may or may not be given to you at the beginning of
the problem. In any case, the value of α is the decision of the analyst. When you make a decision to reject or not
reject H0, do as follows:

1. If α > p−value, cannot accept H0. The results of the sample data are significant. There is sufficient evidence
to conclude that H0 is an incorrect belief and that the alternative hypothesis, H a, may be correct.
2. If α ≤ p−value , cannot reject H0. The results of the sample data are not significant. There is not sufficient
evidence to conclude that the alternative hypothesis, H a, may be correct. In this case the status quo stands.
3. When you "cannot reject H 0", it does not mean that you should believe that H 0 is true. It simply means that
the sample data have failed to provide sufficient evidence to cast serious doubt about the truthfulness of H 0.
Remember that the null is the status quo and it takes high probability to overthrow the status quo. This bias in
favor of the null hypothesis is what gives rise to the statement "tyranny of the status quo" when discussing
hypothesis testing and the scientific method.
D. One and Two-Tailed Tests
It may be that the analyst has no concern about the value being "too" high or "too" low from the hypothesized value.
If this is the case, it becomes a one-tailed test and all of the alpha probability is placed in just one tail and not split
into α /2 as in the above case of a two-tailed test. Any test of a claim will be a one-tailed test.
The claim would be in the alternative hypothesis. The burden of proof in hypothesis testing is carried in the
alternative. This is because failing to reject the null, the status quo, must be accomplished with 90 or 95 percent
confidence that it cannot be maintained. Said another way, we want to have only a 5 or 10 percent probability of
making a Type I error, rejecting a good null; overthrowing the status quo.

This is a one-tailed test and all of the alpha probability is placed in just one tail and not split into α /2 as in the above
case of a two-tailed test.
The figure below shows two possible cases and the form of the null and alternative hypotheses.

where μ0 is the hypothesized value of the population mean.

Test statistics for Test of Means, Varying Sample Size, Population Standard Deviation Known or Unknown

Examples on Test on Means


1. Jeffrey, as an eight-year old, established a mean time of 16.43 seconds for swimming the 25-yard freestyle, with
a standard deviation of 0.8 seconds. His dad, Frank, thought that Jeffrey could swim the 25-yard freestyle faster
using goggles. Frank bought Jeffrey a new pair of expensive goggles and timed Jeffrey for 15 25-yard freestyle
swims. For the 15 swims, Jeffrey's mean time was 16 seconds. Frank thought that the goggles helped Jeffrey to
swim faster than the 16.43 seconds. Conduct a hypothesis test using a preset α = 0.05.
Solution:
Step 4 has us compare the test statistic and the critical value and mark these on the graph. We see that the test
statistic is in the tail and thus we move to step 4 and reach a conclusion. The probability that an average time of
16 minutes could come from a distribution with a population mean of 16.43 minutes is too unlikely for us to
accept the null hypothesis. We cannot accept the null.

Step 5 has us state our conclusions first formally and then less formally. A formal conclusion would be stated as:
“With a 95% level of significance we cannot accept the null hypothesis that the swimming time with goggles
comes from a distribution with a population mean time of 16.43 minutes.” Less formally, “With 95%
significance we believe that the goggles improves swimming speed”

If we wished to use the p-value system of reaching a conclusion we would calculate the statistic and take the
additional step to find the probability of being 2.08 standard deviations from the mean on a t-distribution. This
value is .0187. Comparing this to the α -level of .05 we see that we cannot accept the null. The p-value has been
put on the graph as the shaded area beyond -2.08 and it shows that it is smaller than the hatched area which is the
alpha level of 0.05. Both methods reach the same conclusion that we cannot accept the null hypothesis.

2. Jane has just begun her new job as on the sales force of a very competitive company. In a sample of 16 sales calls
it was found that she closed the contract for an average value of 108 dollars with a standard deviation of 12
dollars. Test at 5% significance that the population mean is at least 100 dollars against the alternative that it is
less than 100 dollars. Company policy requires that new members of the sales force must exceed an average of
$100 per contract during the trial employment period. Can we conclude that Jane has met this requirement at the
significance level of 95%?
Solution

E. Hypothesis Test for Proportions


Again, we begin with the standardizing formula modified because this is the distribution of a binomial.

Substituting p0, the hypothesized value of p, we have:


This is the test statistic for testing hypothesized values of p, where the null and alternative hypotheses take one of
the following forms:

Example 1
The mortgage department of a large bank is interested in the nature of loans of first-time borrowers. This
information will be used to tailor their marketing strategy. They believe that 50% of first-time borrowers take out
smaller loans than other borrowers. They perform a hypothesis test to determine if the percentage is the same or
different from 50%. They sample 100 first-time borrowers and find 53 of these loans are smaller than the other
borrowers. For the hypothesis test, they choose a 5% level of significance.
Solution
Example 2
Suppose a consumer group suspects that the proportion of households that have three or more cell phones is 30%.
A cell phone company has reason to believe that the proportion is not 30%. Before they start a big advertising
campaign, they conduct a hypothesis test. Their marketing people survey 150 households with the result that 43 of
the households have three or more cell phones.
Solution:
Exercises:
1. The mean throwing distance of a football for Marco, a high school freshman quarterback, is 40 yards, with a
standard deviation of two yards. The team coach tells Marco to adjust his grip to get more distance. The coach
records the distances for 20 throws. For the 20 throws, Marco’s mean distance was 45 yards. The coach thought
the different grip helped Marco throw farther than 40 yards. Conduct a hypothesis test using a preset α = 0.05.
Assume the throw distances for footballs are normal.
First, determine what type of test this is, set up the hypothesis test, find the p-value, sketch the graph, and state
your conclusion.
2. A teacher believes that 85% of students in the class will want to go on a field trip to the local zoo. She performs a
hypothesis test to determine if the percentage is the same or different from 85%. The teacher samples 50 students
and 39 reply that they would want to go to the zoo. For the hypothesis test, use a 1% level of significance.
V
=
df 0.10 0.05 0.025 0.01 0.005 0.001
Student’s t Distribution
12.70
1 3.078 6.314 31.821 63.657 318.313
6

2 1.886 2.920 4.303 6.965 9.925 22.327

3 1.638 2.353 3.182 4.541 5.841 10.215

4 1.533 2.132 2.776 3.747 4.604 7.173

5 1.476 2.015 2.571 3.365 4.032 5.893

6 1.440 1.943 2.447 3.143 3.707 5.208

7 1.415 1.895 2.365 2.998 3.499 4.782

8 1.397 1.860 2.306 2.896 3.355 4.499

9 1.383 1.833 2.262 2.821 3.250 4.296

10 1.372 1.812 2.228 2.764 3.169 4.143

11 1.363 1.796 2.201 2.718 3.106 4.024

12 1.356 1.782 2.179 2.681 3.055 3.929

13 1.350 1.771 2.160 2.650 3.012 3.852

14 1.345 1.761 2.145 2.624 2.977 3.787

15 1.341 1.753 2.131 2.602 2.947 3.733

16 1.337 1.746 2.120 2.583 2.921 3.686

17 1.333 1.740 2.110 2.567 2.898 3.646

18 1.330 1.734 2.101 2.552 2.878 3.610

19 1.328 1.729 2.093 2.539 2.861 3.579

20 1.325 1.725 2.086 2.528 2.845 3.552

21 1.323 1.721 2.080 2.518 2.831 3.527

22 1.321 1.717 2.074 2.508 2.819 3.505

23 1.319 1.714 2.069 2.500 2.807 3.485

24 1.318 1.711 2.064 2.492 2.797 3.467

25 1.316 1.708 2.060 2.485 2.787 3.450

26 1.315 1.706* 2.056 2.479 2.779 3.435

27 1.314 1.703 2.052 2.473 2.771 3.421

28 1.313 1.701 2.048 2.467 2.763 3.408

29 1.311 1.699 2.045 2.462 2.756 3.396

30 1.310 1.697 2.042 2.457 2.750 3.385

You might also like