Hypothesis Testing: Prof. Anjali Kulkarni
Hypothesis Testing: Prof. Anjali Kulkarni
TESTING
PROF. ANJALI KULKARNI
PROF. ANJALI KULKARNI 2
Hypothesis
• A thesis is some thing that has been proven to be
true.
• A hypothesis is something that has not yet been
proven to be true. It is some statement about a
population parameter or about a population
distribution.
PROF. ANJALI KULKARNI 3
What is a Hypothesis?
• A hypothesis is a claim
(assertion) about a
population parameter:
• population mean
Example: The mean monthly cell phone bill in
this city is μ =Rs.2000
• population proportion
Example: The proportion of adults in this city
with cell phones is π = 0.85
PROF. ANJALI KULKARNI 4
Terminology….
• Null hypothesis: Null hypothesis is a statistical
hypothesis that assumes that the observation is due to a
chance factor. Null hypothesis is denoted by;
H0: μ1 = μ2, which shows that there is no difference
between the two population means.
• Alternative hypothesis: Contrary to the null hypothesis,
the alternative hypothesis shows that observations are the
result of a real effect. Denoted by Ha.
• Level of significance: Refers to the degree of
significance in which we accept or reject the null-
hypothesis. 100% accuracy is not possible for accepting
or rejecting a hypothesis, so we therefore select a level of
significance that is usually 5%.
PROF. ANJALI KULKARNI 5
• Ex: H0: μ= 100 (the null hypothesis is that the population mean is 100)
H1: μ ≠ 100
H1: μ > 100
H1: μ < 100
The Hypothesis Testing Process
• Claim: The population mean age is 50.
• H0: μ = 50, H1: μ ≠ 50
• Sample the population and find sample mean.
Population
Sample
The Hypothesis Testing Process (continued)
Sampling
Distribution of X
X
20 μ = 50
If H0 is true ... then you reject
If it is unlikely that you
the null hypothesis
would get a sample
that μ = 50.
mean of 20. When in fact 50 was the
population mean…
The Test Statistic and
Critical Values
• If the sample mean is close to the assumed population mean, the
null hypothesis is not rejected.
• If the sample mean is far from the assumed population mean, the
null hypothesis is rejected.
• How far is “far enough” to reject H0?
• The critical value of a test statistic creates a “line in the sand” for
decision making - it answers the question of how far is far enough.
The Test Statistic and Critical Values
Sampling Distribution of the test statistic
Region of Region of
Rejection Rejection
Region of
Non-Rejection
Critical Values
Steps of Hypothesis Testing
1. State the Null Hypothesis H0 and the alternative
hypothesis H1.
2 . Choose the level of significance, α and the sample size.
The significance level, also denoted as alpha or α, is the
probability of rejecting the null hypothesis when it is true.
For example, a significance level of 0.05 indicates a 5% risk
of concluding that a difference exists when there is no
actual difference.
3. Determine the appropriate test statistic and sampling
distribution: t or z test.
4. Determine the critical values that decide the rejection or
acceptance regions.
PROF. ANJALI KULKARNI 14
Graphical depiction
PROF. ANJALI KULKARNI 15
Steps of Hypothesis Testing…
5. Collect data and compute the value of the test statistic
6. Make the statistical decision and state the managerial
conclusion. If the test statistic falls into the non rejection
region, do not reject the null hypothesis H0. If the test
statistic falls into the rejection region, reject the null
hypothesis. Express the managerial conclusion in the context
of the problem
PROF. ANJALI KULKARNI 16
Tests
• One-tailed test: When the given statistical
hypothesis is one value like H0: μ1 = μ2, it is
called the one-tailed test.
• Two-tailed test: When the given statistics
hypothesis assumes a less than or greater than
value, it is called the two-tailed test.
PROF. ANJALI KULKARNI 17
One tail test- A wholesaler that buys bulb would not accept if
life is less than 1000.
μ H0
μ H0
Right tail test
PROF. ANJALI KULKARNI 19
μ H0
test
PROF. ANJALI KULKARNI 21
= 0.05/2 = 0.05/2
Z = (0.0408-0.04)/0.0004 = 2
0.04+- (2)* (0.0004)
=0.0392 and 0.0408
= 2.25 = 2.25
95.5
Reject company’s
claim that population .0392 .0408
mean is .04 Sample mean
Possible Errors in Hypothesis Test Decision Making
• Type I Error
• Reject a true null hypothesis
• Considered a serious type of error
• The probability of a Type I Error is
• Called level of significance of the test
• Set by researcher in advance
• Ex: time and trouble to correct medicine (TI) or allow to go in market (TII)
• Ex: T1 rework on tractor at plant (TI), let dealer repair (TII).
• Type II Error
• Failure to reject false null hypothesis
• The probability of a Type II Error is β
Possible Errors in Hypothesis Test Decision Making
Hypothesis
Tests for
Known Unknown
(Z test) (t test)
Z Test of Hypothesis for the Mean (σ Known)
σ Known
Known σ Unknown
Unknown
(Z test) (t test)
The test statistic is:
Hypothesis Testing:σ Unknown
σ Known
Known σ Unknown
Unknown
(Z test) (t test)
The test statistic is:
Example: Two-Tail Test
( Unknown)
The average cost of a hotel room in
New Delhi is said to be Rs168 per
night. To determine if this is true, a
random sample of 25 hotels is taken
and resulted in an X of Rs 172.50 and
an S of Rs.15.40. Test the appropriate
hypotheses at = 0.05.
H0: μ = 168 H1: μ = 168
(Assume the population distribution is normal)
Example Solution:
Two-Tail t Test
H0: μ = 168 H1: μ ¹
168
/2=.025 /2=.025
166.14 ≤ μ ≤ 178.86
μ X
Critical value
Upper-Tail Tests
H0: μ ≤ 3
n There is only one
critical value, since the H1: μ > 3
rejection area is in only
a
one tail
Critical value
Example: Upper-Tail t Test
for Mean ( unknown)
A phone industry manager thinks that customer monthly
cell phone bills have increased, and now average over Rs
520 per month. The company wishes to test this claim.
(Assume a normal population)
= 0.10
= 0.10
t- Distribution (also known as Student’s t)
• The t distribution is used
instead of the normal
distribution when you have
small samples.
• The larger the sample size,
the more the t distribution
looks like the normal
distribution. In fact, for
sample sizes larger than 20
(e.g. more degrees of
freedom), the distribution is
almost exactly like the
normal distribution.
PROF. ANJALI KULKARNI 45
Properties of t-distribution
1. The t-distribution like Z distribution, is unimodal,
symmetric about mean 0, and the t variable varies from
-∝ and ∝.
2. The t-distribution is defined by the degrees of
freedom v = n-1, the df associated with the distribution
are the df associated with the sample standard
deviation.
3. The t-distribution has no mean for n = 2 i.e. for v = 1
and no variance for n ≤ 3 i.e. for v ≤ 2. However, for v
>1, the mean and for v > 2, the variance is given as
E(T) = 0 Var(T) =v/ (v − 2)
PROF. ANJALI KULKARNI 46
Properties of t-distribution
4. The variance v/ (v − 2)of the t-distribution must always
be greater than 1, so it is more variable as against Z
distribution which has variance 1. while Z values vary from
sample to sample owing to the change in the X alone, the
variation in T values are due to changes in both X and S.
5.The variance of t-distribution approaches 1 as the sample
size n tends to increase. In general, for n ≥ 30, the variance
of t-distribution is approximately the same as that of Z
distribution.