Presentation is loading. Please wait.

Presentation is loading. Please wait.

Example of chai square test (1) false dice

Similar presentations


Presentation on theme: "Example of chai square test (1) false dice"โ€” Presentation transcript:

1 Example of chai square test (1) false dice
When we roll dice 600 times the result is times of each pip is as follows, Is this dice distorted by some one 1: : : : :80 6: 87 We presume the dice is accurate (Null hypothesis) Expectation times of each pip is 100

2 ๐œ’ 2 = ๐‘‘๐‘“ 6โˆ’1=5

3 Chai square probability upper limit df df

4 Example of chai square test (2) Difference in effectiveness of medicine
There are 2 medicines. When we administered medicine A to 116 people, the medicine was effective to 66 persons. When we administered medicine B to 97 people, the medicine is effective to 56 persons. The result is summarized as follow

5 data ratio Expectation value 122 213 91 213 116ร— 122 213 97ร— 122 213
97ร— 116ร—

6 Square of difference ๐‘“ ๐‘– โˆ’ ๐‘’ ๐‘– 2 ๐‘’ ๐‘–
A B observed expected difference Effective 66 55 ineffective 50 41 Square of difference ๐‘“ ๐‘– โˆ’ ๐‘’ ๐‘– ๐‘’ ๐‘– Observed value of ๐œ’ 2 = Degree of freedom 2โˆ’1 2โˆ’1 =1

7 Chai square probability upper limit df df

8 Example of chai square test (3) Social class
Social status is not richness. Even poorest people may think that they are belonging high society, because of their cultural refinement. It is relating to the culture of the area. Following of the data of interview survey asking social level of people. Which do you think you are belonging, high society, middle society or low society. The survey is implemented in A, B, C and D city. We want to know whether there are differences among cities.

9 Expectation value Difference between observed value and expectation value

10 Square of difference Calculation of ๐œ’ 2 value ๐‘“ ๐‘– โˆ’ ๐‘’ ๐‘– ๐‘’ ๐‘– Observed ๐œ’ 2 is Degree of freedom of city is 4-1=3 Degree of freedom of social class is 3-1=2 So, the freedom of this dataset is (4-1)(3-1)=6

11 Chai square probability upper limit df df

12 โ‹ฏ โ‹ฏ Studentโ€™s t test Calculation of observed t t= ๐‘€โˆ’๐œ‡ ๐œŽ ๐‘ ๐‘Ž๐‘š๐‘๐‘™๐‘’ ๐‘›
when ฮผ=0, t= ๐‘€ ๐œŽ ๐‘ ๐‘Ž๐‘š๐‘๐‘™๐‘’ ๐‘› Paired t Comparison between two varieties planted in same pots โ‹ฏ โ‹ฏ Pot 1 Pot 2 Pot N

13 โ‹ฎ ๐‘‘ ๐‘› โˆ’ = ๐‘–=1 ๐‘› ๐‘‘ ๐‘– Sum ๐‘€= 1 ๐‘› ๐‘–=1 ๐‘› ๐‘‘ ๐‘– ๐‘†๐‘†= ๐‘–=1 ๐‘› ๐‘‘ ๐‘– โˆ’๐‘€ 2
๐‘€= 1 ๐‘› ๐‘–=1 ๐‘› ๐‘‘ ๐‘– ๐‘†๐‘†= ๐‘–=1 ๐‘› ๐‘‘ ๐‘– โˆ’๐‘€ 2 ๐œŽ 2 = ๐‘†๐‘† ๐‘›โˆ’1 โ‹ฎ S.E= ๐œŽ ๐‘› Pot n = โˆ’ ๐‘‘ ๐‘› t= ๐‘€ ๐‘†.๐ธ = ๐‘€ ๐œŽ ๐‘› ๐‘–=1 ๐‘› ๐‘‘ ๐‘– Sum

14 Threshold of t value at pโ‰ค0.01 df=4 is 4.604 tโ‰ฅ4.604
Example i A B difference 1 3 2 5 4 7 6 9 n df sum 8 average 1.6 SS 1.2 ฯƒ 2 0.3 ๐‘€=1.6 ๐œŽ ๐‘ = 0.3 t= ๐‘€ ๐‘ ๐œŽ ๐‘ ๐‘› = = Threshold of t value at pโ‰ค0.01 df=4 is tโ‰ฅ4.604 We can conclude that the difference is significant at pโ‰ค0.01 and A is larger than B

15 Unpaired t Fertilizer B ๐‘› ๐ด ๐‘› ๐ต ๐‘‘๐‘“ ๐ด = ๐‘› ๐ด โˆ’1 ๐‘‘๐‘“ ๐ต = ๐‘› ๐ต โˆ’1
๐‘‘๐‘“ ๐ด = ๐‘› ๐ด โˆ’1 ๐‘€ ๐ด = 1 ๐‘› ๐ด ๐‘–=1 ๐‘› ๐ด ๐‘‘ ๐ด๐‘– ๐‘†๐‘† ๐ด = ๐‘–=1 ๐‘› ๐ด ๐‘‘ ๐ด๐‘– โˆ’ ๐‘€ ๐ด 2 ๐œŽ ๐ด 2 = ๐‘†๐‘† ๐ด ๐‘› ๐ด โˆ’1 ๐‘› ๐ต ๐‘‘๐‘“ ๐ต = ๐‘› ๐ต โˆ’1 ๐‘€ ๐ต = 1 ๐‘› ๐ต ๐‘–=1 ๐‘› ๐ต ๐‘‘ ๐ต๐‘– ๐‘†๐‘† ๐ต = ๐‘–=1 ๐‘› ๐ต ๐‘‘ ๐ต๐‘– โˆ’ ๐‘€ ๐ต 2 ๐œŽ ๐ต 2 = ๐‘†๐‘† ๐ต ๐‘› ๐ต โˆ’1

16 s 2 = 1 ๐‘š ๐œŽ ๐ดโˆ’๐ต 2 + 1 ๐‘› ๐œŽ ๐ดโˆ’๐ต 2 = 1 ๐‘š + 1 ๐‘› ๐œŽ ๐ดโˆ’๐ต 2
Degree of freedom ๐‘‘๐‘“ ๐ดโˆ’๐ต = ๐‘‘๐‘“ ๐ด + ๐‘‘๐‘“ ๐ต = ๐‘› ๐ด + ๐‘› ๐ต โˆ’2 Quadratic moment of around ๐œ‡ (center of parent population) We presume homoscendasticity ๐œŽ ๐ด 2 = ๐œŽ ๐ต 2 = ๐œŽ ๐ดโˆ’๐ต 2 = ๐œŽ ๐ด+๐ต 2 E ๐‘€ ๐ด 2 = 1 ๐‘› ๐ด ๐œŽ ๐ด 2 = 1 ๐‘› ๐ด ๐œŽ ๐ดโˆ’๐ต 2 E ๐‘€ ๐ต 2 = 1 ๐‘› ๐ต ๐œŽ ๐ต 2 = 1 ๐‘› ๐ต ๐œŽ ๐ดโˆ’๐ต 2 s 2 =E ๐‘€ ๐ดโˆ’๐ต 2 =E ๐‘€ ๐ด+๐ต 2 =E ๐‘€ ๐ด 2 +E ๐‘€ ๐ต 2 s 2 = 1 ๐‘š ๐œŽ ๐ดโˆ’๐ต ๐‘› ๐œŽ ๐ดโˆ’๐ต 2 = 1 ๐‘š + 1 ๐‘› ๐œŽ ๐ดโˆ’๐ต 2 s= ๐œŽ ๐ดโˆ’๐ต 1 ๐‘š + 1 ๐‘› E ๐‘€ ๐ดโˆ’๐ต 2 = E ๐‘€ ๐ด ๐ธ ๐‘€ ๐ด ๐ธ ๐‘€ ๐ต +E ๐‘€ ๐ต 2 = E ๐‘€ ๐ด 2 +E ๐‘€ ๐ต 2 โˆต๐ธ ๐‘€ ๐ด =๐ธ ๐‘€ ๐ต =0 From null hypothesis liner moment of observed average is 0.

