Chapter 4 Introduction to Hypothesis Testing Introduction to Hypothesis Testing.
Hypothesis Testing
Transcript of Hypothesis Testing
HYPOTHESISHYPOTHESIS&&Its TestingIts Testing
Gaurav SinghGaurav Singh
R.B.T.T.I., BareillyR.B.T.T.I., Bareilly
HypothesisHypothesis
HypoHypo- Less Then - Less Then ThesisThesis- view or theory- view or theory
It is a tentative explanation or solution.It is a tentative explanation or solution. It is declarative testable relationship between It is declarative testable relationship between
two or more variables.two or more variables. A hypothesis is the assumption that we make A hypothesis is the assumption that we make
about the population parameter. This can be about the population parameter. This can be any assumption about a population parameter any assumption about a population parameter not necessarily based on statistical data.not necessarily based on statistical data.
Hypothesis: Hypothesis: Not Necessary in-Not Necessary in-
Fact finding studiesFact finding studies Exploratory researchesExploratory researches In historical researches (theoretical)In historical researches (theoretical) But in all Analytical and experimental But in all Analytical and experimental
researches, hypothesis should be researches, hypothesis should be formulated.formulated.
Characteristics Characteristics
Conceptually clearConceptually clear TestableTestable Economic and parsimoniousEconomic and parsimonious Related to existing body of theory and Related to existing body of theory and
facts.facts. Logical unity and comprehensivenessLogical unity and comprehensiveness
General in scopeGeneral in scope Related to available scientific tools and Related to available scientific tools and
techniquestechniques Tentative answer to the proposed Tentative answer to the proposed
problemproblem OperationalOperational Specific but not trivial or inconsequentialSpecific but not trivial or inconsequential
Types of hypothesisTypes of hypothesis
Based on function:Based on function: DescriptiveDescriptive RelationalRelational
Based on approach:Based on approach: WorkingWorking nullnull StatisticalStatistical
Based on level of abstractionBased on level of abstraction Common senseCommon sense ComplexComplex AnalyticalAnalytical
DescriptiveDescriptive
It describes the characteristics of a It describes the characteristics of a variable.variable. The customer satisfaction level is The customer satisfaction level is
significantly good among the Hero Honda significantly good among the Hero Honda owners.owners.
Public enterprises are more amendable for Public enterprises are more amendable for centralized planning.centralized planning.
RelationalRelational
It describe the relationship between two It describe the relationship between two variables.variables. The Families with higher income spend more The Families with higher income spend more
for recreation.for recreation. The lower the rate of job turnover in a work The lower the rate of job turnover in a work
group, the higher the work productivity. group, the higher the work productivity.
Working hypothesisWorking hypothesis
Initial hypothesisInitial hypothesis Not very specificNot very specific These are subject to modification as the These are subject to modification as the
investigation proceeds. investigation proceeds.
Null HypothesisNull Hypothesis
Null means Null means no differenceno difference It is a non directional hypothesis.It is a non directional hypothesis. It is also known as Statistical HypothesisIt is also known as Statistical Hypothesis It confirms the qualities of detachment and It confirms the qualities of detachment and
objectivity.objectivity. Null hypothesis are more exect.Null hypothesis are more exect. either it is accepted or rejected.either it is accepted or rejected.
If rejected-If rejected- Alternative hypothesis formulated.Alternative hypothesis formulated.
One tailed & Two tailedOne tailed & Two tailed
Statistical hypothesisStatistical hypothesis
Statements about statistical population.Statements about statistical population. These are derived from a sample.These are derived from a sample. It may be hypothesis of difference or It may be hypothesis of difference or
hypothesis of association.hypothesis of association. In broad sense, all hypothesis might be In broad sense, all hypothesis might be
said statistical hypothesis in broad sense.said statistical hypothesis in broad sense.
Common sense Common sense hypothesishypothesis
These are common sense ideas.These are common sense ideas. These are simple level hypothesis.These are simple level hypothesis.
Shop assistants in small shops lacks motivation.Shop assistants in small shops lacks motivation. Shoulders from upper class are less adjusted in the Shoulders from upper class are less adjusted in the
army then lower class men.army then lower class men.
it requires three tasks:it requires three tasks: Removal of value judgmentRemoval of value judgment Clarification of termsClarification of terms Application of validity testsApplication of validity tests
Complex hypothesisComplex hypothesis
It aims at testing the existence of logically It aims at testing the existence of logically derived relationships between empirical derived relationships between empirical uniformities.uniformities.
These are purposeful distortions of empirical These are purposeful distortions of empirical exactness.exactness.
The function of such hypothesis is to create The function of such hypothesis is to create tools and problems for further research in tools and problems for further research in otherwise very complex areas of investigation.otherwise very complex areas of investigation.
Analytical hypothesisAnalytical hypothesis
These are concerns with the relationship These are concerns with the relationship of analytical variables.of analytical variables.
These occur at highest level of These occur at highest level of abstraction.abstraction. e.g. there are two high fertility population e.g. there are two high fertility population
segments in India, viz. low income urban segments in India, viz. low income urban Muslims and low income rural low caste Muslims and low income rural low caste Hindus.Hindus.
Sources of hypothesisSources of hypothesis
TheoryTheory ObservationObservation AnalogiesAnalogies Intuition AND personal experiencesIntuition AND personal experiences Findings of studiesFindings of studies State of knowledgeState of knowledge CultureCulture Continuity of reserchContinuity of reserch
Functions of hypothesisFunctions of hypothesis
It gives a definite point too the investigation.It gives a definite point too the investigation. It guides the direction of study.It guides the direction of study. It specified the source of data.It specified the source of data. It determines the data needs.It determines the data needs. It defines which fact is relevant.It defines which fact is relevant. It determines most appropriate technique of It determines most appropriate technique of
data analysis.data analysis. It contributes to the development of theory.It contributes to the development of theory.
Characteristics of a Good Characteristics of a Good HypothesisHypothesis
Conceptual clarityConceptual clarity SpecificitySpecificity TestabilityTestability Availability of techniqueAvailability of technique Theoretical relevanceTheoretical relevance ConsistencyConsistency ObjectivityObjectivity SimplicitySimplicity
Evaluating hypothesisEvaluating hypothesis
Have the all aspects of the problem been considered in Have the all aspects of the problem been considered in the process of hypotheses formation?the process of hypotheses formation?
Do the hypotheses include all the pertinent possibilities Do the hypotheses include all the pertinent possibilities to answer the research question? to answer the research question?
Have the hypotheses been selected on the basis of Have the hypotheses been selected on the basis of such possibilities?such possibilities?
Have the hypotheses selected without fearing the Have the hypotheses selected without fearing the possibilities of tits sustainability?possibilities of tits sustainability?
Have conditions at hypotheses selection, allowed the Have conditions at hypotheses selection, allowed the researcher to reach the real solutions of problem? researcher to reach the real solutions of problem?
Are the concepts used in hypotheses specific?Are the concepts used in hypotheses specific? Is the posited relationship between the Is the posited relationship between the
variables verified?variables verified? Is there any prior evidence as to truth or Is there any prior evidence as to truth or
falseness of posited relationship?falseness of posited relationship? Can an appropriate research design be Can an appropriate research design be
devised?devised? Are the generalizations a part of a theoretical Are the generalizations a part of a theoretical
system?system?
Process of hypothesis settingProcess of hypothesis setting
For each objective, search the possible For each objective, search the possible answers. answers.
It requires searching, delving, trying, It requires searching, delving, trying, failing, and trying again and coming to a failing, and trying again and coming to a conclusion.conclusion.
Then write it in appropriate style.Then write it in appropriate style. Evaluate these tentative hypothesis and Evaluate these tentative hypothesis and
refine them in logical and testable way.refine them in logical and testable way.
Rules of hypothesis Rules of hypothesis testingtesting
Search the variable measurement with most Search the variable measurement with most quantitative characteristics.quantitative characteristics.
Make variable scales in mutually exclusive and Make variable scales in mutually exclusive and totally inclusive categories.totally inclusive categories.
Describe the meaning of terms operationally in Describe the meaning of terms operationally in testable form.testable form.
Always consider alternative operations.Always consider alternative operations. Analyze variables through relationship.Analyze variables through relationship. Link two or more formal propositions through a Link two or more formal propositions through a
shared independent or independent varaibles.shared independent or independent varaibles.
Testing the hypothesisTesting the hypothesis
Procedure of Hypothesis Procedure of Hypothesis TestingTesting
FirstFirst, state 2 hypotheses, , state 2 hypotheses, the the null hypothesisnull hypothesis (“H (“H00”) and ”) and the the alternative hypothesisalternative hypothesis (“H (“HAA”)”)
Select an appropriate statistical testSelect an appropriate statistical test Select the desirable level of significanceSelect the desirable level of significance Compute the appropriate statistic from the Compute the appropriate statistic from the
sample datasample data Compute the significant test valueCompute the significant test value Obtain the critical test valueObtain the critical test value Make the decisionMake the decision
Identification of hypothesesIdentification of hypotheses
The The null hypothesisnull hypothesis always represents always represents the status quo, the status quo, i.e.i.e. the hypothesis that the hypothesis that requires no change in current behavior.requires no change in current behavior.
The The alternative hypothesisalternative hypothesis is the is the conclusion that the researcher is trying to conclusion that the researcher is trying to make.make.
In statistics, we always In statistics, we always assume the null assume the null hypothesis is truehypothesis is true..
ThenThen, make a decision based on the , make a decision based on the available evidence.available evidence. If there is sufficient evidence (“beyond a If there is sufficient evidence (“beyond a
reasonable doubt”),reasonable doubt”), reject the null reject the null hypothesishypothesis. .
If there is not enough evidence, If there is not enough evidence, do not do not reject the null hypothesisreject the null hypothesis. .
Hypothesis TestingHypothesis Testing
We generally designate values of the We generally designate values of the
parameter, say parameter, say , under the null , under the null
hypothesis as hypothesis as 00..
Hypothesis TestingHypothesis Testing
Example 1Example 1. An ambulance service is . An ambulance service is
considering replacing its ambulances with considering replacing its ambulances with
new equipment. If new equipment. If 00 is the average is the average
weekly maintenance cost of one of the old weekly maintenance cost of one of the old
ambulances and ambulances and is the average weekly is the average weekly
maintenance cost it can expect for one of maintenance cost it can expect for one of
the new ones, it wants to test the null the new ones, it wants to test the null
hypothesis hypothesis = = 00..
Hypothesis TestingHypothesis Testing
(a)(a) What alternative hypothesis should it What alternative hypothesis should it
use if it wants to buy the new ambulances use if it wants to buy the new ambulances
only if it can be shown that this will reduce only if it can be shown that this will reduce
the average weekly maintenance cost?the average weekly maintenance cost?
Answer: Answer: < < 00. This is called a one-sided . This is called a one-sided
alternative.alternative.
Hypothesis TestingHypothesis Testing
(b) What alternative hypothesis should it (b) What alternative hypothesis should it
use if it is anxious to buy the new use if it is anxious to buy the new
ambulances (which have some other nice ambulances (which have some other nice
features) even if they are more costly but features) even if they are more costly but
has no idea if they are or not.has no idea if they are or not.
Answer: Answer: 00. This is called a two-sided . This is called a two-sided
alternative.alternative.
Hypothesis TestingHypothesis Testing
Nulls and alternatives can take the Nulls and alternatives can take the
following formsfollowing forms
NullNull Possible AlternativesPossible Alternatives
= = 00 00 < < 00 > > 00
00 < < 00
00 > > 00
Hypothesis TestingHypothesis Testing
Now we are going to either reject the null Now we are going to either reject the null
hypothesis or not. In doing so it is hypothesis or not. In doing so it is
important to realize that we can make two important to realize that we can make two
types of errors in rejecting the null types of errors in rejecting the null
hypothesis.hypothesis.
Hypothesis TestingHypothesis Testing
Type I error is rejecting the null Type I error is rejecting the null
hypothesis when it is true.hypothesis when it is true.
Type II error is not rejecting the null Type II error is not rejecting the null
hypothesis when it is false. hypothesis when it is false.
Hypothesis TestingHypothesis Testing
Accept HAccept H00 Reject HReject H00
HH00 is true is true Correct Correct Type I Type I
Decision ErrorDecision Error
HH00 is false Type II Correct is false Type II Correct
Error DecisionError Decision
Hypothesis TestingHypothesis Testing
We would commit a Type I error We would commit a Type I error
if we rejected the device when it was if we rejected the device when it was
indeed effective. We would commit a indeed effective. We would commit a
Type II error if we failed to reject the Type II error if we failed to reject the
device when it was ineffective. device when it was ineffective.
Hypothesis TestingHypothesis Testing
We call the probability of type I error, or We call the probability of type I error, or
the probability of rejecting the null the probability of rejecting the null
hypothesis when it is true, hypothesis when it is true, . We call the . We call the
probability of type II error, or the probability of type II error, or the
probability of not rejecting the null probability of not rejecting the null
hypothesis when it is false, hypothesis when it is false, . .
Hypothesis TestingHypothesis Testing
, the probability of type II error, is a , the probability of type II error, is a
difficult concept in the theory. So for this difficult concept in the theory. So for this
elementary presentation we concentrate elementary presentation we concentrate
on on , the probability of type I error – the , the probability of type I error – the
probability of rejecting the null hypothesis probability of rejecting the null hypothesis
when it is true.when it is true.
Hypothesis TestingHypothesis Testing
The first approach to hypothesis testing is The first approach to hypothesis testing is
traditional.traditional.
1. We formulate a null hypothesis 1. We formulate a null hypothesis
and an appropriate alternative hypothesis and an appropriate alternative hypothesis
from the language of the problem.from the language of the problem.
Hypothesis TestingHypothesis Testing
2. We specify a probability of type I error by 2. We specify a probability of type I error by
convention. Generally people choose convention. Generally people choose = .01 = .01
or .05. That is to say, we decide that we are or .05. That is to say, we decide that we are
willing to tolerate a probability of .01 or .05 of willing to tolerate a probability of .01 or .05 of
making a type I error, i.e., of rejecting the making a type I error, i.e., of rejecting the
null hypothesis when it is true. null hypothesis when it is true. is called the is called the
significance level of the test. significance level of the test.
Hypothesis TestingHypothesis Testing
3. Based on the sampling distribution of 3. Based on the sampling distribution of
an appropriate statistic, we construct a an appropriate statistic, we construct a
criterion for testing the null hypothesis against criterion for testing the null hypothesis against
the chosen alternative hypothesis at the the chosen alternative hypothesis at the
specified level of significance. We use a two- specified level of significance. We use a two-
sided criterion for a two-sided alternative and a sided criterion for a two-sided alternative and a
one-sided criterion for a one-sided alternative.one-sided criterion for a one-sided alternative.
Hypothesis TestingHypothesis Testing
4. We calculate the value of the statistic 4. We calculate the value of the statistic
on which the decision is to be made.on which the decision is to be made.
5. We decide whether or not to reject the 5. We decide whether or not to reject the
null hypothesis. Essentially we reject the null hypothesis. Essentially we reject the
null hypothesis if what we observe is too null hypothesis if what we observe is too
far from it. far from it.
Hypothesis TestingHypothesis Testing
We call the test one- or two- tailed We call the test one- or two- tailed
depending on whether the criterion (or depending on whether the criterion (or
alternative) is one-sided or two- sided.alternative) is one-sided or two- sided.
Hypothesis TestingHypothesis Testing
Example 2Example 2. It has been claimed that on . It has been claimed that on
the average 2.6 workers are absent from the average 2.6 workers are absent from
an assembly line. If an efficiency expert an assembly line. If an efficiency expert
is asked to put this to a test, is asked to put this to a test,
Hypothesis TestingHypothesis Testing
(a) What null hypothesis and what (a) What null hypothesis and what
alternative hypothesis should she use?alternative hypothesis should she use?
(b) Should she use a one-tailed test or a (b) Should she use a one-tailed test or a
two-tailed test if she is going to base her two-tailed test if she is going to base her
decision on the mean of a random decision on the mean of a random
sample?sample?
Hypothesis TestingHypothesis Testing
SolutionSolution. .
(a)(a) The null hypothesis is The null hypothesis is 00 = 2.6. If = 2.6. If
management worries only that more workers management worries only that more workers
are absent then she should use the alternative are absent then she should use the alternative
> 2.6.> 2.6.
(b) If her alternative is (b) If her alternative is > 2.6 then she should > 2.6 then she should
use a one-tailed test because the alternative use a one-tailed test because the alternative
hypothesis is one-sided.hypothesis is one-sided.
Hypothesis TestingHypothesis Testing
We illustrate the traditional procedure with We illustrate the traditional procedure with
an example. In the example, we are an example. In the example, we are
dealing with one sample, dealing with one sample, is known, and is known, and
n is > 30.n is > 30.
Hypothesis TestingHypothesis Testing
Example 3Example 3. In a study of new sources of food, . In a study of new sources of food,
it is reported that a pound of a certain kind of it is reported that a pound of a certain kind of
fish yields on the average 3.52 ounces of FPC fish yields on the average 3.52 ounces of FPC
(fish-protein concentrate) used to enrich various (fish-protein concentrate) used to enrich various
food products, with standard deviation food products, with standard deviation
= 0.07 ounces. = 0.07 ounces.
Hypothesis TestingHypothesis Testing
To check whether To check whether = 3.52 is correct, = 3.52 is correct,
a dietician decides to use the alternative a dietician decides to use the alternative
hypothesis hypothesis 3.52 ounces, a random 3.52 ounces, a random
sample of size n = 32, and the .05 level sample of size n = 32, and the .05 level
of significance. What will she conclude if of significance. What will she conclude if
she gets a sample mean of 3.55 ounces she gets a sample mean of 3.55 ounces
of FPC (per pound of fish)?of FPC (per pound of fish)?
Hypothesis TestingHypothesis Testing
SolutionSolution. The null hypothesis is . The null hypothesis is 00 = 3.52 = 3.52
ounces, ounces, = .07, n = 32 and = .07, n = 32 and __ X = 3.55. _X = 3.55. _
If the null hypothesis is true then E(X) = If the null hypothesis is true then E(X) = = =
00 = 3.52. Also from the CLT we know that = 3.52. Also from the CLT we know that
__
Z = (X - Z = (X - 00)/()/(/sqrt(n)) has approximately a /sqrt(n)) has approximately a
standard normal distribution.standard normal distribution.
Hypothesis TestingHypothesis Testing
Also, the dietician chose Also, the dietician chose = .05 and a = .05 and a
two-sided alternative. That means that in two-sided alternative. That means that in
this case “far away” is defined as a total of this case “far away” is defined as a total of
.05 probability in the two tails. From the .05 probability in the two tails. From the
board drawing you can see that zboard drawing you can see that z .025.025 = =
1.96 and - z1.96 and - z.025.025 = -1.96 leave .025 in each = -1.96 leave .025 in each
tail respectively so a total of .05 in the two tails. tail respectively so a total of .05 in the two tails.
Hypothesis TestingHypothesis Testing
So the statistician rejects the null So the statistician rejects the null
hypothesis if the observed value of Z hypothesis if the observed value of Z
under the null hypothesis is in either tail, under the null hypothesis is in either tail,
i.e., > 1.96 or < -1.96. But the observed value i.e., > 1.96 or < -1.96. But the observed value
of Z under the null hypothesis isof Z under the null hypothesis is
__
(X - (X - 00)/()/(/sqrt(n)) = /sqrt(n)) =
(3.55 – 3.52)/(.07/sqrt(32)) (3.55 – 3.52)/(.07/sqrt(32)) 2.42. 2.42.
Hypothesis TestingHypothesis Testing
Since 2.42 is in the right tail, i.e., > 1.96 Since 2.42 is in the right tail, i.e., > 1.96
the observed mean 3.55 is too far away the observed mean 3.55 is too far away
from the null hypothesized mean 3.52 and from the null hypothesized mean 3.52 and
so the dietician must reject the null so the dietician must reject the null
hypothesis.hypothesis.
Hypothesis TestingHypothesis Testing
In the previous example the dietician In the previous example the dietician
chose chose = .05 for her level of significance = .05 for her level of significance
for her two-tailed test so that the rejection for her two-tailed test so that the rejection
region was the right tail > 1.96 and the left region was the right tail > 1.96 and the left
tail < -1.96. tail < -1.96.
Hypothesis TestingHypothesis Testing
Had she chosen Had she chosen = .01 then the rejection = .01 then the rejection
region would have been the right tail region would have been the right tail
beyond Zbeyond Z.005.005 = 2.575 and the left tail = 2.575 and the left tail
below - Zbelow - Z.005.005 = -2.575. Since the value of = -2.575. Since the value of
her observed statistic was Z her observed statistic was Z 2.42 for 2.42 for
this choice of this choice of she would have failed to she would have failed to
reject the null hypothesis while for reject the null hypothesis while for = .05 she = .05 she
rejected it. rejected it.
Hypothesis TestingHypothesis Testing
So rejection or not of the null hypothesis So rejection or not of the null hypothesis
depends crucially on choice of depends crucially on choice of , the , the
probability of rejection given that the probability of rejection given that the
hypothesis is true that one is willing to hypothesis is true that one is willing to
tolerate. And the choice of tolerate. And the choice of is is
essentially by convention.essentially by convention.
Hypothesis TestingHypothesis Testing
The conventional (some would say The conventional (some would say
arbitrary) nature of arbitrary) nature of choice and the choice and the
dependency of rejection or not on that dependency of rejection or not on that
choice have led to a slightly different choice have led to a slightly different
approach to hypothesis testing. The first approach to hypothesis testing. The first
two of the five steps are the same as two of the five steps are the same as
before.before.
Hypothesis TestingHypothesis Testing
The second approach to hypothesis The second approach to hypothesis
testing is called the p-value approach. testing is called the p-value approach.
The first two of the five steps are the same as The first two of the five steps are the same as
before.before.
1. We formulate a null hypothesis 1. We formulate a null hypothesis
and an appropriate alternative hypothesis and an appropriate alternative hypothesis
from the language of the problem.from the language of the problem.
Hypothesis TestingHypothesis Testing
2. We specify a probability of type I error by 2. We specify a probability of type I error by
convention. Generally people choose convention. Generally people choose = .01 = .01
or .05. That is to say, we decide that we are or .05. That is to say, we decide that we are
willing to tolerate a probability of .01 or .05 of willing to tolerate a probability of .01 or .05 of
making a type I error, i.e., of rejecting the making a type I error, i.e., of rejecting the
null hypothesis when it is true. null hypothesis when it is true. is called the is called the
significance level of the test. significance level of the test.
Hypothesis TestingHypothesis Testing
Now we have steps that differ from those in the Now we have steps that differ from those in the traditional approach.traditional approach.
3’. We specify the test statistic.3’. We specify the test statistic.
4’. We calculate the value of the specified 4’. We calculate the value of the specified test statistic from the data and then find test statistic from the data and then find the tail probability value in the table that the tail probability value in the table that corresponds to that value of the test corresponds to that value of the test statistic. We call that value the p-value.statistic. We call that value the p-value.
Hypothesis TestingHypothesis Testing
5’. We compare the p-value obtained in 5’. We compare the p-value obtained in
step 4’ with the level of significance step 4’ with the level of significance
specified in step 2. If the p-value is less specified in step 2. If the p-value is less
than or equal to the level of significance, than or equal to the level of significance,
the null hypothesis must be rejected.the null hypothesis must be rejected.
Hypothesis TestingHypothesis Testing
Example 4. Example 4. Use the p-value approach to redo Use the p-value approach to redo
example 3. example 3.
SolutionSolution. The first two steps are the same. . The first two steps are the same.
3’. Again, the test statistic is_3’. Again, the test statistic is_
Z = (X - Z = (X - 00)/()/(/sq rt(n))./sq rt(n)).
4’. Calculating the value of that statistic gives 4’. Calculating the value of that statistic gives
Z = (3.55 – 3.52)/(.07/sqrt(32)) Z = (3.55 – 3.52)/(.07/sqrt(32)) 2.42. 2.42.
Hypothesis TestingHypothesis Testing
Now we go to the Z table and see what Now we go to the Z table and see what
probability values are left in the two tails probability values are left in the two tails
by the points Z = -2.42 and Z = 2.42. We by the points Z = -2.42 and Z = 2.42. We
find that .5 - .4922 = .0078 is left in the find that .5 - .4922 = .0078 is left in the
right tail by Z = 2.42 and the same right tail by Z = 2.42 and the same
amount is left in the left tail by Z = -2.42. amount is left in the left tail by Z = -2.42.
So the p-value of the result is .0078 + .0078 = So the p-value of the result is .0078 + .0078 =
.0156. .0156.
Hypothesis TestingHypothesis Testing
Since .0156 is < .05 the null hypothesis is Since .0156 is < .05 the null hypothesis is
rejected at the .05 level but since .0156 is rejected at the .05 level but since .0156 is
> .01 the null hypothesis is not rejected at > .01 the null hypothesis is not rejected at
the .01 level. the .01 level.
Thus the p-value is actually the lowest Thus the p-value is actually the lowest
level of significance at which the null level of significance at which the null
hypothesis would be rejected.hypothesis would be rejected.
Hypothesis TestingHypothesis Testing
Researchers nowadays prefer the p-value Researchers nowadays prefer the p-value
approach because they can publish the p-value approach because they can publish the p-value
and let individual readers decide what and let individual readers decide what
significance level they feel comfortable with and significance level they feel comfortable with and
so whether they want to reject the null so whether they want to reject the null
hypothesis or not. The p-value approach allows hypothesis or not. The p-value approach allows
researchers to avoid choosing a conventional researchers to avoid choosing a conventional
significance level for others.significance level for others.
Hypothesis TestingHypothesis Testing
Example 5Example 5. A horticulturist knows from . A horticulturist knows from
experience that the honeybees visiting her experience that the honeybees visiting her
orchard weigh .87 gram on the average. orchard weigh .87 gram on the average.
Feeling that this year’s honeybees look bigger, Feeling that this year’s honeybees look bigger,
she decides to weigh a random sample of n = she decides to weigh a random sample of n =
50 of the bees all together and she gets an 50 of the bees all together and she gets an
average weight of .91 grams per bee with s = average weight of .91 grams per bee with s =
.15 gram. .15 gram.
Hypothesis TestingHypothesis Testing
Using the .01 level of significance, what Using the .01 level of significance, what
can she conclude about her impressions can she conclude about her impressions
that this year’s bees are larger?that this year’s bees are larger?
Hypothesis TestingHypothesis Testing
SolutionSolution. We use the p-value approach.. We use the p-value approach.
1.1. HH00: : = .87 = .87
HHAA: : > .87 > .87
2. 2. = .01 _ = .01 _
3.3. Z = (X - Z = (X - 00)/(s/sqrt(n)) )/(s/sqrt(n))
4.4. Z = (.91 - .87)/(.15/sqrt(50)) = 1.89. Z = (.91 - .87)/(.15/sqrt(50)) = 1.89.
Hypothesis TestingHypothesis Testing
Since we use a one-sided alternative we Since we use a one-sided alternative we
use a one-tailed test. From the Z table use a one-tailed test. From the Z table
when Z = 1.89, there is .0294 in the right when Z = 1.89, there is .0294 in the right
tail so that is the p-value.tail so that is the p-value.
5.5. Since p = .0294 > .01 we cannot reject Since p = .0294 > .01 we cannot reject
the null hypothesis. the null hypothesis.
Hypothesis TestingHypothesis Testing
Example 6Example 6. A random sample of n = 12 . A random sample of n = 12
graduates of a secretarial school typed on graduates of a secretarial school typed on
the average _the average _
X = 78.2 words per X = 78.2 words per
minute with a standard deviation of s = minute with a standard deviation of s =
7.9 words per minute. 7.9 words per minute.
Hypothesis TestingHypothesis Testing
Assuming that such data can be looked Assuming that such data can be looked
upon as a random sample from a normal upon as a random sample from a normal
population, use the one-sample t test to population, use the one-sample t test to
test the null hypothesis test the null hypothesis = 80 words per = 80 words per
minute against the alternative hypothesis minute against the alternative hypothesis
< 80 words per minute of this secretarial < 80 words per minute of this secretarial
school. Use the .05 level of significance.school. Use the .05 level of significance.
Hypothesis TestingHypothesis Testing
SolutionSolution. We use the p-value approach. . We use the p-value approach.
1. H1. H00: : = 80 = 80
HHAA: : < 80 < 80
2. 2. = .05 _ = .05 _
3.3. t = (X - t = (X - 00)/(s/sqrt(n)) )/(s/sqrt(n))
4. t =(78.2 - 80)/(7.9/sqrt(12)) = -.79. 4. t =(78.2 - 80)/(7.9/sqrt(12)) = -.79.
Hypothesis TestingHypothesis Testing
Degrees of freedom are 12 – 1 = 11. So Degrees of freedom are 12 – 1 = 11. So
from the t table we see that for t = -.79 from the t table we see that for t = -.79
with degrees of freedom 11 there is with degrees of freedom 11 there is
probability > .10 in the left tail (see probability > .10 in the left tail (see
drawing on board). So the p-value is > .10.drawing on board). So the p-value is > .10.
5. So since p >.10 > .05 we 5. So since p >.10 > .05 we
can’t reject the null hypothesis. can’t reject the null hypothesis.
Hypothesis TestingHypothesis Testing
So far we have tested hypotheses about So far we have tested hypotheses about
population means using either the Z or t population means using either the Z or t
tables, depending on what information we tables, depending on what information we
had. If n is large, it is also possible to test had. If n is large, it is also possible to test
hypotheses about population proportions hypotheses about population proportions
using the Z table. using the Z table.
Hypothesis TestingHypothesis Testing
Example 7Example 7. In a random sample of 600 . In a random sample of 600
cars making right turns at a certain cars making right turns at a certain
intersection, 157 pulled into the wrong intersection, 157 pulled into the wrong
lane. Test the claim that 30% of all lane. Test the claim that 30% of all
drivers make this mistake, usingdrivers make this mistake, using
(a)(a) .05 level of significance.05 level of significance
(b)(b) .01 level of significance.01 level of significance
Hypothesis TestingHypothesis Testing
SolutionSolution. (a) We use the traditional approach. (a) We use the traditional approach
1.1. HH00: p = .3 H: p = .3 HAA: p : p .3 .3
2.2. = .05 = .05
3.3. Z = (p - pZ = (p - p00)/sqrt[p)/sqrt[p0 0 (1 – p(1 – p00)/n]. Reject H)/n]. Reject H00 if if
z < -1.96 or z > 1.96z < -1.96 or z > 1.96
4. Z = [(157/600 - .3)]/sqrt[(.3)(.7)/600] 4. Z = [(157/600 - .3)]/sqrt[(.3)(.7)/600] -2.05 -2.05
5. Since –2.05 < -1.96 reject null hypothesis5. Since –2.05 < -1.96 reject null hypothesis
Hypothesis TestingHypothesis Testing
SolutionSolution. (b) We use the traditional approach.. (b) We use the traditional approach.
1.1. HH00: p = .3 H: p = .3 HAA: p : p .3 .3
2.2. = .01 = .01
3.3. Z = (p - pZ = (p - p00)/sqrt[p)/sqrt[p0 0 (1 – p(1 – p00)/n]. Reject H)/n]. Reject H00 if if
z < -2.575 or z > 2.575z < -2.575 or z > 2.5754. Z = [(157/600 - .3)]/sqrt[(.3)(.7)/600] 4. Z = [(157/600 - .3)]/sqrt[(.3)(.7)/600] -2.05 -2.05 5. Since –2.05 > -2.575 can’t reject null 5. Since –2.05 > -2.575 can’t reject null
hypothesishypothesis
Hypothesis TestingHypothesis Testing
NoteNote. The standard normal distribution used in . The standard normal distribution used in the previous example, and in others of its type, the previous example, and in others of its type, will give an accurate result only ifwill give an accurate result only if
pp00 3sqrt[p 3sqrt[p00(1 - p(1 - p00)/n] does not include 0 or 1. )/n] does not include 0 or 1.
In that example n was 600 and pIn that example n was 600 and p00 was .3 so was .3 so
pp00 3sqrt[p 3sqrt[p00(1 - p(1 - p00)/n] = .3 )/n] = .3 3sqrt[(.3)(.7)/600] = 3sqrt[(.3)(.7)/600] =
.3 .3 .017 which does not include 0 or 1 so the .017 which does not include 0 or 1 so the result reported in the example should be result reported in the example should be accurate.accurate.
General Idea of General Idea of Hypothesis TestingHypothesis Testing
Make an initial assumption.Make an initial assumption. Collect evidence (data).Collect evidence (data). Based on the available evidence, decide Based on the available evidence, decide
whether or not the initial assumption is whether or not the initial assumption is reasonable.reasonable.
Generally used tests for Generally used tests for hypotheses testinghypotheses testing
Parametric tests:Parametric tests: Z scoresZ scores t- testt- test F testF test ANOVAANOVA
Non parametric testNon parametric test Chi-square testChi-square test Yate’s correctionYate’s correction The median testThe median test The Mann Whitney testThe Mann Whitney test The Sign testThe Sign test