Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Quantitative Methods

MM ZG515 / QM ZG515

L10: Hypothesis Testing


BITS Pilani Srinivas Kota
WILPD
Scope of this lecture
• Hypothesis testing methodology
• Z test of Hypothesis for the mean (σ known)
• t test of Hypothesis for the mean (σ unknown)
• Z test of Hypothesis for the proportion

2 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD


What is a Hypothesis
• assumption
• mean or proportion
• identified before analysis
• determine whether there is enough statistical evidence in favor
of a certain belief about a parameter

There are two hypotheses (about a population parameter(s))

H0 - the null hypothesis

H1 - the alternative hypothesis

3 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD


The Null Hypothesis, H0

• States the Assumption (numerical) to be tested


e.g. The average no. of TV sets in US homes is at least 3
(H0: μ 3)

• Begin with the assumption that the null hypothesis is TRUE


• Always contains the ‘ = ‘ sign
• The Null Hypothesis may or may not be rejected

4 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD


The Alternative Hypothesis, H1

• Is the opposite of the null hypothesis


e.g. The average no. of TV sets in US homes is less than 3
(H1: < 3)

• Never contains the ‘=‘ sign


• The Alternative Hypothesis may or may not be accepted

5 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD


Identify the Problem

Steps:
• State the Null Hypothesis (H0: 3)
• State its opposite,
the Alternative Hypothesis (H1: < 3)

• Hypotheses are mutually exclusive & exhaustive


• Sometimes it is easier to form the alternative hypothesis
first

6 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD


Key Points
• The null hypothesis, represents the current belief in a situation
• The alternative hypothesis, is the opposite of the null hypothesis and
represents a research claim or specific inference you would like to prove
• If you reject the null hypothesis, you have statistical proof that the
alternative hypothesis is correct
• If you do not reject the null hypothesis, you have failed to prove the
alternative hypothesis. The failure to prove the alternative hypothesis,
however, does not mean that you have proven the null hypothesis
• The null hypothesis, always refers to a specified value of the population
parameter, not a sample statistic
• The statement of the null hypothesis always contains an equal sign
regarding the specified value of the population parameter
• The statement of the alternative hypothesis never contains an equal sign
regarding the specified value of the population parameter

7 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD


Hypothesis Testing Process

Assume the population


mean age is 50.
(Null Hypothesis) Population

Not likely!
The Sample
REJECT
Mean Is 20
Null Hypothesis
Sample

8 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD


Reason for Rejecting H0

Sampling Distribution

It is unlikely that Therefore, we reject


we would get a the null hypothesis
sample mean of that = 50
this value ...
if in fact this were
the population mean.

20 = 50 Sample Mean
H0

9 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD


Level of Significance, 

• Defines unlikely values of sample statistic if Null Hypothesis


is True
― called Rejection Region of Sampling Distribution

• Designated (alpha)
― Typical values are 0.01, 0.05, 0.10

• Selected by the Researcher at the Start


• Provides the Critical Value(s) of the Test

10 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD


Level of Significance, and the Rejection Region

H0: Critical
Value(s)
H1: <3
Rejection 0
H0: 3 Regions

H1: >3
0 /2
H0: =3
H1: 3
0

11 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD


Errors in Making Decisions

• When using a sample statistic to make decisions about a


population parameter, there is a risk that you will reach an
incorrect conclusion.

368 gm z

Weight of cereal

12 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD


Errors in Making Decisions
• Type I Error
• Rejected True Null Hypothesis which should not be rejected
• Has Serious Consequences
• Probability of Type I Error Is 𝛼 (risk level specified before)
o Called Level of Significance

o Confidence coefficient is 1 𝛼
• Type II Error
• Not Rejected False Null Hypothesis
• Probability of Type II Error Is 𝛽
• difference between hypothesized and the actual population value
• Power of a statistical test is 1 𝛽

13 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD


Type I and Type II Error

Actual decision
Statistical decision
Ho is true Ho is false
Correct decision Type II error
Not rejected Ho
Confidence = 1 𝛼 Probability = 𝛽
Type I error Correct decision
Rejected Ho
Probability = 𝛼 Power = 1 𝛽

If true population mean is 330gm. Then 𝛽 is small that we conclude


mean has not changed from 368gm.

14 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD


Factors Affecting Type II Error, 

• True Value of Population Parameter


― Increases when difference between Hypothesized
parameter & True value decreases
• Significance Level ( )
• Increases when Decreases
• Sample Standard Deviation (s)
― Increases when s Increases

• Sample Size (n)


― Increases when n Decreases

15 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD


