You are on page 1of 50

Dr.

Tuhina Manna

Hypothesis Testing
Statistical Hypothesis

a conjecture about a
population parameter. The
particular value or range of
values of population
parameter is claimed and we
need to test this claim is true
or not by observing the
sample.
The per capita
There are 30% income of people in
asymptomatic What is a
India are Rs.1,600.
covid infected Hypothesis?
people in West
Bengal

Mean pocket Twenty percent of all


money of college customers at Peter Cat
students in Kolkata return for another meal
is Rs. 2000 within a month.
Major Methods for Making Statistical
Inferences about a Population
1 The traditional Method

2 The p-value Method (SPSS)

3 Confidence Interval
Step 1: State null and alternate hypotheses
Steps in
Hypothesis Step 2: Select a level of significance

Testing
Step 3: Identify the test statistic

Step 4: Formulate a decision rule

Step 5: Take a sample, arrive at a decision

Accept null Reject null and accept alternate


There are two types of statistical hypotheses:
• Null Hypothesis (H0) – a statistical hypothesis that states that there
is no difference between a parameter and a specific value, or that
there is no difference between two parameters.
• Alternative Hypothesis (H1) – a statistical hypothesis that states the
existence of a difference between a parameter and a specific value,
or states that there is a difference between two parameters
• Example: The mean income for a resident of Delhi is equal to the mean income
for a resident of Mumbai.
• Population parameter is mean income
• One population consists of residents of Delhi while the other consists of
residents of Mumbai.
Note: H0 will ALWAYS have an equal sign (and possibly a less than or greater than
symbol, depending on the alternative hypothesis. Example: 𝐻0 : 𝜇 = 4, 𝐻0 : 𝜇 ≥ 4, 𝐻0 : 𝜇 ≤ 4
Here k is a specified number given in question.For example let k=5 and here
𝜇 𝑖𝑠 𝑝𝑜𝑝𝑢𝑙𝑎𝑡𝑖𝑜𝑛 𝑚𝑒𝑎𝑛

. Right-tailed and left-tailed tests are distinguished by the way the greater than or less than
points in the alternative hypothesis only. They help us with the decision rule.
One-Tailed Tests of Significance
The H1: The mean yearly
alternate commissions earned by full-
hypothesis, time realtors is more than
H1, states a Rs.35,000. (H1: µ>Rs.35,000)
direction
H1: Less than 20
H1: The mean speed of percent of the
trucks traveling on NH- customers pay in
95 is less than 60 km per cash for their
hour. (H1: µ<60) internet charges.
(H1: m<0.20)
Two-Tailed Tests of Significance
No direction is specified in the alternate hypothesis H1.
H1: The mean H1: The mean
amount spent by volume of
customers at diesel
Spencer is not consumed in
equal to India is not
Rs.1500. equal to 25
H1: The mean air quality (µ ≠ Rs1500). billion litres.
index in Kolkata today is
not equal to 50. (µ≠ 25).
(µ ≠ 50).
Step One: State the null and alternate
hypotheses
H 0: m = 0
H 1: m = 0
Three The null
possibilities hypothesis
regarding H 0: m < 0 always contains
means H1: m > 0 equality.

H 0: m > 0
H 1: m < 0 3 hypotheses
about means
When a researcher conducts a study, he or she is generally looking for evidence to support a
claim of some type of difference. In this case, the claim should be stated as the alternative
hypothesis. Because of this, the alternative hypothesis is sometimes called the research
hypothesis.

The known result is the null hypothesis.


Examples: State the H0 and H1 for each case.
• 1) A researcher thinks that if expectant mothers use vitamins, the birth weight of the
babies will increase. The average birth weight of the population is 8.6 pounds.
• H0: m = 8.6 H1: m > 8.6

• 2) An engineer hypothesizes that the mean number of defects can be decreased in a


manufacturing process of compact disks by using robots instead of humans for certain
tasks. The mean number of defective disks per 1000 is 18.
• H0 : H1 :

