Professional Documents
Culture Documents
M03 (1)
M03 (1)
Standard Error
𝑢 − 𝐸(𝑢)
𝑡= ~𝑁(0,1)
𝑉(𝑢)
Wehave
𝑥−𝜇 𝑥−𝜇 𝑛
𝑡= 𝜎 = ~𝑁(0,1)
𝜎
𝑛
a) Consider the alternative hypothesis: 𝑯𝟏 : 𝝁 < 𝝁𝟎
Test statistic is
𝑥−𝜇 𝑛
𝑡=
𝜎
We reject the hypothesis (𝑯𝟎 ) when 𝒕 < −𝒕𝜶 ,where 𝑡𝛼 is so
determined that 𝑃 𝑡 < 𝑡𝛼 = 𝛼
b) Consider the alternative hypothesis: 𝑯𝟏 : 𝝁 ≠ 𝝁𝟎
Test statistic is
𝑥−𝜇 𝑛
𝑡=
𝜎
We reject the hypothesis (𝑯𝟎 ) when 𝒕 ≥ 𝒕𝜶 ,where 𝒕𝜶 is
𝟐 𝟐
so determined that 𝑃 𝑡 ≥ 𝒕𝜶 =𝛼
𝟐
Test statistic is
𝑥−𝜇 𝑛
𝑡=
𝜎
We reject the hypothesis (𝑯𝟎 ) when 𝒕 > 𝒕𝜶 ,where 𝑡𝛼 is so
determined that 𝑃 𝑡 > 𝑡𝛼 = 𝛼
Case 2 : 𝝈 is unknown
If 𝜎 is unknown then take sample s.d (s) as an approximation to 𝜎. So
the
Test statistic is
𝑥−𝜇 𝑛
𝑡=
𝑠
Do testing as described above
Testing equality of the means of two populations
Case 1 : 𝝈 is known
Let 𝜇1 & 𝜇2 be the means and 𝜎1 & 𝜎2 be the S.D of two populations.
Let the sample of sizes 𝑛1 & 𝑛2 be taken and let 𝑥1 & 𝑥2 be the
means and 𝑠1 & 𝑠2 be the sample S.D
Suppose we have to test 𝐻0 : 𝜇1 = 𝜇2
We know that
𝜎1
𝑥1 ~𝑁 𝜇1 ,
𝑛1
And
𝜎2
𝑥2 ~𝑁 𝜇2 ,
𝑛2
𝐸 𝑥1 − 𝑥2 = 𝜇1 − 𝜇2 = 0 𝑢𝑛𝑑𝑒𝑟 𝑡ℎ𝑒 ℎ𝑦𝑝𝑜𝑡ℎ𝑒𝑠𝑖𝑠
𝜎1 2 𝜎2 2
𝑉(𝑥1 − 𝑥2 ) = +
𝑛1 𝑛2
Therefore
𝑥1 − 𝑥2 − 𝐸 𝑥1 − 𝑥2
𝑡= ~𝑁 0,1
𝑉(𝑥1 − 𝑥2 )
𝑥1 − 𝑥2
𝑡= ~ 𝑁(0,1)
𝜎1 2 𝜎2 2
+
𝑛1 𝑛2
a) If the alternative hypothesis: 𝑯𝟏 : 𝝁 < 𝝁𝟎
Test statistic is
𝑥1 − 𝑥2
𝑡=
𝜎1 2 𝜎2 2
+
𝑛1 𝑛2
Test statistic is
𝑥1 − 𝑥2
𝑡=
𝜎1 2 𝜎2 2
+
𝑛1 𝑛2
so determined that 𝑃 𝑡 ≥ 𝒕𝜶 =𝛼
𝟐
Test statistic is
𝑥1 − 𝑥2
𝑡=
𝜎1 2 𝜎2 2
+
𝑛1 𝑛2
𝑥1 𝑥2 𝑥 𝑥
− −𝐸 1 − 2
𝑛 𝑛2 𝑛1 𝑛2
𝑡= 1 𝑥1 𝑥2 ~𝑁(0,1)
𝑉 𝑛 −𝑛
1 2
𝑥1 𝑥2
−
𝑛1 𝑛2
𝑡= ~𝑁 0,1
𝑝𝑞 𝑝𝑞
−
𝑛1 𝑛2
𝑥1 𝑥2
−
𝑛1 𝑛2
𝑡= ~𝑁 0,1
1 1
𝑝𝑞 𝑛 + 𝑛
1 2
If p is unknown then
𝑛1 𝑝1 ′ + 𝑛2 𝑝2 ′
𝑝=
𝑛1 + 𝑛2
Goodness of fit
Let there be k classes and let 𝑂𝑖 (observed frequency) be the number of
sample values falling in the 𝑖 𝑡ℎ class. Let 𝐸𝑖 be the expected frequency of
the 𝑖 𝑡ℎ class.
𝑘
2
2
𝑂𝑖 − 𝐸𝑖
𝜒 =
𝐸𝑖
𝑖=1
𝐵1 𝐵2 . . 𝐵𝑗 . . 𝐵𝑠 Total
𝐴1 𝑓11 𝑓12 𝑓1𝑗 𝑓1𝑠 𝑓1.
𝐴2 𝑓21 𝑓22 𝑓2𝑗 𝑓2𝑠 𝑓2.
.
.
𝐴𝑖 𝑓𝑖1 𝑓𝑖2 𝑓𝑖𝑗 𝑓𝑖𝑠 𝑓𝑖.
.
.
𝐴𝑟 𝑓𝑟1 𝑓𝑟2 𝑓𝑟𝑗 𝑓𝑟𝑠 𝑓𝑟.
total 𝑓.1 𝑓.2 𝑓.𝑗 𝑓.𝑠 𝑓..
𝑓𝑖.
𝑃 𝐴𝑖 = 𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑡ℎ𝑎𝑡 𝑎 𝑝𝑒𝑟𝑠𝑜𝑛 𝑝𝑜𝑠𝑠𝑒𝑠𝑠𝑒𝑠 𝑡ℎ𝑒 𝑎𝑡𝑡𝑟𝑖𝑏𝑢𝑡𝑒 𝐴𝑖 =
𝑓..
𝑓.𝑗
𝑃 𝐵𝑗 = 𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑡ℎ𝑎𝑡 𝑎 𝑝𝑒𝑟𝑠𝑜𝑛 𝑝𝑜𝑠𝑠𝑒𝑠𝑠𝑒𝑠 𝑡ℎ𝑒 𝑎𝑡𝑡𝑟𝑖𝑏𝑢𝑡𝑒 𝐵𝑖 =
𝑓..
2
𝑓𝑖. × 𝑓.𝑗
𝑓𝑖𝑗 −
𝑂𝑖 − 𝐸𝑖 2 𝑓..
𝜒2 = =
𝐸𝑖
𝑖 𝑗
𝑓𝑖. × 𝑓.𝑗
𝑓..
Follows chi square distribution with 𝑟 − 1 𝑠 − 1 d.f
If 𝜒 2 > 𝜒 2 𝛼 the hypothesis that the characteristics are independent is to
be rejected.
Show that in a 𝟐 × 𝟐 contingency table where frequencies are 𝒂, 𝒃, 𝒄, 𝒅
2
𝑎 + 𝑏 + 𝑐 + 𝑑 𝑎𝑑 − 𝑏𝑐 2
𝜒 =
𝑎+𝑏 𝑐+𝑑 𝑏+𝑑 𝑎+𝑐
The given table is
A Not A Total
B a b a+b
Not B c d c+d
𝑑𝑎 − 𝑏𝑐 2
=
𝑛 𝑎+𝑏 𝑎+𝑐
Similarly
2
a+b b+d
𝑏− 𝑑𝑎 − 𝑏𝑐 2
𝑛
=
a+b b+d 𝑛 𝑎+𝑏 𝑏+𝑑
𝑛
2
c+d a+c
𝑐− 𝑑𝑎 − 𝑏𝑐 2
𝑛
=
c+d a+c 𝑛 c+d a+c
𝑛
2
c+d b+d
𝑑− 𝑑𝑎 − 𝑏𝑐 2
𝑛
=
c+d b+d 𝑛 c+d b+d
𝑛
𝑑𝑎 −𝑏𝑐 2 𝑑𝑎 −𝑏𝑐 2 𝑑𝑎 −𝑏𝑐 2 𝑑𝑎 −𝑏𝑐 2
So 𝜒 2 = + + +
𝑛 𝑎+𝑏 𝑎+𝑐 𝑛 𝑎 +𝑏 𝑏+𝑑 𝑛 c+d a+c 𝑛 c+d b+d
2
𝑑𝑎 − 𝑏𝑐 1 1 1
= + +
𝑛 𝑎+𝑏 𝑎+𝑐 𝑎+𝑏 𝑏+𝑑 c+d a+c
1
+
c+d b+d
2
𝑑𝑎 − 𝑏𝑐 𝑐 + 𝑑 (𝑏 + 𝑑)
=
𝑛 𝑎 + 𝑏 𝑎 + 𝑐 𝑐 + 𝑑 (𝑏 + 𝑑)
c+d a+c
+
𝑎+𝑏 𝑏+𝑑 c+d a+c
𝑎+𝑏 𝑏+𝑑
+
c+d a+c 𝑎+𝑏 𝑏+𝑑
𝑎+𝑏 𝑎+𝑐
+
c+d b+d 𝑎+𝑏 𝑎+𝑐
2
𝑑𝑎 − 𝑏𝑐 𝑐+𝑑 𝑏+𝑑 + c+d a+c + 𝑎+𝑏 𝑏+𝑑 + 𝑎+𝑏 𝑎+𝑐
=
𝑛 𝑎 + 𝑏 𝑎 + 𝑐 𝑐 + 𝑑 (𝑏 + 𝑑)
2
𝑑𝑎 − 𝑏𝑐 𝑐+𝑑 𝑏+𝑑 + a+c + 𝑎+𝑏 𝑏+𝑑 + 𝑎+𝑐
=
𝑛 𝑎 + 𝑏 𝑎 + 𝑐 𝑐 + 𝑑 (𝑏 + 𝑑)
2
𝑑𝑎 − 𝑏𝑐 𝑐+𝑑 𝑛+ 𝑎+𝑏 𝑛
=
𝑛 𝑎 + 𝑏 𝑎 + 𝑐 𝑐 + 𝑑 (𝑏 + 𝑑)
2
𝑑𝑎 − 𝑏𝑐 𝑛 𝑎+𝑏+𝑐+𝑑
=
𝑛 𝑎+𝑏 𝑎+𝑐 𝑐+𝑑 𝑏+𝑑
𝑑𝑎 − 𝑏𝑐 2 𝑛
=
𝑎+𝑏 𝑎+𝑐 𝑐+𝑑 𝑏+𝑑
Testing of Homogeneity
Sets
1 2 . . k Total
1 𝑓11 𝑓12 𝑓1𝑘 𝑓1.
2 𝑓21 𝑓22 𝑓2𝑘 𝑓2.
Class
.
.
r 𝑓𝑟1 𝑓𝑟2 𝑓𝑟𝑘 𝑓𝑟.
Total 𝑓.1 𝑓.2 𝑓.𝑘 𝑓..