You are on page 1of 36

Hypothesis Testing

FDP on “Systematic Approach for Academic


Research”
Session – IV
23rd September, 2021

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 1


Dr. R. Venkatamuni Reddy
Professor
Department of Commerce
Manipal Academy of Higher Education (MAHE)
Manipal
Karnataka
rvm.reddy@manipal.edu
Contact: 09686416733

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 2


The Session - Content
 Hypotheses Testing
 Null and Alternative Hypothesis
 P-Value
 Types of Statistical Errors - Basic Concepts
Type I and Type II Errors
 One–tailed and Two–tailed Tests of
Hypotheses

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 3


The Session – Detailed Content
Hypothesis Testing I
One Sample Tests (Large Samples); Introduction; Hypothesis
Testing; Procedure for Hypothesis Testing; One-tail and Two-tail
Tests; Tests Involving a Population Mean; Two-tailed Tests; One-
tailed Test (Left Tail); One-tailed Test (Right Tail); One-tailed Test

Hypothesis Testing II
Two Sample Tests (Large Samples); Sampling Distribution for the
Difference Between Two Sample Means Testing A Distribution of
Difference in Proportions; Two-tailed Test for Differences Between
Two Proportions One-tailed Test for Difference Between Two
Proportions

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 4


The Session – Detailed Content
Hypothesis Testing III
Estimating the Population Mean (Small Samples): Inferences
Concerning a Population Mean; One-third Test; Comparing Two
Population Means; (Small Independent Samples); A paired-Difference
t-Test; (Dependent Samples)
Hypothesis Testing IV- (Comparing Several Proportions) Chi
Square Test
One Sample Test; Steps Involved in the Process; Chi-square Test:
Contingency Tables; Testing Hypothesis for Independence of Two
Categories
Hypothesis Testing V. (Comparing Several Population Means)
One-Way Analysis of Variance (ANOVA)
Rationale Behind Analysis of Variance; Degrees of Freedom; The F-
Distribution; Computation of F; ANOVA Table: A Short-cut Method

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 5


The Session - Learning Objectives
After Attending this session, you should be able to:
Why hypothesis testing is important.

Describe the role of sampling in hypothesis testing.

Identify type I and type II errors and discuss how they

conflict with each other.


Interpret the confidence level, the significance level, and

the power of a test.


Compute and interpret p-values.

Determine the sample size and significance level for a

given hypothesis test.

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 6


Hypothesis - Introduction
 "It is a capital mistake to theorize before you have all the evidence.
It biases the judgements.” by Sherlock Holmes
 The purpose of this type of inference is to determine whether a

certain assumption or hypothesis about a parameter can be justified


by statistical evidence. Our purpose is to make valid decisions about
the population parameters based on the analysis of samples
Example: If a new drug (Covid 19) is introduced to cure a disease and
this drug is tested on a sample of patients, a decision must be made
based upon the response of these patients whether the drug should
be introduced in the general market or not.
*****In order to make these statistical decisions, we make certain
assumptions about the population parameters to be tested. These
assumptions are known as hypotheses.

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 7


Hypothesis - Introduction
 Def. 1: A hypothesis is a claim or statement about some
population characteristic.
 Def. 2: A test of hypothesis is a statistical method to
determine which of two contradictory hypotheses is
correct.
 We will see how to utilize sample information to test
what the value of a population parameter may be . This
type of information is called a test of hypothesis.
 Concerned with asking whether observation (data)
supports prior belief (hypothesis)

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 8


Formats of Hypothesis
 To examine whether any significant differences exists or not
between true values of population parameters and sample
statistics a hypothesis can be stated in the form of “if….then
statements”
 If inflation rate has decreased then wholesale price index will
also decrease
 If employees are healthy, the they may take sick leave less
frequently.
 If terms such as , “positive”, “negative”, “more than” or
“less than” are used to make a statement, then such a
hypothesis is called “directional Hypothesis”, and indicates
the directional relationship between two or more population
under the study with respect to parameter values.

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 9


Formats of Hypothesis
 Ex: i) Greater stress causes lower job satisfaction to employees
in any organization.
ii) Side effects of particular medicine were experienced by less
than 20 percent people.
 Non-Directional Hypothesis : Indicated the relationship but
does not indicate the direction of relationship.
(i.e.) There may be significant relationship between two
population with respect to parameters, even then nothing can
be said whether + or – OR More /Less

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 10