• 3) A psychologist feels that playing soft music during a test will change the results of the
test. The psychologist is not sure whether the grades will be higher or lower. In the past,
the mean of the scores was 73.
• H0 : H1 :
Example: Decision Errors in a
Legal Trial . What are H0 and H1?

H0: Defendant is innocent.


H1: Defendant is not innocent,
i.e., guilty

If you are the defendant, which is


the worse error? Why?
• Type II error – do not reject H0 when
Results of a statistical test: H0 is false.
• Type I error – reject H0 when H0 is true.

H0 is True H0 is False
Reject H0 Type I Correct
Error Decision

Do not Reject H0 Correct Type II


Decision Error
Step Two: Select a Level Type I Error
of Significance. Rejecting the null
Level of Significance hypothesis when it
is actually true (a).
The probability of rejecting the
null hypothesis when it is
actually true; the level of risk in Type II Error
so doing.
Accepting the null
This probability of committing a
hypothesis when it
type I error is symbolized by α.
is actually false (b).
P(Type I error) = α
Step 3: select test statistic
Test statistic z Distribution as a test statistic
A value, determined from sample

𝑋−𝜇 ሜ
𝑋−𝜇
information, used to determine 𝑧= , 𝑧=
whether or not to reject the null 𝜎/ n 𝑠/ n

hypothesis.
The z value is based on the
sampling distribution of X,
which is normally
distributed when the sample
Examples: z, t, F, c2 is reasonably large: n>30
(recall Central Limit
Theorem).
Step Four: Formulate the decision rule.
• Critical or Rejection Region – the range of values for the test value that
indicate a significant difference and that the null hypothesis should be
rejected.
• Total area of critical region= P(Type I error) = α

• Non-critical or Non-rejection Region – the range of values for the test


value that indicates that the difference was probably due to chance and
that the null hypothesis should not be rejected.
• Critical Value (CV) – separates the critical region from the non-critical
region
• The location of the critical value depends on the inequality sign of the
alternative hypothesis.
• Depending on the distribution of the test value, you will use different
tables to find the critical value.
One-tailed test – indicates that the
null hypothesis should be rejected
when the test value is in the critical
region on one side.
• Left-tailed test – when the
critical region is on the left side
of the distribution of the critical value.
• Right-tailed test – when the
critical region is on the right side
of the distribution of the critical value.
Two-tailed test – the null hypothesis
should be rejected when the test value
is in either of two critical regions. The
critical regions lie on either side of the
distribution beyond the two critical
value.
Example: Right tail test H1: µ>𝝁𝟎 , 𝒐𝒓 𝑯𝟏 : 𝑷 > 𝑷𝟎
Sampling Distribution
Of the Statistic z,

Right-Tailed Test at 5%
Region of
Level of Significance Do not
rejection 𝐻0
P(z>1.645)=0.05 or 𝑧0.05 = 1.645 reject 𝐻0
[Probability =.95] [Probability=.05]
Prob=α
Similarly, for Right-Tailed Test at Prob=1-α

1% Level of Significance
P(z>2.33)=0.01 or 𝑧0.01 = 2.33
0 1.645
1.65
Critical value

Diagram is for Right-Tailed


Test at 5%
Level of Significance
Two-Tailed Tests of Significance
Regions of Nonrejection
and Rejection for a
Two-Tailed Test, .05
Level of Significance
Region of Region of
P(|z|>1.96)=0.05 or Do not
rejection 𝐻0 rejection 𝐻0
𝑧0.025 = 1.96 reject 𝐻0
[Probability=.025] [Probability=.025]
[Probability =.95] Prob=α/2
Prob=α/2
Similarly 2 tail test at Prob=1-α
1% level of significance
:P(|z|>2.58)=0.01 or Diagram is for
𝑧0.005 = 2.58 Two-Tailed Test,
at 5% Level of
-1.96 0 1.96 Significance
Critical value Critical value
Testing of hypothesis for population
parameters with large samples n>30
Due to Central limit theorem, the sampling distribution
of sample means 𝑥ҧ is normal distribution