17 Definition of standard error: ๐œŽ ๐ดโˆ’๐ต ๐‘› ๐ดโˆ’๐ต =๐‘ ,
๐œŽ ๐ดโˆ’๐ต ๐‘› ๐ดโˆ’๐ต = ๐œŽ ๐ดโˆ’๐ต ๐‘› ๐ด ๐‘› ๐ต ๐‘› ๐ดโˆ’๐ต = ๐‘› ๐ด ๐‘› ๐ต = ๐‘› ๐ด ๐‘› ๐ต ๐‘› ๐ด + ๐‘› ๐ต ๐‘› ๐ดโˆ’๐ต = ๐‘› ๐ด ๐‘› ๐ต ๐‘› ๐ด + ๐‘› ๐ต t= ๐‘€ ๐ด โˆ’ ๐‘€ ๐ต ๐œŽ ๐ดโˆ’๐ต ๐‘› ๐ด ๐‘› ๐ต

18 Variance of A-B is similar to that of A+B, it can be obtained as weighted mean by each degree of freedom. ๐œŽ ๐ดโˆ’๐ต 2 = ๐œŽ ๐ด+๐ต 2 = ๐‘› ๐ด โˆ’1 ๐œŽ ๐ด ๐‘› ๐ด โˆ’1 + ๐‘› ๐ต โˆ’ ๐‘› ๐ต โˆ’1 ๐œŽ ๐ต ๐‘› ๐ด โˆ’1 + ๐‘› ๐ต โˆ’1 = ๐‘› ๐ด โˆ’1 ๐œŽ ๐ด ๐‘› ๐ต โˆ’1 ๐œŽ ๐ต 2 ๐‘› ๐ด + ๐‘› ๐ต โˆ’2 ๐œŽ ๐ดโˆ’๐ต 2 = ๐œŽ ๐ด+๐ต 2 = ๐‘†๐‘† ๐ด + ๐‘†๐‘† ๐ต ๐‘› ๐ด + ๐‘› ๐ต โˆ’2

19 Example A B 1 5 6 8 n 3 4 df 2 sum 12 20 average SS 14 26 ๐œŽ 2 7 8.6667 A : ๐‘› ๐ด =3, df ๐ด =2, ๐‘€ A ๏ผ4, ๐‘†๐‘† ๐ด =14 B๏ผš ๐‘› ๐ต =4, df ๐ต =3, ๐‘€ ๐ต =5, ๐‘†๐‘† ๐ต =26 A-B : ๐‘› ๐ดโˆ’๐ต = ๐‘› ๐ด ๐‘› ๐ต ๐‘› ๐ด + ๐‘› ๐ต = 3ร—4 3+4 = Df ๐ดโˆ’๐ต = df ๐ด + df ๐ต =2+3=5

20 ๐‘€ ๐ด โˆ’ ๐‘€ ๐ต =5โˆ’4=1 ๐‘†๐‘† ๐ดโˆ’๐ต = ๐‘†๐‘† ๐ด + ๐‘†๐‘† ๐ต =14+26=40 ฯƒ ๐ดโˆ’๐ต 2 = ๐‘†๐‘† ๐ดโˆ’๐ต df ๐ดโˆ’๐ต = 40 5 =8 ฯƒ ๐ดโˆ’๐ต = 8 t= ๐‘€ ๐ด โˆ’ ๐‘€ ๐ต ๐œŽ ๐ดโˆ’๐ต ๐‘› ๐ดโˆ’๐ต = = Threshold of t value (๐‘โ‰ค0.05) is 2.571 t<2.571 We cannot deny the null hypothesis that ๐‘€ ๐ด โˆ’ ๐‘€ ๐ต =0, ( ๐‘€ ๐ด = ๐‘€ ๐ต ). From this, we cannot conclude that averages of A and B is different, and we cannot say that sample populations A and B are taken from the different parent population.

21 F test ๏ผšLogical structure of F test is simple.
It is only comparison between two variables. In the case of example of unpaired t test We need to confirm equality of variances before t test.ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€ A B 1 5 6 8 n 3 4 df 2 sum 12 20 average SS 14 26 ๐œŽ 2 7 8.6667 ๐น= ๐œŽ ๐ต ๐œŽ ๐ด 2 = =

22 ๏ผฆdistributionใ€€๏ผˆ๐‘=0.05 one side๏ผ‰
f1 f Theoretical threshold at df of denominator 2 and df of numerator is 3 is Observed F is This value is far smaller than , we can conclude that there is no reason to deny similarity of variances between denominator and numerator.

23 Technical difficulty of F test is separation of variances of data.
The variance of data is composed from several causes. When we consider combined effect among plural causes the structure of variance is sometimes complicated depending on the experimental or survey design. However, there three categories of causes of variance 1. Main effect: variances caused by experimental conditions or categories of data to compare. Difference explained by designed factor 2. Residuals: Variance caused by unknown factors. Randomly sampled data include influence of unknown factors. 3. Interaction: Unexpectedly obtained variances caused by combination of designed condition.

24 Experimental design (On way ANOVA)
๐‘› ๐ด ๐‘› ๐ต ๐‘› ๐ถ Main effect: Differences of fertilizer โœ” Residuals: Randomness โœ” 3. Interaction: not exist โˆ’

25 Data F 1, F 2, โ‹ฏ F ๐‘” ๐‘‘ ๐‘‘ โ‹ฏ ๐‘‘ ๐‘”1 ๐‘‘ ๐‘‘ โ‹ฏ ๐‘‘ ๐‘”2 โ‹ฎ โ‹ฎ โ‹ฑ โ‹ฎ ๐‘‘ 1 ๐‘› 1 ๐‘‘ 1 ๐‘› โ‹ฎ ๐‘‘ ๐‘” ๐‘› ๐‘” Size ๐‘› ๐‘› โ‹ฏ ๐‘› ๐‘” Sum ๐‘–=1 ๐‘› 1 ๐‘‘ 1๐‘– , ๐‘–=1 ๐‘› 2 ๐‘‘ 2๐‘– โ‹ฏ ๐‘–=1 ๐‘› ๐‘” ๐‘‘ ๐‘”๐‘– Average ๐‘€ 1 = 1 ๐‘› 1 ๐‘–=1 ๐‘› 1 ๐‘‘ 1๐‘– , ๐‘€ 2 = 1 ๐‘› 2 ๐‘–=1 ๐‘› 2 ๐‘‘ 2๐‘– โ‹ฏ, ๐‘€ ๐‘” = 1 ๐‘› ๐‘ ๐‘–=1 ๐‘› ๐‘” ๐‘‘ ๐‘”๐‘– SS SS 1 = ๐‘–=1 ๐‘› ๐‘‘ 1๐‘– โˆ’ ๐‘€ SS 2 = ๐‘–=1 ๐‘› ๐‘‘ 2๐‘– โˆ’ ๐‘€ โ‹ฏ SS ๐‘” = ๐‘–=1 ๐‘› ๐‘‘ ๐‘”๐‘– โˆ’ ๐‘€ ๐‘” 2 ฯƒ ฯƒ 1 2 = SS 1 ๐‘› 1 , ฯƒ 2 2 = SS 2 ๐‘› 2 , โ‹ฏ, ฯƒ ๐‘” 2 = SS ๐‘” ๐‘› ๐‘”