Hypothesis Testing: Steps
Assumption: The true mean no. of TVs in Indian homes is at least 3.
1. State H0 H0 : 3
2. State H1 H1 : 3
3. Choose = .05
4. Choose n n = 100
5. Choose Test Z Test
6. Set Up Critical Value(s) Z = -1.645
7. Collect Data 100 households surveyed
8. Compute Test Statistic Computed Test Statistic = -2
9. Make Statistical Decision Reject Null Hypothesis
10. Express Decision The true mean no. of TVs is less
than 3 in Indian households
16 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD
Hypothesis Testing
• A hypothesis is an assumption regarding a parameter
• Hypothesis Testing is a formal statistical procedure to accept or reject the
hypothesis
• The null hypothesis, H0 , is an assumption about the parameter.
• The alternative hypothesis, H1, is the opposite of H0.
• The testing procedure samples the population to test the two competing
statements H0 and H1.
• Given the Null Hypothesis H0 and the Alternative Hypothesis H1
• Data is collected to see whether H0 can be rejected
• There are two possible conclusions
1. There is enough evidence to reject H0 (and accept H1), or
2. There is not enough evidence to reject H0
• In which situation will a decision be made?
• Usually that situation will suggest H1

17 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD


Hypothesis Testing: Developing Hypotheses
A new teaching method is developed that is claimed to be better
• H1: The new teaching method is better
• H0 : The new method is no better than the old method

A new drug is developed to lower blood sugar more than the existing drug
• H1 : The new drug lowers blood sugar more than the existing drug
• H0 : The new drug does not lower blood sugar more than the existing drug

The label on a coffee states that it contains 500g. For the Consumer Forum
• H0 : The label is correct. μ ≥ 500g
• H1 : The label is incorrect. μ < 500g

The label on a coffee can states that it contains 500g. For the Quality Inspector
• H0 : The label is correct. μ = 500g
• H1 : The label is incorrect. μ ≠ 500g
18 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD
Forms for Null and Alternative Hypotheses
• The equality part of the hypotheses always appears in the null hypothesis.
• H0 and Ha take one of the following three forms:
• H0: μ ≥ μ0 & H1: μ < μ0, One-Tailed Test (Lower Tail or Left Tail)
• H0: μ ≤ μ0 & H1: μ > μ0, One-Tailed Test (Upper Tail or Right Tail)
• H0: μ = μ0 & H1: μ ≠ μ0, Two-Tailed Test
• μ0 is the hypothesized value of the population mean
• The CFO will shut down production if he feels μ > 12 liters
• The volume dispensed is a random variable. So some bottles have less than 12
liters and others have more. Chances are that no bottle has exactly 12 liters of
water
• Since hypothesis tests are based on sample data, there is the possibility of errors
• Type I Error: The calibration is prefect. But the average of the sample of 36
bottles is much greater than 12 liters. Production is shut down But actually
nothing was wrong
• Type II Error: The machine is in a bad shape and almost every bottle contains
much more than 12 liters.. But the sample average is less than 12 liters – since
the volume dispensed is random

19 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD


Type I and Type II Errors
• A Type I error is rejecting H0 when it is true.
• The probability of making a Type I error when the null hypothesis is true as
an equality is called the level of significance.
• In this course we will control only the Type I error.
• Such tests are also called significance tests.

• A Type II error is accepting H0 when it is false.


• It is difficult to control for the probability of making a Type II error.
• We will avoid the risk of making a Type II error by using “do not reject H0”
and not “accept H0”.

20 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD


Three approaches for testing Hypothesis
• Critical Value Approach
o If the test statistic falls into the nonrejection region, you do not reject
the null hypothesis.
o If the test statistic falls into the rejection region, you reject the null
hypothesis
o This is more intuitive

• p-value Approach
o If the p-value is greater than or equal to α (p≥α), then do not reject the
null hypothesis.
o If the p-value is less α (p<α), then reject the null hypothesis

• Confidence Intervals
o If the hypothesized value is contained within the interval, you do not
reject the null hypothesis
o If the hypothesized value does not fall into the interval, you reject the
null hypothesis
21 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD
Hypothesis Testing: Example
Ozone sells 12 litre bottles of mineral water. Vice president (operations) believes
that excess water is being dispensed. If that is the case, he wants to shut down
production for a major overhaul of the machinery. 36 bottles were sampled, and
the mean volume of water was found to be 12.17. The population standard
deviation is believed to be 0.6 liters.

α=0.05

22 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD


The p-value Approach
1. The hypotheses: H0: μ ≤ 12 Vs H1: μ > 12
2. Data: n = 36, 𝑋 ̅ = 12.17,  = 0.6, α = 5%
3. Right-Tail Test (or Upper Tail Test)
p-value
4. Sampling Distribution: Since n ≥ 30, = 0.0446

(𝑋 ̅−𝜇)/(𝜎⁄√𝑛) = (𝑋 ̅−12)/(0.6/√36) ~ N(0, 1)


5. Test Statistic: (12.17 −12)/(0.6/√36) = 1.7
6. p –value: P(Z > 1.7) = 0.0446 z
0 1.7
7. Since p-value = 0.0446 < α = .05, we reject
H0 .

There is sufficient statistical evidence to infer


that the process is not meeting goal of 12 litres
or less.

25 01-10-2022 MMZG515 / QMZG515 Quantitative Methods BITS Pilani, WILPD

You might also like