1. Single population mean


2. Difference of population mean
3. Single population proportion
4. Difference of population proportion
Test statistic formulae: ሜ
𝑿−𝝁
1. Single population mean : Test statistic=𝒛 = ,
𝝈/ 𝒏

𝑿−𝝁 𝒙 𝟐
σ 𝒙−ഥ
𝐨𝐫 , 𝒛 = (when population s.d. 𝝈 is not given) , where: s= sample s.d.= 𝒔 =
𝒔/ 𝒏 𝒏−𝟏

ഥ𝟏 −ഥ
𝒙 𝒙𝟐
2. Difference of population mean: Test statistic=𝒛 = ,
𝝈𝟐 𝟐
𝟏 +𝝈𝟐
𝒏𝟏 𝒏𝟐
ഥ𝟏 −ഥ
𝒙 𝒙𝟐
In case population s.d. 𝝈𝟏 , 𝝈𝟐 are not given , 𝒛 =
𝒔𝟐 𝟐
𝟏 + 𝒔𝟐
𝒏𝟏 𝒏𝟐

𝒑−𝑷
3. Single population proportion: Test statistic: 𝒛 = , where p= sample proportion and P= population
𝑷𝑸
𝒏
proportion, Q=1-P.
𝒑𝟏 −𝒑𝟐
4. Difference of population proportion: Test statistic= 𝒛 = 𝑷𝟏 𝑸𝟏 𝑷𝟐 𝑸𝟐
,
𝒏𝟏
+ 𝒏
𝟐

𝒑𝟏 −𝒑𝟐 𝒏𝟏 𝒑𝟏 +𝒏𝟐 𝒑𝟐
In case, population proportions 𝑷𝟏 , 𝑷𝟐 are not given 𝒛 = , where 𝒑 = , 𝒒=𝟏−𝒑
𝟏 𝟏 𝒏𝟏 +𝒏𝟐
𝒑𝒒 +
𝒏𝟏 𝒏𝟐
• Example: It has been reported that the average credit card
debt for college seniors is $3262. The student senate at a
large university feels that their seniors have a debt much less
than this, so it conducts a study of 50 randomly selected
seniors and finds that the average debt is $2995, and the
population standard deviation is $1100.

Conduct the test of hypothesis based on a Type I error of


a=0.05. Given 𝑧0.05 = 1.645
Solution:
Step 1 State the hypotheses and identify the claim.
H0: m=$3262 and
H1: m<$3262 (alternate hypothesis states the claim)

Step 2 : Left-tailed test since alternate hypothesis is one directional


inequality, with α=0.05 , Z will be negative and have probability 0.05
underneath it, Z critical = -1.645 or

Step 3 Compute the test statistic.


𝑥ҧ − 𝜇 2995 − 3262
𝑧= 𝜎 = = −1.72
1100
𝑛 50
Step 4 Make the decision to reject or not reject
the null hypothesis.
Since this is a left-tailed test, our rejection region Critical
consists of values of Z that are smaller than our region
critical value of Z = - 1.645 (table).
Test value= z= -1.72 and critical value=z critical =-1.645,
Since, -1.72<-1.645, so our value of test statistic lie in
the critical region.
Hence, we reject the null hypothesis.

Step 5 Summarize the results. -1.72


-1.645
We have evidence to support the student senate claim
that the university’s seniors have credit card debt that is
less than the reported average debt.
Q) A sample of 400 male students is found to have a mean height of 171.38cm.
Can it be reasonably regarded as a sample from a large population with mean
height 171.17cm and s.d. 3.30cm at 5% level of significance ? (Given: 𝑧0.025 =
1.96)

• Solution: Here given sample size=n=400, population mean=𝑚0 =


