0% found this document useful (0 votes)
6 views

Hypothesis testing Ajay

Uploaded by

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

Hypothesis testing Ajay

Uploaded by

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

HYPOTHESIS TESTING

My sincere thanks to -: Mrs. Kiran Soni,


Assistant Professor
Hypothesis testing-- Ajay Gupta 1
Inferential Statistics

• Inferential statistics to make judgments of


the probability that an observed difference
between groups is a dependable one or
one that might have happened by chance.

Hypothesis testing-- Ajay Gupta 2


Sampling Variation

• Research done on samples and not on populations.

• Variability of observations occur among different samples.

• This complicates whether the observed difference is due


to
sampling variation or variation due to some assignable
reason.

• To conclude actual difference, we use tests of significance

Hypothesis testing-- Ajay Gupta 3


Sampling Distribution
Let there is a population of four values i.e
8,2,6,4
Population mean = 5
Sample values sample mean
8,2 5
8,6 7
8,4 6
2,6 4
2,4 3
6,4 5
Mean of means = 5
standard deviation of means is lesser than
standard deviation of individual numbers
There are two main methods used in
inferential statistics:

• Estimation
• Hypothesis testing
(Test of significance)

Hypothesis testing-- Ajay Gupta 5


What is Hypothesis
• A Hypothesis is the statement or an
assumption about relationships between
variables.
or

• A Hypothesis is a tentative explanation for


certain behaviors, phenomenon or
events that have occurred or will occur.
Hypothesis testing-- Ajay Gupta 6
Interesting Hypothesis
• Bankers assumes high-income earners
are more profitable than low-income
earners.
• Boys and girls are equally intelligent
• Happiness in life is proportional to
money/Intelligence/beauty
• Looks are more important than
intelligence for happier life.
Hypothesis testing-- Ajay Gupta 7
Criteria for Hypothesis Construction

• It should be empirically testable, whether it


is right or wrong.
• It should be specific and precise.
• The statements in the hypothesis
should not be contradictory.
• It should specify variables between which
the relationship is to be established.
• It should describe one issue only.
Hypothesis testing-- Ajay Gupta 8
Types of Hypothesis
• Null Hypothesis (H0)
• Alternative Hypothesis (Ha or H1)
Each of the following statements is an example of a null
hypothesis and alternative hypothesis.

Hypothesis testing-- Ajay Gupta 9


Steps in Hypothesis Testing

Hypothesis testing-- Ajay Gupta 10


Null Hypothesis (HO)

• 1st step in testing any hypothesis.

• Set up Null Hypothesis (H )such that it conveys a


O

meaning that there exists no difference between the


different samples.

e.g:
• The mean pulse rate among the two groups are same (or)
there is no significant difference between their pulse rates.

Hypothesis testing-- Ajay Gupta 11


By using various tests of significance we either:
–Reject the Null Hypothesis (or)
–Accept the Null Hypothesis

Rejecting null hypothesis → Difference is significant.


Accepting null hypothesis → Difference is not significant.
P = 0.05 implies,
–We may go wrong 5 out of 100 times
by rejecting null hypothesis.
– Or, We can attribute significance with
95% confidence.
Level of Significance – “P” Value

• p-value is a function of the observed sample results


(a statistic) that is used for testing a statistical hypothesis.

• It is the probability of null hypothesis being true. It can


accept or reject the null hypothesis based on P value.

• Practically, P < 0.05 (5%) is considered significant.

Hypothesis testing-- Ajay Gupta 14


Significance means the percentage risk to reject
a null hypothesis when it is true and it is
denoted by 𝛼. Generally taken as 1%, 5%,
10%
Two tailed test @ 10
5% Significance level

Acceptance and Rejection


regions in case of a Two Suitable When 𝐻0: 𝜇
tailed test = 𝜇0
𝐻𝑎: 𝜇
≠ 𝜇0
/𝑠𝑖𝑔𝑛𝑖𝑓𝑖𝑐𝑎𝑛𝑐𝑒 𝑙𝑒𝑣𝑒𝑙
𝑅𝑒𝑗𝑒𝑐𝑡𝑖𝑜𝑛 𝑟𝑒𝑔𝑖𝑜𝑛 𝑅𝑒𝑗𝑒𝑐𝑡𝑖𝑜𝑛 𝑟𝑒𝑔𝑖𝑜𝑛
/𝑠𝑖𝑔𝑛𝑖𝑓𝑖𝑐𝑎𝑛𝑐𝑒 𝑙𝑒𝑣𝑒𝑙
(𝛼 = 0.025 𝑜𝑟 2.5%) (1 − 𝛼 ) = 95% (𝛼 = 0.025 𝑜𝑟 2.5%)
𝐻0: 𝜇 = 𝜇0