26 SS ๐‘‡ = ๐‘—=1 ๐‘” ๐‘–=1 ๐‘› ๐‘— ๐‘‘ ๐‘—๐‘– โˆ’ ๐‘€ ๐‘‡ 2 , ฯƒ ๐‘‡ 2 = SS ๐‘‡ ๐‘โˆ’1
Total ๐‘= ๐‘—=1 ๐‘” ๐‘› ๐‘— , Sum ๐‘‡๐‘œ๐‘ก๐‘™๐‘Ž = ๐‘—=1 ๐‘” ๐‘–=1 ๐‘› ๐‘” ๐‘‘ ๐‘—๐‘– Average: ๐‘€ ๐‘‡ 1 ๐‘ ๐‘—=1 ๐‘” ๐‘–=1 ๐‘› ๐‘” ๐‘‘ ๐‘—๐‘– SS ๐‘‡ = ๐‘—=1 ๐‘” ๐‘–=1 ๐‘› ๐‘— ๐‘‘ ๐‘—๐‘– โˆ’ ๐‘€ ๐‘‡ , ฯƒ ๐‘‡ 2 = SS ๐‘‡ ๐‘โˆ’1 Separation of SS ๐‘‘ ๐‘—๐‘– โˆ’ ๐‘€ ๐‘‡ = ๐‘‘ ๐‘—๐‘– โˆ’ ๐‘€ ๐‘— + ๐‘€ ๐‘— โˆ’ ๐‘€ ๐‘‡ = ๐‘’ ๐‘–๐‘— + ๐ธ ๐‘— ๐‘’ ๐‘–๐‘— : deviation of data from mean of subsample ๐ธ ๐‘— : deviation of mean of subsample from total mean = ๐‘–=1 ๐‘› ๐‘— ๐‘‘ ๐‘—๐‘– โˆ’ ๐‘€ ๐‘‡ 2 = ๐‘–=1 ๐‘› ๐‘— ๐‘’ ๐‘–๐‘— + ๐ธ ๐‘— 2 = ๐‘–=1 ๐‘› ๐‘— ๐‘’ ๐‘–๐‘— ๐ธ ๐‘— ๐‘–=1 ๐‘› ๐‘— ๐‘’ ๐‘–๐‘— + ๐‘–=1 ๐‘› ๐‘— ๐ธ ๐‘— 2 = ๐‘–=1 ๐‘› ๐‘— ๐‘’ ๐‘–๐‘— 2 + ๐‘› ๐‘— ๐ธ ๐‘— 2 = SS ๐‘— + ๐‘› ๐‘— ๐ธ ๐‘— 2 SS ๐‘‡ = ๐‘—=1 ๐‘” ๐‘–=1 ๐‘› ๐‘— ๐‘‘ ๐‘—๐‘– โˆ’ ๐‘€ ๐‘‡ 2 = ๐‘—=1 ๐‘” SS ๐‘— + ๐‘› ๐‘— ๐ธ ๐‘— = ๐‘—=1 ๐‘” SS ๐‘— + ๐‘—=1 ๐‘” ๐‘› ๐‘— ๐ธ ๐‘— 2

27 SS ๐‘‡ = ๐‘—=1 ๐‘” SS ๐‘— + ๐‘—=1 ๐‘” ๐‘› ๐‘— ๐ธ ๐‘— 2 ๐‘—=1 ๐‘” ๐‘› ๐‘— ๐ธ ๐‘— 2 = SS ๐‘‡ โˆ’ ๐‘—=1 ๐‘” SS ๐‘— SS ๐‘— is residual removeing maineffect, randomness SS ๐‘‡ is comosed from SSresidual and SS main effect ๐‘—=1 ๐‘” ๐‘› ๐‘— ๐ธ ๐‘— 2 is maine SS of main effect SS ๐‘‡ = ๐‘†๐‘† ๐‘“๐‘Ž๐‘๐‘ก๐‘œ๐‘Ÿ + ๐‘†๐‘† ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ ๐‘†๐‘† ๐‘“๐‘Ž๐‘๐‘ก๐‘œ๐‘Ÿ = ๐‘—=1 ๐‘” ๐‘› ๐‘— ๐ธ ๐‘— 2 ๐‘‘๐‘“ ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ =๐‘โˆ’1= ๐‘—=1 ๐‘” ๐‘› ๐‘— โˆ’1 ๐‘‘๐‘“ ๐‘“๐‘Ž๐‘๐‘ก๐‘œ๐‘Ÿ =๐‘”โˆ’1 ๐‘‘๐‘“ ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ = ๐‘โˆ’1 โˆ’ ๐‘”โˆ’1 = ๐‘—=1 ๐‘” ๐‘› ๐‘— โˆ’1 =๐‘โˆ’๐‘” ๐œŽ ๐‘“๐‘Ž๐‘๐‘ก๐‘œ๐‘Ÿ 2 = ๐‘†๐‘† ๐‘“๐‘Ž๐‘๐‘ก๐‘œ๐‘Ÿ ๐‘‘๐‘“ ๐‘“๐‘Ž๐‘๐‘ก๐‘œ๐‘Ÿ , ๐œŽ ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ 2 = ๐‘†๐‘† ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ ๐‘‘๐‘“ ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘’๐‘ข๐‘Ž๐‘™ ๐น= ๐œŽ ๐‘“๐‘Ž๐‘๐‘ก๐‘œ๐‘Ÿ ๐œŽ ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ 2

28 Facilitation of calculation of sum of square
๐‘†๐‘†= ๐‘–=1 ๐‘› ๐‘ฅ ๐‘– โˆ’ ๐‘ฅ 2 = ๐‘–=1 ๐‘› ๐‘ฅ ๐‘– 2 โˆ’2 ๐‘–=1 ๐‘› ๐‘ฅ ๐‘– ๐‘ฅ + ๐‘–=1 ๐‘› ๐‘ฅ 2 = ๐‘–=1 ๐‘› ๐‘ฅ ๐‘– 2 โˆ’2 ๐‘ฅ ๐‘–=1 ๐‘› ๐‘ฅ ๐‘– +๐‘› ๐‘ฅ 2 = ๐‘–=1 ๐‘› ๐‘ฅ ๐‘– 2 โˆ’ ๐‘–=1 ๐‘› ๐‘ฅ ๐‘– ๐‘› =๐‘†โˆ’ ๐‘‡ 2 ๐‘› โˆต ๐‘ฅ = ๐‘–=1 ๐‘› ๐‘ฅ ๐‘– ๐‘› ๐‘† ๐‘– = ๐‘—=1 ๐‘› ๐‘– ๐‘ฅ ๐‘–๐‘— 2 , ๐‘‡ ๐‘– = ๐‘—=1 ๐‘› ๐‘– ๐‘ฅ ๐‘–๐‘— ๐‘†๐‘† ๐‘– = ๐‘† ๐‘– โˆ’ ๐‘‡ ๐‘– 2 ๐‘› ๐‘– ๐‘†๐‘† ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ =๐‘† ๐‘† 1 +๐‘† ๐‘† 2 +โ€ฆ+๐‘† ๐‘† 1 = ๐‘† 1 โˆ’ ๐‘‡ ๐‘› 1 + ๐‘† 2 โˆ’ ๐‘‡ ๐‘› 2 +โ‹ฏ+ ๐‘† ๐‘– โˆ’ ๐‘‡ ๐‘– 2 ๐‘› ๐‘– +โ‹ฏ+ ๐‘† ๐‘› โˆ’ ๐‘‡ ๐‘› 2 ๐‘› ๐‘› ๐‘†โˆ’ ๐‘‡ ๐‘› ๐‘‡ ๐‘› 2 +โ‹ฏ+ ๐‘‡ ๐‘– 2 ๐‘› ๐‘– +โ‹ฏ+ ๐‘‡ ๐‘› 2 ๐‘› ๐‘› ๐‘†= ๐‘† 1 + ๐‘† 2 +โ‹ฏ+ ๐‘† ๐‘– + โ‹ฏ+๐‘† ๐‘› SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ =Sโˆ’ ๐‘‡ 2 ๐‘› ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™