171.17, 𝑃𝑜𝑝𝑢𝑙𝑎𝑡𝑖𝑜𝑛 𝑠. 𝑑. = 𝜎 = 3.30, 𝑠𝑎𝑚𝑝𝑙𝑒 𝑚𝑒𝑎𝑛 = 𝑥ҧ = 171.38
• 𝐻0 : 𝑚 = 𝑚0
𝐻1 : 𝑚 ≠ 𝑚0 two tail
ҧ
𝑥−𝑚 ҧ
𝑥−𝑚 171.38−171.17
• Test statistic= 𝑧 = 0
= 𝜎
0
= 3.30
𝑆.𝐸.(𝑥)ҧ
𝑛 400
= 1.27
• This is a two tail test and we have: |z|=1.27<1.96
• So test statistic z does not lie in the critical region.
• Accept Null hypothesis 𝐻0 at 5% level of significance.
• Hence it be reasonably regarded as a sample from a large population
Q) The means of 2 large samples of sizes 1000 and 2000 are 67.5 and 68.0
respectively. Test the equality of means of the two populations each with s.d. 2.5 at
1% level of significance.(P(|z|>2.58)=0.01)
• Solution: Here for 1st population: sample size = n1 = 1000, 𝑃𝑜𝑝𝑢𝑙𝑎𝑡𝑖𝑜𝑛 𝑠. 𝑑. =
𝜎1 = 𝜎 = 2.5, 𝑠𝑎𝑚𝑝𝑙𝑒 𝑚𝑒𝑎𝑛 = 𝑥1 = 67.5; for 2nd population: sample size =
n2 = 2000, 𝑃𝑜𝑝𝑢𝑙𝑎𝑡𝑖𝑜𝑛 𝑠. 𝑑. = 𝜎2 = 𝜎 = 2.5, 𝑠𝑎𝑚𝑝𝑙𝑒 𝑚𝑒𝑎𝑛 = 𝑥2 = 68
• 𝐻0 : 𝑚1 = 𝑚2
𝐻1 : 𝑚1 ≠ 𝑚2 two tail
𝑥ҧ1 −𝑥ҧ2 𝑥ҧ1 −𝑥ҧ2 67.5−68.0 0.5
• Test statistic= 𝑧 = = = =− = −5.16
𝑆.𝐸.(𝑥ҧ 1 −𝑥ҧ2 ) 2 2.52 2.52 0.0968
𝜎2
1 + 𝜎2 +
1000 2000
𝑛1 𝑛2

• This is a two tail test and we have: |z|=5.16>2.58


