0% found this document useful (0 votes)
49 views46 pages

Hypothesis Testing: Prof. Anjali Kulkarni

- The document discusses hypothesis testing, explaining that a hypothesis is a claim that has not yet been proven true about a population parameter or distribution. - It defines key terms like the null hypothesis (H0), alternative hypothesis (H1), level of significance, one-tailed and two-tailed tests. - The steps of hypothesis testing are outlined: state hypotheses, choose significance level and sample size, determine test statistic, find critical values, collect/analyze data, and make a decision to reject or fail to reject the null hypothesis.

Uploaded by

Dhara Tandon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views46 pages

Hypothesis Testing: Prof. Anjali Kulkarni

- The document discusses hypothesis testing, explaining that a hypothesis is a claim that has not yet been proven true about a population parameter or distribution. - It defines key terms like the null hypothesis (H0), alternative hypothesis (H1), level of significance, one-tailed and two-tailed tests. - The steps of hypothesis testing are outlined: state hypotheses, choose significance level and sample size, determine test statistic, find critical values, collect/analyze data, and make a decision to reject or fail to reject the null hypothesis.

Uploaded by

Dhara Tandon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

HYPOTHESIS 

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

The Null Hypothesis, H0


• States the claim or assertion to be tested
Example: The average number of TV sets in Indian
Homes is equal to three ( )
• Is always about a population parameter, not
about a sample statistic
PROF. ANJALI KULKARNI 6

The Null Hypothesis, H0


(continued)

• Begin with the assumption that the null hypothesis


is true
• Similar to the notion of innocent until
proven guilty

• Refers to the status quo or historical value


• Always contains “=” , “≤” or “” sign
• May or may not be rejected
PROF. ANJALI KULKARNI 7

The Alternative Hypothesis, H1


• Is the opposite of the null hypothesis
• e.g., The average number of TV sets in Indian homes is not equal to 3
( H 1: μ ≠ 3 )
• Challenges the status quo
• May or may not be proven
• Is generally the hypothesis that the researcher is trying to prove

• 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)

• Suppose the sample mean age was X = 20.

• This is significantly lower than the claimed mean


population age of 50.

• If the null hypothesis were true, the probability of getting such


a different sample mean would be very small, so you reject the
null hypothesis .

• In other words, getting a sample mean of 20 is so unlikely if


the population mean was 50, you conclude that the population
mean must not be 50.
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

“Too Far Away” From Mean of Sampling Distribution


PROF. ANJALI KULKARNI 13

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.

Ho: μ = 1000 (NH) If sample mean falls in this


region , we would accept
H1: μ < 1000 (AH)
null hypothesis

If sample mean falls in this region ,


we would reject null hypothesis

μ H0

Left tail or lower tail test


PROF. ANJALI KULKARNI 18

One tail test- Monthly expenditure should be kept at 100 on an average.


Ho: μ = 100 (NH)
H1: μ > 100 (AH)
If sample mean falls in this
region , we would accept If sample mean falls in this
null hypothesis region , we reject null
hypothesis

μ H0
Right tail test
PROF. ANJALI KULKARNI 19

Let the mean life of bulb μ = μHo = 1000 (NH)


μH1 = 1000 (AH)
TWO TAIL TEST

If sample mean falls in this


region , we would accept
null hypothesis

μ H0

If sample mean falls in


either of these regions , we
would reject null
hypothesis
PROF. ANJALI KULKARNI 20

Hypothesis Testing Example


Test the claim that the true mean # of TV sets in Indian
homes is equal to 3.
(Assume σ = 0.8)

1. State the appropriate null and alternative hypotheses


n H0: μ = 3 H1: μ ≠ 3 (This is a two-tail test)
2. Specify the desired level of significance and the sample
size
n Suppose that  = 0.05 and n = 100 are chosen for this

test
PROF. ANJALI KULKARNI 21

Hypothesis Testing Example


(continued)

3. Determine the appropriate technique


n σ is assumed known so this is a Z test.

4. Determine the critical values


n For  = 0.05 the critical Z values are ±1.96

5. Collect the data and compute the test statistic


n Suppose the sample results are
n = 100, X = 2.84 (σ = 0.8 is assumed known)
So the test statistic is:
PROF. ANJALI KULKARNI 22

Hypothesis Testing Example


(continued)
• 6. Is the test statistic in the rejection region?

/2 = 0.025 /2 = 0.025

Reject H0 if Reject H0 Do not reject H0 Reject H0


ZSTAT < -1.96 or -Zα/2 = -1.96 0 +Zα/2 = +1.96
ZSTAT > 1.96;
otherwise do not
reject H0 Here, ZSTAT = -2.0 < -1.96, so the
test statistic is in the rejection region
PROF. ANJALI KULKARNI 23