29 SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ = SS ๐‘“๐‘Ž๐‘๐‘ก๐‘œ๐‘Ÿ + SS ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™
= ๐‘‡ ๐‘› ๐‘‡ ๐‘› 2 +โ‹ฏ+ ๐‘‡ ๐‘– 2 ๐‘› ๐‘– +โ‹ฏ+ ๐‘‡ ๐‘› 2 ๐‘› ๐‘› โˆ’ ๐‘‡ 2 ๐‘› = ๐‘–=1 ๐‘ ๐‘‡ ๐‘– 2 ๐‘› ๐‘– โˆ’ ๐‘‡ 2 ๐‘› ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ SS ๐‘“๐‘Ž๐‘๐‘ก๐‘œ๐‘Ÿ = ๐‘–=1 ๐‘ ๐‘‡ ๐‘– 2 ๐‘› ๐‘– โˆ’ ๐‘‡ 2 ๐‘› ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™

30 ๐ธ๐‘ฅ๐‘Ž๐‘š๐‘๐‘™๐‘’ Sub population 1 2 3 4 sum 10 8 9 5 7 15 12 13 14 ๐‘› ๐‘– 6 24 N ๐‘‡ ๐‘– 31 67 27 61 186 T ๐‘ฅ ๐‘– 9.25 5.4 ๐‘† ๐‘– 199 791 163 699 1852 S ๐‘‡ ๐‘– 2 ๐‘› ๐‘– 145.8

31 ใ€€ ๐‘› ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ =24 T=186 S=1852 ๐‘–= ๐‘‡ ๐‘– 2 ๐‘› ๐‘– = ๐‘†๐‘† ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ =1852โˆ’ =1852โˆ’1441.5=410.5 ๐‘†๐‘† ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ =1852โˆ’ = ๐‘†๐‘† ๐‘“๐‘Ž๐‘๐‘ก๐‘œ๐‘Ÿ = โˆ’ = โˆ’1441.5= df ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ =24โˆ’1=23 ใ€€ df ๐‘“๐‘Ž๐‘๐‘ก๐‘œ๐‘Ÿ =4โˆ’1=3 df ๐‘“๐‘Ž๐‘๐‘ก๐‘œ๐‘Ÿ =23โˆ’3=20 ๐œŽ ๐‘“๐‘Ž๐‘๐‘ก๐‘œ๐‘Ÿ 2 = =41.973 ใ€€ ๐œŽ ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ 2 = = F ratio= ๐œŽ ๐‘“๐‘Ž๐‘๐‘ก๐‘œ๐‘Ÿ ๐œŽ ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ 2 = โ‰ˆ2.9498 Threshold of F in F distribution table (p=0.05) at df ๐‘›๐‘ข๐‘š๐‘’๐‘Ÿ๐‘Ž๐‘ก๐‘œ๐‘Ÿ =3, df ๐‘‘๐‘’๐‘›๐‘œ๐‘š๐‘–๐‘›๐‘Ž๐‘ก๐‘œ๐‘Ÿ =20 is ใ€€Observed F=2.9498<3.0983 We cannot conclude that there is different among sub populations.

32 Sum of square degree of freedom mean square F ๐‘œ๐‘๐‘ ๐‘’๐‘Ÿ๐‘ฃ๐‘’๐‘‘ p F ๐‘กโ„Ž๐‘Ÿ๐‘’๐‘ โ„Ž๐‘œ๐‘™๐‘‘
An example of expression of the result of analysis variance table ใ€€ใ€€ใ€€ใ€€ Sum of squareใ€€degree of freedomใ€€mean square F ๐‘œ๐‘๐‘ ๐‘’๐‘Ÿ๐‘ฃ๐‘’๐‘‘ p F ๐‘กโ„Ž๐‘Ÿ๐‘’๐‘ โ„Ž๐‘œ๐‘™๐‘‘ Sourceใ€€ใ€€ใ€€ใ€€ใ€€ (SS) (df) (MS= ฯƒ 2 ) among population ใ€€ใ€€ใ€€ ใ€€3ใ€€ใ€€ใ€€ใ€€ ใ€€ใ€€ใ€€ residualใ€€ใ€€ใ€€ใ€€ใ€€ ใ€€ใ€€ใ€€

33 โ‹ฎ โ‹ฑ โ‹ฏ Main effect: Differences of fertilizer โœ”
Two way ANOVA without replication Phosphate level โ‹ฏ โ‹ฎ โ‹ฑ ๐‘=1, ๐‘ƒ=1 ๐‘=1, ๐‘ƒ=2 ๐‘=1, ๐‘ƒ= ๐œ‘ ๐‘ ๐‘=1, ๐‘ƒ= ๐œ‘ ๐‘ Combined impacts of Phosphate level and nitrogen level in fertilize on the growth of a plant Nitrogen level ๐‘= ๐œ‘ ๐‘› , ๐‘ƒ=2 ๐‘= ๐œ‘ ๐‘› , ๐‘ƒ= ๐œ‘ ๐‘ ๐‘= ๐œ‘ ๐‘› , ๐‘ƒ=1 Main effect: Differences of fertilizer โœ” Interaction + Residuals: Randomness+ โœ”