• So test statistic z lies in the critical region.
• Reject Null hypothesis 𝐻0 at 1% level of significance.
• Hence the two population means are not equal.
Q) An auditor claims that 10% of customer ledger accounts are carrying mistakes of
posting and balancing. A random sample of 600 ledger accounts was taken and
tested for accuracy and 45 mistakes were found. Are these sample results consistent
with the claim of the auditor? Use 5% level of significance. Given: 𝑧0.025 = 1.96.
Ans: Let p be the proportion of mistakes of posting and balancing in the population accounts
And 𝑝ҧ be the sample proportion.
Q) In a certain city 325 men out of 600 were found to be smokers. Does this information
support the conclusion that the majority of men in this city are smokers? Test at 5% level of
significance. (Given: 𝑧0.05 = 1.645)
• Sol: Given Sample size=n=600,
325
• Proportion of smokers in sample= 𝑝 = = 0.542
600
• Let P be the proportion of smokers in the population.
• Claim is majority are smokers, that is more than 50% are smokers
𝐻0 : 𝑃 ≤ 0.5
𝐻1 : 𝑃 > 0.5
𝑝−𝑃 𝑝−𝑃 0.542−0.5 0.042
• Test statistic: 𝑧 = = = = = 2.058
𝑆.𝐸.(𝑝) 𝑃𝑄 0.5∗(1−0.5) 0.0204
𝑛 600
• This is a right tail test (we find this from the alternate hypothesis),
and z=2.058>1.645.
• so z lies in the critical region.
• Hence we reject the null hypothesis 𝐻0 at 5% level of significance.
• Majority of men are smokers in the city.
Q) A manufacturer claimed that less than 90% of the components which he supplied
confirmed to the specifications. A random sample of 200 components showed that only
164 were upto the standard. Test the claim at 1% level of significance. (Given: 𝑧0.01 =
2.33)
• Sol: Given: Sample size=200,
164
• Proportion of components that confirmed to specifications 𝑖𝑛 𝑠𝑎𝑚𝑝𝑙𝑒 = 𝑝 = =
200
0.82
• Let P be the proportion of components that confirmed to specifications in the
population.
• 𝐻0 : 𝑃 ≥ 0.9
Claim is P less than 90%: 𝐻1 : 𝑃 < 0.9 Left tail (One tail)
𝑝−𝑃 𝑝−𝑃 0.82−0.9
• Test statistic: 𝑧 = = = = −3.772
𝑆.𝐸.(𝑝) 𝑃𝑄 0.9∗(1−0.9)
𝑛 200
• This is a left tail test (we find this from the alternate hypothesis), and z=-3.772<-2.33.
• so z lies in the critical region.
• Hence we reject the null hypothesis 𝐻0 .
• So proportion of of components that confirmed to specifications is less than 90%.
Q) A machine produced 20 defective articles in a batch of 400. After overhauling it
produced 10 defective in a batch of 300. Has the machine improved ? Test at 5 %
level of significance . (Given: 𝑧0.05 = 1.645)
20
• Sol: Given: 1st sample: sample size = n1 = 400, 𝑃𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑜𝑛 𝑜𝑓 𝑑𝑒𝑓𝑒𝑐𝑡𝑖𝑣𝑒 𝑖𝑡𝑒𝑚𝑠 𝑖𝑛 𝑠𝑎𝑚𝑝𝑙𝑒 = 𝑝1 = 400;
10
2nd sample: sample size = n2 = 300, 𝑃𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑜𝑛 𝑜𝑓 𝑑𝑒𝑓𝑒𝑐𝑡𝑖𝑣𝑒 𝑖𝑡𝑒𝑚𝑠 𝑖𝑛 𝑠𝑎𝑚𝑝𝑙𝑒 = 𝑝2 = 300 .

• 𝐿𝑒𝑡 𝑃1 𝑎𝑛𝑑 𝑃2 𝑏𝑒 𝑡ℎ𝑒 𝑝𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑜𝑛 𝑜𝑓 𝑑𝑒𝑓𝑒𝑐𝑡𝑖𝑣𝑒 𝑖𝑡𝑒𝑚𝑠 𝑖𝑛 𝑡ℎ𝑒 𝑟𝑒𝑠𝑝𝑒𝑐𝑡𝑖𝑣𝑒 𝑝𝑜𝑝𝑢𝑙𝑎𝑡𝑖𝑜𝑛𝑠


• 𝐻0 : 𝑃1 = 𝑃2
𝐻1 : 𝑃1 > 𝑃2 (Proportion of detective is less after
overhauling,i.e., machine improved)
𝑛1 𝑝1 +𝑛2 𝑝2 20+10 3
• Now, 𝑝 = = = 70
𝑛1 +𝑛2 700
20 10 1
𝑝1 −𝑝2 𝑝1 −𝑝2 −
• Test statistic= 𝑧 = = = 400 300 60
= 0.01547 =1.077
𝑆.𝐸.(𝑝1 −𝑝2 ) 1 1 3 3 1 1
𝑝𝑞 + 1− +
𝑛1 𝑛2 70 70 400 300

• This is a two tail test and we have: z=1.077<1.645