www.shakehandwithlife.in
Hypothesis testing-- Ajay Gupta 16
Left tailed test @ 11
5% Significance level

Acceptance and Rejection


regions in case of a left tailed Suitable When 𝐻0: 𝜇
test = 𝜇0
𝐻𝑎: 𝜇
< 𝜇0

𝑅𝑒𝑗𝑒𝑐𝑡𝑖𝑜𝑛 𝑙 (1 − 𝛼 ) =
𝑟𝑒𝑔𝑖𝑜𝑛
/𝑠𝑖𝑔𝑛𝑖𝑓𝑖𝑐𝑎𝑛𝑐𝑒 95%
(𝑜= 0.05 𝑟 5%)
𝑙𝑒𝑣𝑒𝑙

𝐻0: 𝜇 = 𝜇0

www.shakehandwithlife.in
Hypothesis testing-- Ajay Gupta 17
Right tailed test @ 12
5% Significance level

Acceptance and Rejection


regions in case of a Right Suitable When 𝐻0: 𝜇
tailed test = 𝜇0
𝐻𝑎: 𝜇
> 𝜇0

𝑙 𝑅𝑒𝑗𝑒𝑐𝑡𝑖𝑜𝑛 𝑟𝑒𝑔𝑖𝑜𝑛
(1 − 𝛼 ) = 95% /𝑠𝑖𝑔𝑛𝑖𝑓𝑖𝑐𝑎𝑛𝑐𝑒
𝑙𝑒𝑣𝑒𝑙
𝐻0: 𝜇 = 𝜇0 (𝑜= 0.05 𝑟 5%)

www.shakehandwithlife.in
Hypothesis testing-- Ajay Gupta 18
Summary of Certain Values for Sample Statistics Z

Hypothesis testing-- Ajay Gupta 19


Select the Suitable Test of significance or Test Statistic

• Whether the test involves one sample, two samples, or


samples?
• Whether two or more samples used are
independent or related?
• Is the measurement scale nominal,
ordinal, interval, or ratio?

Hypothesis testing-- Ajay Gupta 20


The choice of a probability distribution of a sample
statistics is guided by the sample size n and the
value of population standard deviation as shown
in the table.

Hypothesis testing-- Ajay Gupta 21


Formulate a Decision Rule to Accept Null
Hypothesis
• Accept H0 if the test statistic value falls
within the area of acceptance.
• Reject otherwise.

Hypothesis testing-- Ajay Gupta 22


ERRORS IN HYPOTHESIS
TESTING

Hypothesis testing-- Ajay Gupta 23


Topics to be covered
Attributes sampling
• Test of significance of number of successes
• Test of significance of single proportion
• Test of significance of difference of two proportions
Sampling of variables (Large samples)
• Test of significance of single mean
• Test of significance of difference between two means
• Test of significance of difference between two
standard deviations
Sampling of variables (small samples)

Hypothesis testing-- Ajay Gupta 24


Test of significance of number of successes
If the successes are independent of one another, the number of
successes should follow binomial distribution
For a binomial distribution
Mean = np
Standard deviation = √npq
The observed number of successes will generally be different
from expected number. We want to test whether the observed
number of successes is significantly different from expected
number of successes or not.
The null and alternate hypothesis for this situation is

H0 = number of successes/occurrences = np
H1 = number of successes/occurrences ≠ np
Hypothesis testing-- Ajay Gupta 25

Hypothesis testing-- Ajay Gupta 26


Hypothesis testing-- Ajay Gupta 27


Hypothesis testing-- Ajay Gupta 28


Hypothesis testing-- Ajay Gupta 29


Hypothesis testing-- Ajay Gupta 30


Test of significance of single proportion

Hypothesis testing-- Ajay Gupta 31