34 Factor A size sum mean Factor B โ‹ฏ ๐‘› ๐‘Ž ๐‘‘ ๐‘‘ โ‹ฏ ๐‘‘ 1 ๐‘› ๐‘Ž ๐‘› ๐‘Ž ๐‘‡ ๐‘1 = ๐‘—=1 ๐‘› ๐‘Ž ๐‘‘ 1๐‘— ๐‘€ ๐‘1 = ๐‘‡ ๐‘1 ๐‘› ๐‘Ž ๐‘‘ ๐‘‘ โ‹ฏ ๐‘‘ 2 ๐‘› ๐‘Ž ๐‘› ๐‘Ž ๐‘‡ ๐‘2 = ๐‘—=1 ๐‘› ๐‘Ž ๐‘‘ 2๐‘— ๐‘€ ๐‘2 = ๐‘‡ ๐‘2 ๐‘› ๐‘Ž โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฑ โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฎ ๐‘› ๐‘ ๐‘‘ ๐‘› ๐‘ ๐‘‘ ๐‘› ๐‘ 2 โ‹ฏ ๐‘‘ ๐‘› ๐‘ ๐‘› ๐‘Ž ๐‘› ๐‘Ž ๐‘‡ ๐‘ ๐‘› ๐‘ = ๐‘—=1 ๐‘› ๐‘Ž ๐‘‘ ๐‘› ๐‘๐‘— ๐‘€ ๐‘ ๐‘› ๐‘ = ๐‘‡ ๐‘ ๐‘› ๐‘ ๐‘› ๐‘Ž Size ๐‘› ๐‘ ๐‘› ๐‘ โ‹ฏ ๐‘› ๐‘ โˆ’ ๐‘= ๐‘› ๐‘Ž ๐‘› ๐‘ โˆ’ Sum ๐‘‡ ๐‘Ž ๐‘‡ ๐‘Ž ๐‘‡ ๐‘Ž ๐‘› ๐‘Ž ๐‘= ๐‘› ๐‘Ž ๐‘› ๐‘ โˆ’ ๐‘‡ ๐‘› ๐‘Ž Average ๐‘€ ๐‘Ž1 ๐‘€ ๐‘Ž2 โ‹ฏ ๐‘€ ๐‘Ž ๐‘› ๐‘Ž โˆ’ ๐‘‡ ๐‘› ๐‘ ๐‘€= ๐‘‡ ๐‘› ๐‘Ž ๐‘‡ ๐‘Ž๐‘— = ๐‘–=1 ๐‘› ๐‘ ๐‘‘ ๐‘–๐‘— , ๐‘€ ๐‘Ž๐‘— = ๐‘‡ ๐‘Ž๐‘— ๐‘› ๐‘ , ๐‘‡= ๐‘–=1 ๐‘› ๐‘ ๐‘—=1 ๐‘› ๐‘Ž ๐‘‘ ๐‘–๐‘— ๐‘€ ๐‘Ž = 1 ๐‘› ๐‘Ž ๐‘—=1 ๐‘› ๐‘Ž ๐‘€ ๐‘Ž๐‘— , ๐‘€ ๐‘ = 1 ๐‘› ๐‘ ๐‘—=1 ๐‘› ๐‘ ๐‘€ ๐‘๐‘—

35 ๐‘†๐‘† ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ = ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐‘‘ ๐‘–๐‘— โˆ’๐‘€ 2
๐‘†๐‘† ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ = ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐‘‘ ๐‘–๐‘— โˆ’๐‘€ 2 = ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐‘‘ ๐‘–๐‘— โˆ’ ๐‘€ ๐‘Ž๐‘— โˆ’๐‘€ + ๐‘€ ๐‘๐‘– โˆ’๐‘€ +๐‘€ + ๐‘€ ๐‘Ž๐‘— โˆ’๐‘€ + ๐‘€ ๐‘ โˆ’๐‘€ 2 ๐‘’ ๐‘–๐‘— =๐‘‘ ๐‘—๐‘˜ โˆ’ ๐‘€ ๐‘Ž๐‘— โˆ’๐‘€ + ๐‘€ ๐‘๐‘– โˆ’๐‘€ +๐‘€ ๐ธ ๐‘Ž๐‘— = ๐‘€ ๐‘Ž๐‘— โˆ’๐‘€, ๐ธ ๐‘๐‘– = ๐‘€ ๐‘Ž๐‘– โˆ’๐‘€ ๐‘†๐‘† ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ = ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐‘’ ๐‘–๐‘— + ๐ธ ๐‘Ž๐‘— + ๐ธ ๐‘๐‘– 2 = ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐‘’ ๐‘–๐‘— ๐ธ ๐‘Ž๐‘— ๐ธ ๐‘๐‘– ๐‘’ ๐‘–๐‘— ๐ธ ๐‘Ž๐‘— + ๐ธ ๐‘Ž๐‘— ๐ธ ๐‘๐‘– + ๐ธ ๐‘๐‘– ๐‘’ ๐‘–๐‘— = ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐‘’ ๐‘–๐‘— ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐ธ ๐‘Ž๐‘— ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐ธ ๐‘๐‘– 2 = ๐‘†๐‘† ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘ข๐‘‘๐‘ข๐‘Ž๐‘™ + ๐‘› ๐‘ ๐‘†๐‘† ๐‘Ž + ๐‘› ๐‘Ž ๐‘†๐‘† ๐‘ ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐‘’ ๐‘–๐‘— ๐ธ ๐‘Ž๐‘— = ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐ธ ๐‘Ž๐‘— ๐ธ ๐‘๐‘– = ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐ธ ๐‘๐‘– ๐‘’ ๐‘–๐‘— =0 ๐œŽ ๐‘Ž 2 = ๐‘†๐‘† ๐‘Ž ๐‘‘๐‘“ ๐‘Ž , ๐œŽ ๐‘ 2 = ๐‘†๐‘† ๐‘ ๐‘‘๐‘“ ๐‘ ๐œŽ ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ 2 = ๐‘†๐‘† ๐‘Ÿ๐‘’๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ ๐‘‘๐‘“ ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ ๐น ๐‘Ž = ๐œŽ ๐‘Ž ๐œŽ ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ 2 , ๐น ๐‘ = ๐œŽ ๐‘ ๐œŽ ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘๐‘ข๐‘Ž๐‘™ 2

36 Facilitation of calculation
๐‘› ๐‘ ๐‘†๐‘† ๐‘Ž = ๐‘†๐‘† ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ โˆ’ ๐‘†๐‘† ๐‘–๐‘›๐‘ก๐‘’๐‘Ÿ๐‘Ž๐‘๐‘ก๐‘–๐‘œ๐‘› + ๐‘› ๐‘Ž ๐‘†๐‘† ๐‘ ๐‘› ๐‘Ž ๐‘†๐‘† ๐‘ = ๐‘†๐‘† ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ โˆ’ ๐‘†๐‘† ๐‘–๐‘›๐‘ก๐‘’๐‘Ÿ๐‘Ž๐‘๐‘ก๐‘–๐‘œ๐‘› + ๐‘› ๐‘ ๐‘†๐‘† ๐‘Ž We calculate SS in a row ๐‘†๐‘† ๐‘Ÿ๐‘– = ๐‘—=1 ๐‘› ๐‘Ž ๐‘‘ ๐‘–๐‘— โˆ’ 1 ๐‘› ๐‘Ž ๐‘—=1 ๐‘› ๐‘Ž ๐‘‘ ๐‘–๐‘— 2 ๐‘—=1 ๐‘› ๐‘Ž ๐‘‘ ๐‘–๐‘— = ๐‘—=1 ๐‘› ๐‘Ž ๐‘’ ๐‘–๐‘— + ๐ท ๐‘๐‘– + ๐ท ๐‘Ž๐‘— +๐‘€ = ๐‘—=1 ๐‘› ๐‘Ž ๐‘’ ๐‘–๐‘— + ๐‘› ๐‘Ž ๐ท ๐‘๐‘– + ๐‘› ๐‘Ž ๐‘€+ ๐‘—=1 ๐‘› ๐‘Ž ๐ท ๐‘Ž๐‘— = ๐‘—=1 ๐‘› ๐‘Ž ๐‘’ ๐‘–๐‘— + ๐‘› ๐‘Ž ๐ท ๐‘๐‘– + ๐‘› ๐‘Ž ๐‘€ ๐‘—=1 ๐‘› ๐‘Ž ๐ท ๐‘Ž๐‘— =0 1 ๐‘› ๐‘Ž ๐‘—=1 ๐‘› ๐‘Ž ๐‘‘ ๐‘–๐‘— = 1 ๐‘› ๐‘Ž ๐‘—=1 ๐‘› ๐‘Ž ๐‘’ ๐‘–๐‘— + ๐ท ๐‘๐‘– +๐‘€ ๐‘‘ ๐‘–๐‘— โˆ’ 1 ๐‘› ๐‘Ž ๐‘—=1 ๐‘› ๐‘Ž ๐‘‘ ๐‘–๐‘— = ๐‘’ ๐‘–๐‘— + ๐ท ๐‘๐‘– + ๐ท ๐‘Ž๐‘— +๐‘€โˆ’ 1 ๐‘› ๐‘Ž ๐‘—=1 ๐‘› ๐‘Ž ๐‘’ ๐‘–๐‘— + ๐ท ๐‘๐‘– +๐‘€ = ๐‘’ ๐‘–๐‘— โˆ’ 1 ๐‘› ๐‘Ž ๐‘—=1 ๐‘› ๐‘Ž ๐‘’ ๐‘–๐‘— + ๐ท ๐‘Ž๐‘— = ๐œ€ ๐‘–๐‘— + ๐ท ๐‘Ž๐‘— โˆต๐œ€ ๐‘–๐‘— = ๐‘’ ๐‘–๐‘— โˆ’ 1 ๐‘› ๐‘Ž ๐‘—=1 ๐‘› ๐‘Ž ๐‘’ ๐‘–๐‘—