Procedure for Hypothesis Testing
The general procedure for hypothesis testing consists of the
following steps
Step – I : Formulate the null and alternative hypotheses in

terms of the population parameter of interest


Step – II : Establish the level of Significance Prior to

Sampling
Step – III : Determine the critical value of the test statistic.

Step – IV : Select the sample and compute the Suitable test

statistic Determine a Test Statistic


Step – V : Compare the calculated test statistic to the

critical value and reach a conclusion.


01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 11
The Null Hypothesis - Alternate Hypothesis
 Def. : The null hypothesis is denoted by Ho, is a claim asserting no change or
no effect in the state of nature. Unless data provides convincing evidence that
it is false, Ho is accepted.
 Def. : The alternative hypothesis is a statement that contradicts Ho and is

denoted by Ha. It is accepted only if data provides convincing evidence of its


truth.
 A null hypothesis has the form

Ho : Pop. Characteristic = Hypothesized value


An alternative hypothesis has one of these forms:
One-sided alternative:
 Ha : Pop. Characteristic > hypothesized value or

 Ha : Pop. Characteristic < hypothesized value

Two-sided alternative:
 Ha : Pop. Characteristic ≠ hypothesized value

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 12


The Null Hypothesis - Alternate Hypothesis
 To sate a hypothesis test, two opposite statement must be
presented
 The null hypothesis is a statement about the population value that
will be tested. The null hypothesis will be rejected only if the
sample data provide substantial contradictory evidence.
 The alternative (Research) hypothesis is the hypothesis that
includes all population values not covered by the null hypothesis.
The alternative hypothesis is deemed to be true if the null
hypothesis is rejected.
The research hypothesis is the hypothesis the decision maker
attempts to demonstrate to be true. Since this is the hypothesis
deemed to be the most important to the decision maker, it will not
be declared true unless the sample data strongly indicates that it is
true.
01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 13
The p-Values
 The p-value refers to the probability
(assuming the null hypothesis is true) of
obtaining a test statistic at least as extreme
as the test statistic we calculated from the
sample. The p-value is also known as the
observed significance level

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 14


The p-value
 The p-value, which directly depends on a given sample
attempts to provide a measure of the strength of the
results of a test for the null hypothesis, in contrast to a
simple reject or do not reject in the classical approach to
the test of hypotheses. If the null hypothesis is true, and
if the chance of random variation is the only reason for
sample differences, then the p-value is a quantitative
measure to feed into the decision-making process as
evidence. The following table provides a reasonable
interpretation of p-values:

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 15


The p-value

P-value Interpretation

P < 0.01 Very strong evidence against H0

0.01 ≤ P < 0.05 Moderate evidence against H0

0.05 ≤ P < 0.10 Suggestive evidence against H0

0.10 ≤ P Little or no real evidences against H0

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 16


The p-Values
 Steps for Calculating the p-value for a Test of
Hypothesis
1. Determine the value of the test statistic z corresponding to
the result of the sampling experiment.
2. a) If the test is one-tailed, the p-value is equal to the tail
area beyond z in the same direction as the alternative
hypothesis. Thus, if the alternative hypothesis is of the
form >, the p-value is the area to the right of, or above,
the observed z value. Conversely, if the alternative is of
the form <, the p-value is the area to the left of, or below,
the observed z value.

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 17


The p-Values
 b) If the test is two-tailed, the p-value is equal to twice the
tail area beyond the observed z value in the direction of the
sign of z. That is, if z is positive, the p-value is twice the
area to the right of, or above, the observed z value.
Conversely, if z is negative, the p-value is twice the area to
the left of, or below, the observed z value.
Reporting Test Results as p-values: How to Decide whether
to Reject Ho
1. Choose the maximum value of that you are willing to
tolerate.
2. If the observed significance level(p-value) of the test is less
than the chosen value of ‘’ , reject the null hypothesis.
Otherwise, do not reject the null hypothesis.
01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 18
The p-Values
 The smallest test level that is significant u se
beca 5
– Often provided by computer analysis nt , 0 .0
a
fic tha n
n i
 Ex:p = 0.0297 Sig is less
it
 Tells the strength of the evidence against H0
– Small p value says data unlikely to come from H0
ru e,
– Reject H0 if p is small enough er e t
w
 Not significant (p > 0.05) i f H 0
o u ld
t h at t a w ing
 Significant (p < 0.05) a ys r d a p ris
r
S you be su
 Highly significant (p < 0.01)
not
 Very highly significant (p < 0.001)