Hypothesis Testing Example


(continued)
6 (continued). Reach a decision and interpret the result

 = 0.05/2  = 0.05/2

Reject H0 Do not reject H0 Reject H0

-Zα/2 = -1.96 0 +Zα/2= +1.96


-2.0
Since ZSTAT = -2.0 < -1.96, reject the null hypothesis and
conclude there is sufficient evidence that the mean number of
TVs in Indian homes is not equal to 3
PROF. ANJALI KULKARNI 24

Ex: Mean thickness of aluminum sheet (μ) =.04, σ = 0.004


n= 100, X = 0.0408

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 H0 .04 Reject H0

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

Possible Hypothesis Test Outcomes


Actual Situation
Decision H0 True H0 False
Accept H0 No Error Type II Error
Probability 1 - α Probability β
Reject H0 Type I Error No Error
Probability α Probability 1 - β
Hypothesis Tests for the Mean

Hypothesis
Tests for 

 Known  Unknown
(Z test) (t test)
Z Test of Hypothesis for the Mean (σ Known)

• Convert sample statistic ( X) to a ZSTAT test statistic


Hypothesis
Tests for 

σ Known
Known σ Unknown
Unknown
(Z test) (t test)
The test statistic is:
Hypothesis Testing:σ Unknown

• If the population standard deviation is unknown, you instead


use the sample standard deviation S.

• Because of this change, you use the t distribution instead


of the Z distribution to test the null hypothesis about the
mean.

• When using the t distribution you must assume the


population you are sampling from follows a normal
distribution.

• All other steps, concepts, and conclusions are the same.


t Test of Hypothesis for the Mean (σ Unknown)

n Convert sample statistic ( X ) to a tSTAT test statistic


Hypothesis
Tests for 

σ 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

•  = 0.05 Reject H0 Do not reject H0 Reject H0


t 24,0.025
-t 24,0.025 0
• n = 25, df = 25-1=24 -2.0639 1.46
2.0639
•  is unknown, so 
    use a t statistic
• Critical Value: 
     ±t24,0.025 = ± 2.0639 Do not reject H0: insufficient evidence that true 
mean cost is different than Rs.168
Connection of Two Tail Tests to
Confidence Intervals
n For X = 172.5, S = 15.40 and n = 25, the 95% confidence
interval for µ is:

172.5 - (2.0639) 15.4/ 25 to 172.5 + (2.0639) 15.4/ 25

166.14 ≤ μ ≤ 178.86

n Since this interval contains the Hypothesized mean (168), we


do not reject the null hypothesis at  = 0.05
One-Tail Tests
• In many cases, the alternative hypothesis focuses on a
particular direction

This is a lower-tail test since the


H0: μ ≥ 3
alternative hypothesis is focused on the
H1: μ < 3 lower tail below the mean of 3

H0: μ ≤ 3 This is an upper-tail test since the


alternative hypothesis is focused on the
H1: μ > 3
upper tail above the mean of 3
Lower-Tail Tests
H0: μ ≥ 3
n There is only one H1: μ < 3
critical value, since the
rejection area is in only a
one tail

Reject H0 Do not reject H0


Z or t
-Zα or -tα 0

μ 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

Do not reject H0 Reject H0


Z or t Zα or tα
0
_
X μ

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)

Form hypothesis test:


H0:????????????
H1:????????
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
52 per month. The company wishes to test this claim.
(Assume a normal population)

Form hypothesis test:


H0: μ ≤ 52 the average is not over Rs 52 per month
H1: μ > 52 the average is greater than Rs 52 per month
(i.e., sufficient evidence exists to support the
manager’s claim)
Example: Find Rejection Region
(continued)
Suppose that  = 0.10 is chosen for this test and n = 25.
Find the rejection region:
Reject H0

 = 0.10

Do not reject H0 Reject H0


0 1.318

Reject H0 if tSTAT > 1.318


Since this is a case of one tail look at value under 0.90 in ‘t’ table: Ref table from Stephan
Example: Test Statistic
(continued)
Obtain sample and compute the test statistic

Suppose a sample is taken with the following results: n = 25, X


= 53.1, and S = 10

• Then the test statistic is:


Example: Decision
(continued)
Reach a decision and interpret the result:
Reject H0

 = 0.10

Do not reject H0 Reject H0


1.318
0
tSTAT = 0.55

Do not reject H0 since tSTAT = 0.55 ≤ 1.318


there is not sufficient evidence that the
mean bill is over Rs 52
PROF. ANJALI KULKARNI 44

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.

You might also like