37 ๐‘†๐‘† ๐‘Ÿ๐‘– = ๐‘—=1 ๐‘› ๐‘Ž ๐œ€ ๐‘–๐‘— + ๐ท ๐‘Ž๐‘— 2 = ๐‘—=1 ๐‘› ๐‘Ž ๐œ€ ๐‘–๐‘— 2 +2 ๐‘—=1 ๐‘› ๐‘Ž ๐œ€ ๐‘–๐‘— ๐ท ๐‘Ž๐‘— + ๐‘—=1 ๐‘› ๐‘Ž ๐ท ๐‘Ž๐‘— 2
๐‘–=1 ๐‘› ๐‘ ๐‘†๐‘† ๐‘Ÿ๐‘– = ๐‘–=1 ๐‘› ๐‘ ๐‘—=1 ๐‘› ๐‘Ž ๐œ€ ๐‘–๐‘— ๐‘–=1 ๐‘› ๐‘ ๐‘—=1 ๐‘› ๐‘Ž ๐œ€ ๐‘–๐‘— ๐ท ๐‘Ž๐‘— + ๐‘–=1 ๐‘› ๐‘ ๐‘—=1 ๐‘› ๐‘Ž ๐ท ๐‘Ž๐‘— 2 = ๐‘–=1 ๐‘› ๐‘ ๐‘—=1 ๐‘› ๐‘Ž ๐œ€ ๐‘–๐‘— ๐‘› ๐‘ ๐‘—=1 ๐‘› ๐‘Ž ๐ท ๐‘Ž๐‘— 2 โˆต ๐‘–=1 ๐‘› ๐‘ ๐‘—=1 ๐‘› ๐‘Ž ๐œ€ ๐‘–๐‘— ๐ท ๐‘Ž๐‘— =0 ๐‘†๐‘† ๐‘Ÿ = ๐‘–=1 ๐‘› ๐‘ ๐‘†๐‘† ๐‘Ÿ๐‘– , ๐‘†๐‘† ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ = ๐‘–=1 ๐‘› ๐‘ ๐‘—=1 ๐‘› ๐‘Ž ๐œ€ ๐‘–๐‘— 2 ๐‘†๐‘† ๐‘Ÿ = ๐‘†๐‘† ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ + ๐‘› ๐‘ ๐‘†๐‘† ๐ด Similarly ๐‘†๐‘† ๐‘ = ๐‘†๐‘† ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ + ๐‘› ๐‘Ž ๐‘†๐‘† ๐ต ๐‘†๐‘† ๐‘ ;๐‘†๐‘† ๐‘œ๐‘“ ๐‘๐‘œ๐‘™๐‘ข๐‘š๐‘› ๐‘› ๐‘ ๐‘†๐‘† ๐ด = ๐‘†๐‘† ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ โˆ’ ๐‘†๐‘† ๐‘ ๐‘› ๐‘Ž ๐‘†๐‘† ๐ต = ๐‘†๐‘† ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ โˆ’ ๐‘†๐‘† ๐‘Ÿ

38 Example of dataset A: contents of phosphate B: contents of nitrogen A1 A2 A3 B1 11 8 B2 10 13 19 B3 9 18 B4 14

39 Calculation process A1 A2 A3 ๐‘› ๐‘‡ ๐‘– ๐‘† ๐‘– ๐‘–=1 ๐‘› ๐‘‡ ๐‘– 2 ๐‘›
๐‘–=1 ๐‘› ๐‘‡ ๐‘– 2 ๐‘› ๐‘† ๐‘– โˆ’ ๐‘–=1 ๐‘› ๐‘‡ ๐‘– 2 ๐‘› B1 11 8 3 30 306 300 6 B2 10 13 19 42 630 588 B3 9 18 45 729 675 54 B4 14 51 881 867 4 12 168 2546 2352 116 ๐‘‡ ๐‘— 44 60 64 ๐‘† ๐‘— 498 938 1110 ๐‘—=1 ๐‘› ๐‘‡ ๐‘— 2 ๐‘› 484 900 1024 ๐‘† ๐‘— โˆ’ ๐‘—=1 ๐‘› ๐‘‡ ๐‘— 2 ๐‘› 38 86 138 194 ๐‘†๐‘† ๐‘Ÿ = ๐‘†๐‘† ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ + ๐‘› ๐‘ ๐‘†๐‘† ๐ด ๐‘†๐‘† ๐‘ = ๐‘†๐‘† ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ + ๐‘› ๐‘Ž ๐‘†๐‘† ๐ต ๐‘†๐‘† ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ ๐‘†๐‘† ๐‘ = ๐‘†๐‘† ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ + ๐‘› ๐‘Ž ๐‘†๐‘† ๐ต

40 ๐‘†๐‘† ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ =194 4 ๐‘†๐‘† ๐ด =194โˆ’138=56 3 ๐‘†๐‘† ๐ต =194โˆ’116=78 ๐‘†๐‘† ๐‘–๐‘›๐‘ก๐‘’๐‘Ÿ๐‘Ž๐‘๐‘ก๐‘–๐‘œ๐‘› =194โˆ’56โˆ’78=60 ๐‘†๐‘† ๐ด = 56 4 =14 ๐‘†๐‘† ๐ต = 78 3 =26

41 Analysis of variance table
Sourceใ€€ใ€€ใ€€ SS df MS Observed F p threshold F Aใ€€ใ€€ใ€€ใ€€ ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€2 ใ€€ใ€€ใ€€8ใ€€ใ€€ใ€€ใ€€ B ใ€€ Residual Sumใ€€ใ€€ Sourceใ€€ใ€€ใ€€ SS df MS Observed F p Aใ€€ใ€€ใ€€ใ€€ ใ€€ใ€€ใ€€ใ€€ใ€€ใ€€2 ใ€€ใ€€ใ€€8ใ€€ใ€€ใ€€ใ€€ nnnn B ใ€€ nnnn Residual Sumใ€€ใ€€