Experience has shown that 15% of manufactured products are of
poor quality. From a random sample of 400 articles, 70 were found to
be of poor quality. Test
a. Hypothesis based on experience is all right
b. Percentage of poor quality articles is more than 15%

For part a, hypothesis are


H0 = percentage defective is equal to 15% i.e. p = 0.15
H1 = percentage defective is not equal to 15% i.e. p ≠ 0.15
So, we will use two tailed test

Hypothesis testing-- Ajay Gupta 32


Hypothesis testing-- Ajay Gupta 33


For part b, hypothesis are
H0 = percentage defective is equal to 15% i.e. p = 0.15
H1 = percentage defective is greater than 15% i.e. p > 0.15
So, we will use one tailed test

Tabulated value at 5% level of significance (for one tailed test)


=1.645
Since Zcal < Ztab
H0 is not rejected
Conclusion:- Percentage defective is not significantly more than
15%
Hypothesis testing-- Ajay Gupta 34

Hypothesis testing-- Ajay Gupta 35


Hypothesis testing-- Ajay Gupta 36


Test of significance of difference of two proportions

Hypothesis testing-- Ajay Gupta 37


Hypothesis testing-- Ajay Gupta 38


In city A, there are 856 births in a year of which 55% were males . In
cities A and B combined, the proportion of male births in a total of
1350 was 47 %. Test the hypothesis that there is no significant
difference in the proportion of male births in the two cities at 5%
and 1% level of significance.

H0: the proportions of male births are equal in two cities i.e. p1 = p2
H1: the proportions of male births are not equal in two cities i.e. p1 ≠
p2

Hypothesis testing-- Ajay Gupta 39


City A
Total births (n1) = 856
Proportion of males(P1) = 55/100 = 11/20
Number of male births in city A (r1) = 856 X 11/20 = 471
Total births in city a and b combined (n1 + n2) = 1350
Births in city B = n2 = 1350 –n1
= 1350 -856
= 494
Total male births in city A and B combined (r1 + r2) = 1350 x
47/100 = 635
Therefore, male births in city B = 635 -471 = 164
Proportion of male births in city B(P2) = 164/494 = 0.33

Combined proportion of male births (p) = 0.47


Hypothesis testing-- Ajay Gupta 40

Hypothesis testing-- Ajay Gupta 41


In a random sample of 500 men from a certain city A, 350 were
found to be smokers. In another sample of 800 from city B, 430
are smokers. Do the data reveal that the two cities differ
significantly w.r.t. smoking habit among men?

H0:Two cities do not differ significantly w.r.t. smoking habit


among men (p1 = p2)
H1:Two cities differ significantly w.r.t. smoking habit among men
(p1 ≠p2)

Hypothesis testing-- Ajay Gupta 42


Hypothesis testing-- Ajay Gupta 43


Hypothesis testing-- Ajay Gupta 44


Sampling of variables (Large samples)

Hypothesis testing-- Ajay Gupta 45


In a random sample of 200 light bulbs produced by a company,
the mean life time and its standard deviation are found to be 1380
hours and 215 hours respectively. Test the hypothesis at 5% level
of significance that the mean life time of bulbs μ = 1408 hours
against the alternative hypothesis
( a ) μ # 1408 hours
(b) μ < 1408 hours.

Part a
H0 = Mean life is equal to 1408 hours
H1 = Mean life is not equal to 1408 hours

Hypothesis testing-- Ajay Gupta 46


Hypothesis testing-- Ajay Gupta 47


part b
H0 = Mean life is equal to 1408 hours
H1 = Mean life is < 1408 hours
Tabulated value at 5% level of significance (for one tailed test)
=1.64
Since Zcal > Ztab

H0 is rejected
Conclusion:- Life of the bulbs is significantly lesser
than population mean of 1408 hours

Hypothesis testing-- Ajay Gupta 48


Hinton Press hypothesizes that the average life of its largest web
press is 14,500 hrs. They know that the standard deviation of the
press life is 2100 hrs. From a sample of 50 presses, the company
finds a sample mean of 13000 hrs. At a 1 % of significance level,
should the company conclude that the average life of the presses is
less than the hypothesized 14,500 hrs?

H0 = Mean life of press is 14500 hours


H1 = Mean life of press is lesser than 14500 hours

Hypothesis testing-- Ajay Gupta 49