– What if p = 0.374? Not significant because p > 0.05


01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 19
Relationship Between the p-Value and
the Rejection Region

Rejection region
 = 0.10

p-value = 0.0036
0.5 0.4

0 z  1.28
z  2.69
z
  25 x  25.48 x  26

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 20


Test Levels: 5% and others
 Set the probability of wrongly rejecting the null hypothesis H0 when
it is true (Type I error rate)
 t table columns correspond to different test levels

– The usual standard is the 5% test level


 Corresponds to 95% confidence interval

 If H is rejected, the result is significant (p<0.05)


0

– Can also test at the 1% test level (99% confidence interval)


If H0 is rejected, the result is highly significant (p<0.01)

– Because the evidence against the null hypothesis is


stronger
– And at the 0.1% test level (99.9% confidence interval)
 If H is rejected, the result is very highly significant (p<0.001)
0

– And, sometimes, at the 10% test level (90% CI)

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 21


Type I and Type II Error
 Two types of errors are possible when making the decision
whether to reject H0
– Type I error - reject H0 when it is true.
– Type II error - do not reject H0 when it is false.

Accept H0 Reject H0
H0 True Correct Decision Type I Error
H0 False Type II Error Correct Decision

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 22


Type I and Type II Error
 The power of the test is the probability that the
hypothesis test will reject the null hypothesis
when the null hypothesis is false.
P(Type I error) = P(Reject H0 | H0 is true) = 
a is called the size or significance level of the test
 P(Type II error) = P(Do not reject H0 | H0 is false)

=
(1– ) is called the power of the test
 Good tests have large power (close to unity) and

small size (close to zero).

Power = 1 - 
01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 23
Type I and Type II Error
 Make one of the following two decisions (based on the
test):
– Reject the null hypothesis in favor of the alternative
hypothesis.
– Do not reject the null hypothesis.
 Two types of errors are possible when making the
decision whether to reject H0
– Type I error - reject H0 when it is true.
– Type II error - do not reject H0 when it is false.
Accept H0 Reject H0
H0 True Correct Decision Type I Error
H False
0
01/02/22
Type II Error Correct Decision
Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 24
Critical Value and Significance Level
 The critical value is the value of a statistic
corresponding to a given significance level. This
cutoff value determines the boundary between the
samples resulting in a test statistic that leads to
rejecting the null hypothesis and those that lead to a
decision not to reject the null hypothesis.
 The significance level is the maximum probability of
committing a Type I statistical error. The probability
is denoted by the symbol .
 The test statistic is a function of the sampled
observations that provides a basis for testing a
statistical hypothesis
01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 25
One-tailed and Two tailed hypothesis test

 A one-tailed hypothesis test is a test in


which the entire rejection region is located
in one tail of the test statistic’s distribution.
 A two-tailed hypothesis test is a test in
which the rejection region is split between
the two tails of the test statistic’s
distribution.

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 26


One-tailed and Two tailed hypothesis test
 A one-tailed hypothesis test is a test in which the entire
rejection region is located in one tail of the test statistic’s
distribution.
 A two-tailed hypothesis test is a test in which the rejection
region is split between the two tails of the test statistic’s
distribution.
 If we wish to establish that the population mean is less than
some value 0, then the alternative hypothesis is H0 : 0
and the hypothesis test is called a lower-tailed hypothesis test.
 If the alternative hypothesis is H0 : 0 then the hypothesis
test is called an upper-tailed hypothesis test.
 If the alternative hypothesis is then the hypothesis is H0 : ≠
0 test is called a two-tailed hypothesis test

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 27


Steps for Selecting the Null and
Alternative Hypothesis
 Select the alternative hypothesis as that which the sampling
experiment is intended to establish. The alternative
hypothesis will assume one of three forms
A) One-tailed, upper-tailed Ex: Ha : 0
B) One-tailed, lower-tailed Ex: Ha : 0
C) Two-tailed Ex: Ha : ≠ 0
 Select the null hypothesis as the status quo, that which will
be presumed true unless the sampling experiment
conclusively establishes the alternative hypothesis. The null
hypothesis will be specified as that parameter value closest
to the alternative in one-tailed tests, and as the
complementary(or only unspecified) value in two-tailed
tests.
01/02/22
Example: H0 : 0
Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 28
Rejection Regions for Common Values of 

Alternative Hypotheses