42 โ‹ฏ โ‹ฏ โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฑ โ‹ฏ N=1, P=1 N=1, P=2 N=1, P= ๐‘› ๐‘ N=2, P=1 N=2, P=2
Two way ANOVA with replications N=1, P=1 โ‹ฏ N=1, P=2 N=1, P= ๐‘› ๐‘ โ‹ฏ N=2, P=1 N=2, P=2 N=2, P= ๐‘› ๐‘ โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฑ โ‹ฏ N= ๐‘› ๐‘› , P= ๐‘› ๐‘ N= ๐‘› ๐‘› , P=1 N= ๐‘› ๐‘› , P=2

43 Factor A Factor B โ‹ฏ ๐‘› ๐‘Ž sum mean ๐‘‘ ๐‘‘ โ‹ฏ ๐‘‘ 1 ๐‘› ๐‘Ž 1 ๐‘‘ ๐‘‘ โ‹ฏ ๐‘‘ 1 ๐‘› ๐‘Ž 2 โ‹ฎ โ‹ฎ โ‹ฑ โ‹ฎ ๐‘‘ 11 ๐‘› ๐‘” ๐‘‘ 12 ๐‘› ๐‘” โ‹ฏ ๐‘‘ 1 ๐‘› ๐‘Ž ๐‘› ๐‘” sum ๐‘‡ ๐‘‡ โ‹ฏ ๐‘‡ 1 ๐‘› ๐‘Ž ๐‘‡ ๐ต1 mean ๐‘‡ 11 ๐‘› ๐‘” ๐‘‡ 12 ๐‘› ๐‘” โ‹ฏ ๐‘‡ 12 ๐‘› ๐‘” ๐‘‡ ๐ต1 ๐‘› ๐‘” ๐‘› ๐‘Ž โ‹ฎ โ‹ฎ ๐‘› ๐‘ ๐‘‘ ๐‘› ๐‘ ๐‘‘ ๐‘› ๐‘ โ‹ฏ ๐‘‘ ๐‘› ๐‘ ๐‘› ๐‘Ž 1 ๐‘‘ ๐‘› ๐‘ ๐‘‘ ๐‘› ๐‘ โ‹ฏ ๐‘‘ ๐‘› ๐‘ ๐‘› ๐‘Ž 2 โ‹ฎ โ‹ฎ โ‹ฑ โ‹ฎ ๐‘‘ ๐‘› ๐‘ 1 ๐‘› ๐‘” ๐‘‘ ๐‘› ๐‘ 2 ๐‘› ๐‘” โ‹ฏ ๐‘‘ ๐‘› ๐‘ ๐‘› ๐‘Ž ๐‘› ๐‘” sum ๐‘‡ ๐‘› ๐‘ ๐‘‡ ๐‘› ๐‘ โ‹ฏ ๐‘‡ ๐‘› ๐‘ ๐‘› ๐‘Ž ๐‘‡ ๐ต ๐‘› ๐‘ mean ๐‘‡ ๐‘› ๐‘ 1 ๐‘› ๐‘” ๐‘‡ ๐‘› ๐‘ 2 ๐‘› ๐‘” โ‹ฏ ๐‘‡ ๐ต ๐‘› ๐‘ ๐‘› ๐‘” ๐‘› ๐‘Ž Sum ๐‘‡ ๐ด ๐‘‡ ๐ด โ‹ฏ ๐‘‡ ๐ด ๐‘› ๐‘Ž T Mean ๐‘‡ ๐ด1 ๐‘› ๐‘” ๐‘› ๐‘Ž ๐‘‡ ๐ด2 ๐‘› ๐‘” ๐‘› ๐‘Ž โ‹ฏ ๐‘‡ ๐ด ๐‘› ๐‘Ž ๐‘› ๐‘” ๐‘› ๐‘Ž ๐‘‡ ๐‘› ๐‘” ๐‘› ๐‘Ž ๐‘› ๐‘

44 ๐‘†๐‘† ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ = ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐‘˜=1 ๐‘› ๐‘” 1 ๐‘–๐‘—๐‘˜ โˆ’๐‘€ 2
๐‘†๐‘† ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ = ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐‘˜=1 ๐‘› ๐‘” ๐‘–๐‘—๐‘˜ โˆ’๐‘€ 2 ๐‘‘ ๐‘–๐‘—๐‘˜ โˆ’๐‘€= ๐‘‘ ๐‘–๐‘—๐‘˜ โˆ’ ๐œ€ ๐‘–๐‘— โˆ’ ๐œ€ ๐‘– โˆ’ ๐‘€ ๐‘Ž๐‘— โˆ’๐‘€ + ๐‘€ ๐‘๐‘– โˆ’๐‘€ +๐‘€ + ๐œ€ ๐‘–๐‘— โˆ’ ๐œ€ ๐‘– + ๐‘€ ๐‘Ž๐‘— โˆ’๐‘€ + ๐‘€ ๐‘ โˆ’๐‘€ ๐›ฟ ๐‘–๐‘—๐‘˜ =๐‘‘ ๐‘–๐‘—๐‘˜ โˆ’ ๐œ€ ๐‘–๐‘— โˆ’ ๐œ€ ๐‘– + ๐‘€ ๐‘Ž๐‘— โˆ’๐‘€ + ๐‘€ ๐‘๐‘– โˆ’๐‘€ +๐‘€ ๐œ– ๐‘–๐‘— = ๐œ€ ๐‘–๐‘— โˆ’ ๐œ€ ๐‘– , ๐ธ ๐‘Ž๐‘— = ๐‘€ ๐‘Ž๐‘— โˆ’๐‘€, ๐ธ ๐‘๐‘– = ๐‘€ ๐‘Ž๐‘– โˆ’๐‘€, ๐‘†๐‘† ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ = ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐‘˜=1 ๐‘› ๐‘” ๐‘’ ๐‘–๐‘—๐‘˜ + ๐œ– ๐‘–๐‘— + ๐ธ ๐‘Ž๐‘— + ๐ธ ๐‘๐‘– 2 ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐‘˜=1 ๐‘› ๐‘” ๐‘’ ๐‘–๐‘—๐‘˜ ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐‘˜=1 ๐‘› ๐‘” ๐œ– ๐‘–๐‘— ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐‘˜=1 ๐‘› ๐‘” ๐ธ ๐‘Ž๐‘— ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐‘˜=1 ๐‘› ๐‘” ๐ธ ๐‘๐‘– 2 ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐‘˜=1 ๐‘› ๐‘” ๐‘’ ๐‘–๐‘—๐‘˜ ๐‘› ๐‘” ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐œ– ๐‘–๐‘— ๐‘› ๐‘ ๐‘› ๐‘” ๐‘—=1 ๐‘› ๐‘Ž ๐ธ ๐‘Ž๐‘— ๐‘› ๐‘ ๐‘› ๐‘” ๐‘–=1 ๐‘› ๐‘ ๐ธ ๐‘๐‘— 2 = ๐‘†๐‘† ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘ข๐‘‘๐‘ข๐‘Ž๐‘™ + ๐‘› ๐‘” ๐‘†๐‘† ๐‘–๐‘›๐‘ก๐‘’๐‘Ÿ๐‘Ž๐‘๐‘ก๐‘–๐‘œ๐‘›(๐‘Žร—๐‘) + ๐‘› ๐‘ ๐‘› ๐‘” ๐‘†๐‘† ๐‘Ž + ๐‘› ๐‘Ž ๐‘› ๐‘” ๐‘†๐‘† ๐‘ ๐œŽ ๐‘Ž 2 = ๐‘†๐‘† ๐‘Ž ๐‘‘๐‘“ ๐‘Ž , ๐œŽ ๐‘ 2 = ๐‘†๐‘† ๐‘ ๐‘‘๐‘“ ๐‘ ๐œŽ ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ 2 = ๐‘†๐‘† ๐‘Ÿ๐‘’๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ ๐‘‘๐‘“ ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ , ๐œŽ (๐‘Žร—๐‘) 2 = ๐‘†๐‘† (๐‘Žร—๐‘) ๐‘‘๐‘“ (๐‘Žร—๐‘) , ๐น ๐‘Žร—๐‘ /๐‘Ÿ = ๐œŽ (๐‘Žร—๐‘) ๐œŽ ๐‘Ÿ 2 , ๐น ๐‘Ž/๐‘Ÿ = ๐œŽ ๐‘Ž ๐œŽ ๐‘Ÿ 2 , ๐น ๐‘/๐‘Ÿ = ๐œŽ ๐‘ ๐œŽ ๐‘Ÿ ๐น ๐‘Ž/ ๐‘Žร—๐‘ = ๐œŽ ๐‘Ž ๐œŽ ๐‘Žร—๐‘ 2 , ๐น ๐‘/ ๐‘Žร—๐‘ = ๐œŽ ๐‘ ๐œŽ ๐‘Žร—๐‘ 2