• So test statistic z does not lie in the critical region.
• Accept Null hypothesis 𝐻0 at 1% level of significance.
• The two population proportions of defective items before and after overhauling,
Q)
Now,
And S.E. of difference of sample proportions is
Q) In a certain city 100 men in a sample of 400 were found to be unemployed. In
another city the number of unemployed are 300 in a random sample of 800. Does
this indicate that there a greater proportion of unemployed men in the second city?
(Given: 𝑧0.01 = 2.33)
100
• Sol: Given: 1st sample: sample size = n1 = 400, 𝑃𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑜𝑛 𝑜𝑓 𝑢𝑛𝑒𝑚𝑝𝑙𝑜𝑦𝑒𝑑 𝑚𝑒𝑛 = 𝑝1 = =
400
300
0.25; 2nd sample: sample size = n2 = 800, 𝑃𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑜𝑛 𝑜𝑓 𝑢𝑛𝑒𝑚𝑝𝑙𝑜𝑦𝑒𝑑 𝑚𝑒𝑛 = 𝑝2 = =
800
0.375. 𝐿𝑒𝑡 𝑃1 𝑎𝑛𝑑 𝑃2 𝑏𝑒 𝑡ℎ𝑒 𝑝𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑜𝑛 𝑜𝑓 𝑢𝑛𝑒𝑚𝑝𝑙𝑜𝑦𝑒𝑑 𝑚𝑒𝑛 𝑖𝑛 𝑡ℎ𝑒 𝑟𝑒𝑠𝑝𝑒𝑐𝑡𝑖𝑣𝑒 𝑝𝑜𝑝𝑢𝑙𝑎𝑡𝑖𝑜𝑛𝑠
• 𝐻0 : 𝑃1 = 𝑃2
𝐻1 : 𝑃1 < 𝑃2
𝑛1 𝑝1 +𝑛2 𝑝2 400 1
• Now, 𝑝 = = = = 0.334
𝑛1 +𝑛2 1200 3
𝑝1 −𝑝2 𝑝1 −𝑝2 0.25−0.375 0.125
• Test statistic= 𝑧 = = = =− = −4.34
𝑆.𝐸.(𝑝1 −𝑝2 ) 1 1 1 1 1 1 0.0288
𝑝𝑞 + 1−3 +
𝑛1 𝑛 2 3 400 800
• This is a left tail test and we have: z=-4.34 <-2.33
• So test statistic z lies in the critical region.
• Reject Null hypothesis 𝐻0 at 1% level of significance.
• There is a greater proportion of unemployed men in the second city.
PRACTICAL PRACTICE
Q) In a fertilizer manufacturing plant located at Barauni, a machine is set to pack nitrate
fertilizers in bags. 31 bags are examined and the following weigh of nitrate is found: 11.0,
14.5, 13.5, 12.01,14.5,11.1,12.2, 11.0, 12, 14.3, 13.6, 11.3, 12.0, 12.0, 14, 13.5, 12, 11.7,
12.5, 15.5, 15.0, 10.9, 11.2, 11.5, 12.2, 13.4, 14, 12.3, 11.8, 12.5, 12.
In a second plant located in Sindri, 30 bags filled by another machine is examined
and the following weigh of nitrate is found: 13.0, 15.2, 10.2, 11.5, 11.5, 11.0, 12.0, 14.2,
13.6, 11.9, 13.2, 12.5, 12.2, 13.5, 12.1, 15, 15.5, 13.5, 14.0, 10.9, 13.2, 15.1, 10.3, 11.6,
11.5, 11.1, 12.4, 14.3, 13.5, 11.8. Is there any reason to believe that the bags manufactured
by the two machines are significantly different at 5% level of significance?
(Given critical value is 1.96)
• Steps: σ 𝑥𝑖
𝑥ҧ = 𝑠𝑎𝑚𝑝𝑙𝑒 𝑚𝑒𝑎𝑛 =
• a) State the appropriated Null and Alternative Hypothesis [2] 2
𝑛
𝑠 = 𝑠𝑎𝑚𝑝𝑙𝑒 𝑣𝑎𝑟𝑖𝑎𝑛𝑐𝑒
• b) Calculate mean weights and variance of both samples. [3] 2
𝑥𝑖 σ 𝑥𝑖
• c) Calculate Test Statistic[2] =෍ −
𝑛 𝑛
• d) Show the critical region [2]
• e) Final conclusion [1]
Do it yourself
Example: The medical Rehabilitation Education Foundation
reports that the average cost of rehabilitation for stroke victims
is $24,672.
To see if the average cost of rehab is different at a particular
hospital, a researcher selects a random sample of 35 stroke
victims at the hospital and finds the average cost of their rehab is
$25,250. The standard deviation of the population is $3251.
At α = 0.01, can it be concluded that the average cost of stroke
rehabilitation at a particular hospital is different from $24,672?
Testing of hypothesis for population
parameters with small samples n<30
The sampling distribution
of sample means 𝑥ҧ has
Student’s t- distribution
1. Single population mean
2. Difference of population mean
for Independent samples
3. Difference of population mean
for Paired or Dependent
samples
Test statistic formulae:
1. Single population mean :