Lower-Tailed Upper-tailed Two-Tailed

 Z<-1.28 Z>1.28 Z<-1.645 or Z>1.645

 Z<-1.645 Z>1.645 Z<-1.96 or Z>1.96

 Z<-2.33 Z>2.33 Z<-2.575 or Z>2.575

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 29


Large-Sample Test of Hypothesis About A
Population Mean(
One-Tailed Test Two-Tailed Test
H0: µ = 0 H0: µ = 0

Ha : 0 OR Ha : 0 Ha : ≠0

Test Statistic: z = ( X - 0 


(X )
Test Statistic: z = (X - 0 ( X )

Reject region: z< - z Rejected region: IzI> z / 2


OR z> z
 when Ha : 0
Where z
 is chosen so that (z> z )= Where is chosen so that P( z  z / 2 )   / 2
Assumptions: No assumptions need to be made about the probability distribution of the
population because the Central Limit Theorem assures us that, for large samples, the test
statistic will be approximately normally distributed regardless of the shape of the
underlying probability distribution of the population.
Note: 0 is the symbol for the numerical value assigned to  under the null hypothesis.

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 30


Hypothesis Tests for Two Population
Variances

Format 3
Two-Tailed Upper One- Lower One-
Test Tailed Test Tailed Test
 12  12  12
H0 : 2  1 H0 : 2  1 H0 : 2  1
2 2 2
 12  12  12
HA : 2 1 HA : 2 1 HA : 2 1
2 2 2

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 31


Example for Two Tailed Test
Ex 1: The average speed of fast bowlers from an academy is 120 km/hr and the
standard deviation is 12 km/hr. However, a new coach tends to believe that this has
changed, so he decides to have a bowling session to test the speed of 100 random
bowlers in the academy. The average speed of the sample comes out to be 130
km/hr. Is there enough evidence to suggest that the average speed has changed?
Check at 5% level of significance.
Answer:

H0 = the average speed is the same (μ = 120)


H1 = the average speed has changed (μ ≠ 120)
Ex 2: A company is engaged in the packaging of a superior quality tea in jars of 500
gm each. The company is of the view that as long as jars contain 500 gm of tea, the
process is in control. The standard deviation is 50 gm. A sample of 225 jars is taken
at random and the sample average is found to be 510 gm. Has the process gone out
of control?
Answer:
H : The process is under control. (µ = 500gm)
0

H : The process is under control. (µ ≠ 500 gm)


1

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 32


Example for One Tailed Test - Right
 One tailed (right tailed) : A high-end computer manufacturer sets the retail cost
of their computers based in the manufacturing cost, which is $1800. However,
the company thinks there are hidden costs and that the average cost to
manufacture the computers is actually much more. The company randomly
selects 40 computers from its facilities and finds that the mean cost to produce a
computer is $1950 with a standard deviation of $500. Run a hypothesis test to
see if this thought is true.
 H0: μ ≤ 1800
H1: μ > 1800
 One tailed (right tailed): A principal at a certain school claims that the students
in his school are above average intelligence. A random sample of 30 students IQ
scores have a mean score of 112. Is there sufficient evidence to support the
principal’s claim? The mean population IQ is 100 with a standard deviation of
15. IQ scores are normally distributed.
 H0 : µ ≤ 100
 H1 : µ ≥ 100

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 33


Example for One Tailed Test - Left
 Ex: Participants ……………..

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 34


Summary of the Today Session
 In this session , we introduced the important ideas of statistical hypothesis
testing. We discussed the philosophy behind hypothesis tests, starting with
the concepts of null hypothesis and alternative hypothesis. Depending on the
type of null hypothesis, the rejection occurred either on one or both tails of
the test statistic. Correspondingly, the test became either a one-tailed test or a
two-tailed test. In any test, we saw that there will be chances for type I and
type II errors. We saw how the p-value is used in an effort to systematically
contain the chances of both types of error. When the p-value is less than the
level of significance a, the null hypothesis is rejected. The probability of not
committing a type I error is known as the confidence level, and the
probability of not committing a type II error is known as the power of the
test. We also saw how increasing the sample size decreases the chances of
both types of errors. In connection with pretest decisions we saw the
compromise between the costs of type I and type II errors. These cost
considerations help us in deciding the optimal sample size and a suitable level
of significance a. In the next chapter we extend these ideas of hypothesis
testing to differences between two population parameters.

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 35


Thank You

01/02/22 Dr. R. Venkatamuni Reddy - Professor - Econometrics and Statistics 36

You might also like