45 Total degree of freedom: df ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ = ๐‘› ๐‘Ž ๐‘› ๐‘ ๐‘› ๐‘” โˆ’1
Degree of freedom among A: df ๐ด = ๐‘› ๐‘Ž โˆ’1 Degree of freedom among B: df ๐ต = ๐‘› ๐‘ โˆ’1 Degree of freedom of interaction: df ๐‘–๐‘›๐‘ก๐‘’๐‘Ÿ๐‘Ž๐‘๐‘ก๐‘–๐‘œ๐‘› =( ๐‘› ๐‘Ž โˆ’1)( ๐‘› ๐‘ โˆ’1) Degree of freedom of residual: df ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ = ๐‘› ๐‘ ๐‘› ๐‘ ( ๐‘› ๐‘” โˆ’1) ๐‘› ๐‘Ž ๐‘› ๐‘ ๐‘› ๐‘” โˆ’1= ๐‘› ๐‘Ž โˆ’1 + ๐‘› ๐‘ โˆ’1 + ๐‘› ๐‘Ž โˆ’1 ๐‘› ๐‘ โˆ’1 + ๐‘› ๐‘ ๐‘› ๐‘ ( ๐‘› ๐‘” โˆ’1)

46 Sum of SS in the Row: SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™โˆ’๐ต ๐‘› ๐‘Ž ๐‘› ๐‘” SS ๐ต = SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ โˆ’ SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™โˆ’๐ต
Facilitation of calculation ๐‘†๐‘† ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ = ๐‘† ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ โˆ’ ๐‘‡ 2 ๐‘› ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ = ๐‘› ๐‘ ๐‘› ๐‘” SS ๐ด + ๐‘› ๐‘Ž ๐‘› ๐‘” SS ๐ต + ๐‘› ๐‘” SS ๐‘–๐‘›๐‘ก๐‘’๐‘Ÿ๐‘Ž๐‘๐‘ก๐‘–๐‘œ๐‘› + SS ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ ๐‘†๐‘† ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ =sum of sum of squares of replications in each cell (combnation of condtions) = ๐‘—=1 ๐‘› ๐‘Ž ๐‘–=1 ๐‘› ๐‘ ๐‘ ๐‘  ๐‘–๐‘— Sum of SS in the Row: SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™โˆ’๐ต ๐‘› ๐‘Ž ๐‘› ๐‘” SS ๐ต = SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ โˆ’ SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™โˆ’๐ต Sum of SS in the columns: SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™โˆ’๐ด ๐‘› ๐‘Ž ๐‘› ๐‘” SS ๐ด = SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ โˆ’ SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™โˆ’๐ด ๐‘› ๐‘” SS ๐‘–๐‘›๐‘ก๐‘’๐‘Ÿ๐‘Ž๐‘๐‘ก๐‘–๐‘œ๐‘› = SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ โˆ’ ๐‘› ๐‘ ๐‘› ๐‘” SS ๐ด + ๐‘› ๐‘Ž ๐‘› ๐‘” SS ๐ต โˆ’ SS ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ ย 

47

48 ๐‘†๐‘† ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ = ๐‘† ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ โˆ’ ๐‘‡ 2 ๐‘› ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ =7728โˆ’ 504 2 36 =7728โˆ’7056=672
SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ =4ร—3ร— SS ๐ด +3ร—3ร— SS ๐ต +3ร— SS ๐‘–๐‘›๐‘ก๐‘’๐‘Ÿ๐‘Ž๐‘๐‘ก๐‘–๐‘œ๐‘› +SS ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ ๐‘†๐‘† ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ =sum of sum of squares of replications in each cell (combnation of cndtions) = ๐‘–=1 4 ๐‘—=1 3 ๐‘ ๐‘  ๐‘–๐‘— = =90 Sum of SS in the Row: SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™โˆ’๐ต = =438 3ร—3ร—SS ๐ต = SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ โˆ’ SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™โˆ’๐ต =672โˆ’438=234 Sum of SS in the columns: SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™โˆ’๐ด = =504 4 ร—3ร—SS ๐ด = SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ โˆ’ SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™โˆ’๐ด =672โˆ’504=168 3ร— SS ๐‘–๐‘›๐‘ก๐‘’๐‘Ÿ๐‘Ž๐‘๐‘ก๐‘–๐‘œ๐‘› = SS ๐‘ก๐‘œ๐‘ก๐‘Ž๐‘™ โˆ’4ร—3ร— SS ๐ด โˆ’ 3ร—3ร—SS ๐ต โˆ’ SS ๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘Ž๐‘™ โˆ’168โˆ’234โˆ’90=180 SS ๐ต = =26 SS ๐ด = =14 SS ๐‘–๐‘›๐‘ก๐‘’๐‘Ÿ๐‘Ž๐‘๐‘ก๐‘–๐‘œ๐‘› = =60

49 Sourceใ€€ SS df MS ๐น 0๐‘๐‘ ๐‘’๐‘Ÿ๐‘ฃ๐‘’๐‘‘ 1 ๐น ๐‘กโ„Ž๐‘Ÿ๐‘’๐‘ โ„Ž๐‘œ๐‘™๐‘‘ 1 ๐น 0๐‘๐‘ ๐‘’๐‘Ÿ๐‘ฃ๐‘’๐‘‘ 2 ๐น ๐‘กโ„Ž๐‘Ÿ๐‘’๐‘ โ„Ž๐‘œ๐‘™๐‘‘ 2
Aใ€€ใ€€ ใ€€ใ€€ใ€€2 ใ€€ใ€€ใ€€ 7 ใ€€ใ€€ใ€€ใ€€ B ใ€€ใ€€ใ€€ Interaction residualใ€€ใ€€ Sum

50 Importance of confirmation of equality of variance (Particularly ratio data)


Download ppt "Example of chai square test (1) false dice"

Similar presentations


Ads by Google