Hypothesis testing-- Ajay Gupta 50


Test of significance of difference between two means

Hypothesis testing-- Ajay Gupta 51


Hypothesis testing-- Ajay Gupta 52


Hypothesis testing-- Ajay Gupta 53


Hypothesis testing-- Ajay Gupta 54


Part b
H0: two drugs are equally effective
H1: Second drug is more effective

Tabulated value at 5% level of significance (for one tailed test)


=1.64
Since Zcal < Ztab

H0 cannot be rejected
Conclusion:- Second drug is not more effective than first in
providing relief to the patients

Hypothesis testing-- Ajay Gupta 55


Random samples taken from two countries gave the following data related
to their heights of adult females

India China
Mean height 66.37 59.75
Standard Deviation 17.75 22.12
Sample size 135 165

a. Is the difference between means significant?


b. Does the first sample reveals significantly higher
mean height

Hypothesis testing-- Ajay Gupta 56


Hypothesis testing-- Ajay Gupta 57


Hypothesis testing-- Ajay Gupta 58


Part b
H0: Mean heights of persons from two countries are equal
H1: Mean heights of persons from India is more

Tabulated value at 5% level of significance (for one tailed test)


=1.64
Since Zcal > Ztab

H0 is rejected
Conclusion:- Mean heights of persons from India is more than
the persons from china

Hypothesis testing-- Ajay Gupta 59


Sampling of variables (small samples)

t-test
sample size < 30
population SD is not known
t tables are read for n-1 degrees of freedom

Hypothesis testing-- Ajay Gupta 60


Test of significance of single mean

Hypothesis testing-- Ajay Gupta 61


At an agricultural station, it was desired to see the effect of some
fertilizer on the yield of wheat. For this purpose 26 plots of land
having equal area were randomly selected and were treated with the
fertilizer. The mean yield of wheat was 26.35 quintals with a standard
deviation of 7.65 quintals. Can we conclude that there is no
significant difference in the mean yield of wheat from 23 quintal per
hectare of the whole agricultural station at 5% and 1% level of
significance

H0 : Mean yield is 23 quintals

H1 : Mean yield is not equal to 23 quintals

Hypothesis testing-- Ajay Gupta 62


Hypothesis testing-- Ajay Gupta 63


Tabulated value of t at 5% and 1% level of significance for 26-1 = 25
dof (for two tailed test) are 2.06 and 2.79
At 5% level
Since Zcal > Ztab

H0 is rejected
Conclusion:- Mean yield is different from assumed mean
But at 1% level
Zcal < Ztab

H0 is not rejected
Conclusion:- Mean yield is not statistically different
from assumed mean

Hypothesis testing-- Ajay Gupta 64


Test of significance of difference between two means
The heights of 10 randomly chosen adults in community A are
65,67,71,72,69,68,75,72,70 and 70 inches. Those of 12 randomly
chosen adults in community B are 73,74,65,67,70,72,73,71,72,69,70
and 71 inches .Discuss whether

(a) the adults in both the communities are of equal height on an


average,
(b) the adults in community A are taller than those of community B ,
(c) the adults in community A are shorter than those of community B.
(Exercise)

Hypothesis testing-- Ajay Gupta 65


Test of significance of mean difference (Paired t
test)

Hypothesis testing-- Ajay Gupta 66


Ten schoolboys were given a test in statistics. They were given
a months tuition and then a second test was held. The
difference in the marks of two tests are

Boy 1 2 3 4 5 6 7 8 9 10
Differenc 5 7 -2 -3 6 3 2 -1 3 4
e

Hypothesis testing-- Ajay Gupta 67


5 7 -2 -3 6 3 2 -1 3 4
di
25 49 4 9 36 9 4 1 9 16

Hypothesis testing-- Ajay Gupta 68


Hypothesis testing-- Ajay Gupta 69


The following table gives additional hours of sleep gained by 8 patients in an
experiment to test the effect of a drug

Patient 1 2 3 4 5 6 7 8
Hours 0.6 0.36 2.0 1.5 1.7 0.83 0.75 1.2
gained

Can we conclude that the drug produces additional


hours of sleep?
(Exercise)

Hypothesis testing-- Ajay Gupta 70


THANK
YOU
Hypothesis testing-- Ajay Gupta 71

You might also like