Download presentation
Presentation is loading. Please wait.
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 ๐๐๐ ๐๐๐ข๐๐ ย
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)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.