𝑋−𝜇 σ 𝑥−𝑥ҧ 2
Test statistic = 𝑡 = with degrees of freedom =(n-1). Here, sample s.d.= 𝑠 =
𝑠/ 𝑛 𝑛−1
2. Difference of population mean:
Case 1: Independent Samples:
𝑥ҧ1 −𝑥ҧ2 𝑥ҧ1 −𝑥ҧ2 𝑛1 𝑛2
Test statistic=t= = 𝑤𝑖𝑡ℎ 𝑑𝑒𝑔𝑟𝑒𝑒𝑠 𝑜𝑓 𝑓𝑟𝑒𝑒𝑑𝑜𝑚 = 𝑛1 + 𝑛2 − 2.
𝑠
1
+
1 𝑠 𝑛1 +𝑛2
𝑛1 𝑛2
2 2
𝑛1 − 1 𝑠1 + 𝑛 2 − 1 𝑠2
𝑤ℎ𝑒𝑟𝑒 𝑠 2 =
𝑛1 + 𝑛2 − 2
Case 2: Dependent Samples/Paired Samples: The sample consists of a pair of observations of a
variable before and after a change. Find the deviation “𝑑𝑖 ” in the two sets of variable before and
after a change.
𝑑ሜ σ𝑑 σ 𝑑𝑖 −𝑑ത 2
Test statistic = 𝑡 = were 𝑑ሜ = 𝑖 𝑎𝑛𝑑 𝑠 =
𝑠/ 𝑛−1 𝑛 𝑛−1
Independent samples:
Dependent samples or Paired Samples
Q) A fertilizer mixing machine is set to mix 12 kg of nitrate in every 100kg of fertilizer.
Ten bags of 100 kg each are examined. The percentage of nitrate so found is
11,14,13,12,13,12,13,14,11,12. Is there any reason to believe that the machine is
This sum can be done in single population mean or Paired sample t-test. Any one process is fine.
defective?
Formula for single sample mean test statistic:

For paired sample t-test the hypothesis σ𝑑 5


will be 𝑑ҧ = = = 0.5
𝑛 10
𝐻0 : 𝜇𝑑 = 0, 𝐻1 : 𝜇𝑑 ≠ 0(2 tail test) s=1.08

𝑑ത 0.5
Test statistic Formula for paired sample t-test process: 𝑡 = = 1.08/3 = 0.33
𝑠/ 𝑛−1
This process also the test value < critical value , so null hypothesis is accepted and we conclude the manufacturer’s
claim is valid.
The graph and critical value is same for both the processes but the test statistic value is different.
In a year there are 956 births in a town A of which 52.5% were males,
while in town A and B combined, this proportion in a total of 1406
births was 0.496. Is there any significant difference in the proportion of
male births in the two towns?
Next on Testing of
Hypothesis continuation
ppt:
• Chi Square Distribution:
The probability, assuming that the null
hypothesis is true, of finding a value of
the test statistic at least as extreme as the
p-Value computed value for the test
p-value
Decision Rule
is
If the p-Value is larger If the p-Value is
required than or equal to the smaller than the
for significance level, a, H0 significance level, a,
Practical is not rejected. H0 is rejected.
only Calculated from the
probability distribution Using the p-Value
function or by computer in Hypothesis
Thankyou

You might also like