Professional Documents
Culture Documents
Lesson 6.1 Hypothesis Testing One Sample Test
Lesson 6.1 Hypothesis Testing One Sample Test
Lesson 6.1 Hypothesis Testing One Sample Test
Introduction
Inferential statistics has two main purposes: (1) hypothesis testing and (2)
parameter estimation. By far, most of the applications of inferential statistics are in
the area of hypothesis testing. Scientific methodology depends on this application
of inferential statistics. Without objective verification, science would cease to exist,
and objective verification is often impossible without inferential statistics. You will
recall that at the heart of scientific methodology is an experiment. Usually, the
experiment has been designed to test a hypothesis, and the resulting data must be
analysed.
Learning Outcomes:
Upon completion of this unit, you should be able to:
1. Define the alternative (Ha) and null hypotheses (Ho), and explain the
relationship between them. Include a discussion of directional and non-
directional Has and the Hos that go with them.
2. Define alpha level, explain the purpose of the alpha level, and specify the
decision rule for determining when to reject or retain the null hypothesis.
3. Explain the difference between significant and important.
4. Explain the process of evaluating the null hypothesis, beginning with Ha and
H0, and ending with the possibility of making a Type I or Type II error.
5. Explain why we evaluate H0 first and then Ha indirectly, rather than directly
evaluate Ha; explain why we evaluate the tail result and not the exact result
itself.
6. Explain when it is appropriate to do one- and two-tailed evaluations. Define
Type I and Type II error and explain why it is important to discuss these possible
errors; specify the relationship between Type I and Type II errors, and
between the alpha level and Type I and Type II errors.
sign test.
7. Understand the illustrative example, do the practice problems, and
understand the solutions.
Discussion
Test of Hypothesis
We begin with an experiment. Suppose you were given a coin and asked to
determine if the coin is fair or biased. You might respond by conducting a simple
experiment by tossing the coin many times, and if the probability of a head is 0.5
then you can conclude that it is fair.
If you realize that although personal reports are suggestive, they are not
conclusive. Experiments must be done before one can properly assess cause and
effect.
Types of Hypothesis
In any experiment, there are two hypotheses that compete for explaining
the results: the alternative hypothesis and the null hypothesis. The alternative
hypothesis is the one that claims the difference in results between conditions is due
to the independent variable. The null hypothesis is set up to be the logical
counterpart of the alternative hypothesis such that if the null hypothesis is false, the
alternative hypothesis must be true. Therefore, these two hypotheses must be
mutually exclusive and exhaustive.
Example:
1. Manager of a certain Bank claims that their Non-A TM customers need to
wait, on the average, for at most ten minutes before they are served. The
hypotheses are:
1. The self concept of the group that exposed to values clarification lessons
will have better self concept than the other group not exposed the same lesson.
2. Values clarification lessons will have a positive effect on the self concept
of the students.
3. There will be positive relationship between the self concept of the
students and the values clarification lessons they will be exposed to.
The sampling distribution of the test statistic is divided into two regions, a
region of rejection (sometimes called the critical region) and a region of non-
rejection (see Figure).If the test statistic falls into the region of non-rejection, you do
not reject the null hypothesis. If the test statistic falls into the rejection region, you
reject the null hypothesis.
The region of rejection consists of the values of the test statistic that are
unlikely to occur if the null hypothesis is true. These values are more likely to occur if
the null hypothesis is false. Therefore, if a value of the test statistic falls into this
rejection region, you reject the null hypothesis because that value is unlikely if the
null hypothesis is true. To make a decision concerning the null hypothesis, you first
determine the critical value of the test statistic. The critical value divides the non-
rejection region from the rejection region. Determining this critical value depends
on the size of the rejection region. The size of the rejection region is directly related
to the risks involved in using only sample evidence to make decisions about a
population parameter.
A Type I error occurs if you reject the null hypothesis, Ho, when it is true and should
not be rejected. The probability of a Type I error occurring is 𝜶.
A Type II error occurs if you do not reject the null hypothesis, Ho, when it is false
and should be rejected. The probability of a Type II error occurring is 𝜷.
The Power of a Test The complement of the probability of a Type II error, (1 - 𝜷), is
called the power of a statistical test.
The power of a statistical test, (1 - 𝜷), is the probability that you will reject the null
hypothesis when it is false and should be rejected.
Test Statistics
When the standard deviation, 𝛔, is known, you use the Z test if the population
is normally distributed. If the population is not normally distributed, you can still use
the Z test if the sample size is large enough. Z-test statistic for determining the
difference between the sample mean, 𝑿 ̅ ,and the population mean, μ , when the
standard deviation, 𝛔, is known.
The Z-test is given by
̅ −𝜇
𝑿
𝑍= 𝜎
√𝑛
The numerator measures how far (in an absolute sense) the observed sample
mean, 𝑿 ̅ , is from the hypothesized mean, μ . The denominator is the standard error
of the mean, so Z represents the difference between 𝑿 ̅ and μ in standard error units.
Critical values of Z
Significance Level
0.10 0.05 0.025 0.01
Test type
One tailed test 1.28 1.645 1.96 2.33
Example 1
You are the manager of a fast-food restaurant. You want to determine
whether the population. From past experience, you can assume that the
population is normally distributed with a population standard deviation of 1.2
minutes. You select a sample of 25 orders during a one-hour period. The sample
mean is 5.1 minutes. Determine whether there is evidence at the 0.05 level of
significance that the population mean waiting time to place an order has changed
in the past month from its previous population mean value of 4.5 minutes.
SOLUTION
Step 1 The null hypothesis is that the population mean has not changed from its
previous value of 4.5 minutes:
Ho: 𝜇 = 4.5
The alternative hypothesis is the opposite of the null hypothesis. Because the null
hypothesis is that the population mean is 4.5 minutes, the alternative hypothesis is
that the population mean is not 4.5 minutes:
H1: 𝜇 ≠ 4.5
Step 2 You have selected a sample of n = 25. The level of significance is 0.05 (that
is, 𝛼 = 0.05).
Step 3 Because 𝛔 is known, you use the normal distribution and the Z test statistic.
Step 4 Because = 0.05, the critical values of the Z test statistic are -1.96 and +1.96.
The rejection region is Z < -1.96 or Z > +1.96. The non-rejection region is
-1.96 < Z < +1.96.
Step 5 You collect the sample data and compute 𝑿 ̅ = 5.1. Compute the test
statistic:
̅−𝜇
𝑿 5.1 − 4.5
𝑍= 𝜎 = = 2.50
1.2
√𝑛 √25
Step 6 Because Z = 2.50 > 1.96, you reject the null hypothesis. You conclude that
there is evidence that the population mean waiting time to place an order has
changed from its previous value of 4.5 minutes. The mean waiting time for
customers is longer now than it was last month.
Example:
Using the example 1 above.
Step 1 The null hypothesis is that the population mean has not changed from
its previous value of 4.5 minutes:
Ho: 𝜇 = 4.5
The alternative hypothesis is the opposite of the null hypothesis. Because the
null hypothesis is that the population mean is 4.5 minutes, the alternative
hypothesis is that the population mean is not 4.5 minutes:
Ha: 𝜇 ≠ 4.5
Step 2 You have selected a sample of n = 25. The level of significance is 0.05
(that is, 𝛼 = 0.05).
Step 3 Because 𝝈 is known, you use the normal distribution and the Z test
statistic.
Step 4 (this step is omitted for this method)
. Step 5 You collect the sample data and compute 𝑿 ̅ = 5.1. Compute the
test statistic:
̅−𝜇
𝑿 5.1 − 4.5
𝑍= 𝜎 = = 2.50
1.2
√𝑛 √25
To find the probability of getting a test statistic Z that is equal to or more
extreme than 2.50 standard deviation units from the center of a standardized
normal distribution, you compute the probability of a Z value greater than
2.50 along with the probability of a Z value less than 2.50. From Table of areas
under the normal curve, the probability of a Z value below 2.50 is 0.0062 or
P(Z<2.50)=0.0062. The probability of a value below +2.50 is 0.9938. Therefore,
the probability of a value above +2.50 is 1 -0.9938 = 0.0062. Thus, the p-value
for this two-tail test is 0.0062 + 0.0062 = 0.0124.
Step 6 Because the p-value = 0.0124 < = 0.05, you reject the null hypothesis.
You conclude that there is evidence that the population mean waiting time
to place an order has changed from its previous value of 4.5 minutes. The
mean waiting time for customers is longer now than it was last month.
ONE-TAIL TESTS
A ONE-TAIL TEST FOR THE MEAN
A company that manufactures chocolate bars is particularly concerned that
the mean weight of a chocolate bar not be greater than 6.03 ounces. Past
experience allows you to assume that the standard deviation is 0.02 ounces. A
sample of 50 chocolate bars is selected, and the sample mean is 6.034 ounces.
Using the level of significance 𝛼 = 0.01, is there evidence that the population mean
weight of the chocolate bars is greater than 6.03 ounces?
Step 1 The null hypothesis. There is no sufficient evidence that the population mean
weight of chocolate bars is greater than 6.03 ounces. H0: 𝜇 ≤ 6.031
The Alternative hypothesis. There is sufficient evidence that the population
mean weight of chocolate bars is greater than 6.03 ounces. H0: 𝜇 > 6.031
Step 2 You have selected a sample size of n = 50. You decide to use + = 0.01.
Step 3 Because 𝝈 is known, you use the normal distribution and the Z test statistic.
Step 4 The rejection region is entirely contained in the upper tail of the sampling
distribution of the mean because you want to reject Ho only when the sample
mean is significantly greater than 6.03 ounces. Because the entire rejection region
is in the upper tail of the standardized normal distribution and contains an area of
0.01, the critical value of the Z test statistic is 2.33.
The decision rule is
Reject Ho: if Z > 2.33;
otherwise, do not reject Ho.
Step 5 You select a sample of 50 chocolate bars, and the sample mean weight is 6.034
ounces. Using n = 50, 𝑿
̅ = 6.034, 𝝈 = 0.02, and
̅ −𝜇
𝑿 6.034 − 6.031
𝑍= 𝜎 = = 1.1414
0.02
√𝑛 √50
Step 6 Because Z = 1.414 < 2.33, you do not reject the null hypothesis. There is insufficient
evidence to conclude that the population mean weight is greater than 6.03 ounces.
defines the test statistic t for determining the difference between the sample
mean, 𝛍 , and the population mean, 𝛔 , when the sample standard deviation, S, is
used.
Example:
The weight of Lechon manok is said to be 168 lbs. To determine if this is true,
a random sample of 25 lechon manok is taken and resulted in an average of
172.50 and a sample standard deviation of 15.40. (Assume the population
distribution is normal). Test the appropriate hypotheses at = 0.05.
Solution
Step one The null hypothesis is
Ho: 𝜇 = 168
The alternative hypothesis is:
Ha: 𝜇 ≠ 168
Step 2 You have selected a sample of n = 25 and Then 𝛼 = 0.05.
Step 3 Because 𝝈 is known, you use the normal distribution and the t- test statistic.
Step 4 For a given sample size, n, the test statistic t follows a t distribution with n- 1
degrees of freedom. The critical values of the t distribution with 25-1=24 degrees
of freedom are found in t-table ±t24,0.025 = ± 2.0639
The alternative hypothesis, Ha, : 𝜇 ≠ 168 two-tailed. Thus, the area in the rejection
region of the t distribution s left (lower) tail is 0.025, and the area in the rejection
region of the t distribution s right (upper) tail is also 0.025.
̅ −𝜇
𝑿 172.50 − 168
𝑡= 𝜎 = = 1.46
15.40
√𝑛 √25
Step 6 Because,2.0639 < t = 1.46< 2.2010, you do not reject Ho. You have insufficient
evidence to conclude that the true mean insufficient evidence that true mean
cost is different than168.
/2=.025 /2=.025
or
𝑿 − 𝑛𝜋
𝑍=
√𝑛𝜋(1 − 𝜋)
where:
𝑋 Number of successes in the sample
𝑝= =
𝑛 𝑆𝑎𝑚𝑝𝑙𝑒 𝑠𝑖𝑧𝑒
p= sample proportion of successes
𝜋= hypothesized proportion of successes in the population
and the test statistic Z approximately follows a standardized normal
distribution.
Example
A fast-food chain has developed a new process to ensure that orders at
the drive-through are filled correctly. The previous process filled orders correctly
85% of the time. Based on a sample of 100 orders using the new process, 94 were
filled correctly. At the 0.01 level of significance, can you conclude that the new
process has increased the proportion of orders filled correctly?
SOLUTION
Step1 The null and alternative hypotheses are
H0: 𝜋 ≤ 0.85 (that is, the proportion of orders filled correctly is less than
or equal to 0.85)
H1: 𝜋 > 0.85 (that is, the proportion of orders filled correctly is greater
than 0.85)
Step 2 You have selected a sample of n = 100. The level of significance is 0.01
(that is, 𝛼 = 0.01).
Step 3 Because = 0.01, one tailed the critical values of the Z test statistic is 2.33 The
rejection region is Z < 2.33
Step 4 Compute the test statistic:
𝑋 94
𝑝= = = 0.94
𝑛 100
Step 6 Because Z = 2.52> 2.33 , you reject the null hypothesis. You have evidence
that the new process has increased the proportion of correct orders above 0.85.
Formula
𝑋̅1 − 𝑋̅2 − (𝜇1 − 𝜇2 )
𝑡=
(𝑛1 − 1)𝑠1 2 + (𝑛2 − 1)𝑠2 2 1 1
√ (𝑛 + 𝑛 )
𝑛1 + 𝑛2 − 2 1 2
Example:
A researcher wishes to find out whether or not there is significant difference
between the daily allowances of male and female student in his school. By
random sampling, he took sample of 239 female students and took sample of
209 male students. These students were found to have a mean of Php 142.00
and Php 148.00 respectively. The total population of students in that school has
a standard deviation of Php 40. Is there a significance difference between the
two samples at 0.0 I level of significance?
SOLUTION
Step 1 The null hypothesis
there no significance difference between the daily allowances
of male and female
The alternative hypothesis
there is significance difference between the daily allowances of
male and female
Step 3 Because 𝛔=80 is known, you use the normal distribution and the Z test
statistic.
Step 4 Because = 0.01, the critical values of the Z test statistic are 2.58
The rejection region is Z < -2.58 or Z > +2.58. The non-rejection region is
-2.58 < Z < +2.58
Step 5 You collect the sample data and compute 𝑿 ̅ = 5.1. Compute the test
statistic:
𝑋̅1 − 𝑋̅2 − (𝜇1 − 𝜇2 ) 148 − 142 − 0 6
𝑍= = = = 0.79
1 1 1 1 7.6
𝜎√𝑛 + 𝑛 80√239 + 209
1 2
Step 6 Because -2.58< Z = 0.79 < +2.58, do not reject the null hypothesis. You
conclude there no significance difference between the daily allowances of
male and female. This says that the weekly allowance of male and female
is statistically the same.
Example:
A researcher wishes to test whether or not the modular method of teaching is more
effective than the Traditional Method. She picks two classes of approximately
equal intelligence (verified trough an administered lQ test) she gathers a sample of
18 students to whom she uses the Modular method and another sample of 14
students to whom she uses the traditional method. After the experiment, an
objective test revealed that the first group got a mean score of 28.6 with standard
deviation of 5.9, while the second group got a mean score of 21. 7, with standard
deviation of 4.6. Based on the results of the administered test, can we say that the
case method is more effective than the traditional method?
Solution
Step one The null hypothesis is:
the modular method of teaching is as effective as the Traditional
Method
The alternative hypothesis is:
the modular method of teaching is more effective than the Traditional
Method
Step 2 The sample selected is 𝑛1 = 18 𝑎𝑛𝑑 𝑛2 = 14. The level of significance is 0.05
(that is, 𝛼 = 0.05).
Step 3 Because 𝝈 is unknown, you use the normal distribution and the t- test statistic.
Step 4 For a given sample size, n, the test statistic t follows a t distribution with n- 1
degrees of freedom. The critical values of the t distribution with 18 + 14 − 2 = 30.
degrees of freedom are found in t-table ±t30,0.05 = ± 1.645
Hormone X 8 10 12 6 6 7 9 8 7 11
Placebo 5 6 3 4 7 8 6 5 4 8
Subject 1 2 3 4 5 6 7 8 9 10
Birth control:
Diastolic Blood 108 76 69 78 74 85 79 78 80 81
no Pill
Pressure
Placebo 102 68 66 71 76 80 82 79 78 85