TI-89 ANOVA: Analysis Of Variance between groups. --- Assume three sets of data Xn N=3 sets Question to be dedided, is the difference significant? X1 X2 X3 -- -- -- 15 15 19 10 10 12 9 12 16 5 11 16 16 12 17 --- --- --- 55 60 80 Column total Tc 5 5 5 Sample Size nc 687 734 1306 Sum of Squares Total = Sum X1+X2+X3= Sum X= 55+60+80=195 mean of each case 11 12 16 In list region these are found under xbar1 Compute SST(Sum of Squares Treatment) N=15 SST= (Sum[Tc^2/nc])-(SumX)^/N =[(55)^2 /5 + (60)^2 /5 + (80)^2 /5] - (195)^2/ 15 SST=2.606-2.535=70 SSE= Sum of squares error SSE= Sum(X^2)-Sum[Tc^2/nc] SSE = (15)^2 + (10)^2 + (9)^2 +....+(17)^2-[(55)^2 /5 + (60)^2 /5 + 80^2 /5] SSE = 2727 - 2605 = 122 SS total Sum of between-comumns and between-rows variation SS total = Sum(X^2)-(Sum X)^2 /N SS total = 2727-(195)^2/15 = 2727-2535 = 192 The three sums of squares and the calculations needed for F are transferred to the table below. ---------- k= number of cases=3 N=total number of observations = 3*5 =15 ---------------------------------------------- Source of Sum of Degrees of Mean variation squares freedom Square Between SST=70 k-1=3-1=2 SST/(k-1)=70/2=35=MSTR cases Error SSE=122 N-k=15-3=12 SSE/(N-k)=122/12=10.17= MSE (within cases) --------------------------------------------------------- Because the ratio of two variances(mean squares)follows an F distribution, we can compute the value of F as follows. SST/(k-1) MSTR 35 F=------------ = ------ = ----- =3.44 SSE/(N-k) MSE 10.17 The decision rule states that if the computed value of F is less than or equal to the critical value of 3.89. the null hypothesis is not rejected. If the F value is greater than 3.88, Ho (reject assumption there is a significant difference) is rejected and H1 (Accept) there is accepted that the differences in the data is due to chance. Since 3.44 < 3.89 The null hypothesis is not rejected at the .05 level. To put it another way, the differences in the mean values of the data(11, 12, and 16) are attributed to chance(sampling). Thus, no significant statistical difference exists betewwen the three cases. The 3.38 is derived from value of Critical Values of the F statistic (.05 level of significance) for n2= 15-3 =12 degrees of freedom on denominator and n1 = 3-1=2 Degrees of freedom in numerator. This value of critical F for .05 upper tail area is found by F5 2:Inverse 4:Inverse F Enter Area .95 Num df= 2 Den df =12 Enter See Inverse 3.88529 = F of example critical vale, where 0.05 = Area above critical area The F =3.44 is analyzed in F5 A:F Cdf Lower Value = 3.44 Upper value =100 Num df=2 Den df=12 Enter See Cdf=.065929 which is greater than 0.05, the probability limit for the differences being significant This value is called Upper Snedecor's F Distribution This is the area under the curve from x= 3.88 to infinity of the following function Manual computation Defining Equation S= integral sign First define Gamma function Define g(n)=S ( x^(n-1)*(e^(-x) , x, 0., 40.) Define h(n1,n2,x) = (n1/n2)^(n1/2) * g((n1+n2)/2) / ( g(n1/2) * g(n2/2) ) * S ( t^((n1-2)/2) * (1+ n1/n2*t)^(-(n1+n2)/2) ,t,x,30) In statistics region Using F5: 4: Shade Inverse F Area 0.95 Num df=2 Den df=12 see 3.88529 for area of 0.05. Greater than 0.05 is reject area 3.44 is less than 3.39 so differnces in three sets of data are due to chance, Manual computation This curve resembles |\ To find the value of x which gives an area of 0.05 Let x=1 as an initial guess. Solve ( h(n1,n2,x)=.05,x)|x>0 Get x=3.88458775732 This value is rounded to 3.88 ==== 2 way ANOVA in TI-89 Assume 4 routes are driven by 5 drivers. Times are listed. Is there a significant difference between different routes and different drivers? Driver Route 1 Route 2 Route 3 Route 4 A 18 20 20 22 B 21 22 24 24 C 20 23 25 23 D 25 21 28 25 E 26 24 28 25 Sum of R1=t1=110=(18+21+20+25+26) Sum of R2=t2=110 Sum of R3=t3=125 Sum of R4=t4=119 454= sum of column totals Blocks are 5 for each of the 4 cases. Source 1:Sum of Squares 2:Degrees of freedom 1-2:Mean Square ----------------------------------------------------------------- Treatments SST k-1 SST/(k-1) Blocks SSB b-1 SSB/(b-1) Error SSE (k-1)(b-1) SSE/((k-1)*b-1)) total SS total 454= sum of column totals MSB= mean square for blocks N= 5*4=20 SST=Sum(tc^2/b)-(Sum X)^2/N= ((110^2)/5+(110^2)/5+(125^2)/5+(119^2)/5)-((464)^2)/20 SST=32.4 Br B1=Sum for A= (18+20+20+22)=80 B2=Sum for B= (21+22+24+24)=91 B3=Sum for C= (20+23+25+23)=91 B4=Sum for D= (25+21+28+25)=99 B5=Sum for E= (26+24+28+25)=103 N=20=5*4 SSB=Sum(Br^2/k)-(Sum X)^2/N= ((80^2)/4+(91^2)/4+(91^2)/4+(99^2)/4+(103^2)/4)-((464)^2)/20) SSB=78.2 SStotal=Sum X^2-((Sum X)^2)/N SStotal=10904-(484)^2/20=139.2 SSE=SStotal-SST-SSB=28.6 MSTR=SST/(k-1)=10.8 MSE=SSE/((k-1)*(N-1))=2.38 MSTR/MSE=F for routes =4.54 For routes F=MSTR/MSE=4.54 0.05 critical value for routes F5 2:Inverse 4: Inverse F Area .95 Num df=2 Den df=12 Enter See Inverse 3.88529= Critical value Since 4.54 is greater than 3.88, there is a significant difference due to routes. F5 A:Cdf Lower value =4.54 Upper Value 100 Num df=3 Den df=12 Enter Area=.023929 = probability probability that difference in routes is due to chance. -- drivers MSB= SSB/(N-1)=78.2/4=19.55 MSE=SSE/((k-1)*N-1))=28.6/12=2.38 F =MSB/MSE=8.21 0.05 critical value for drivers F5 2:Inverse 4: Inverse F Area .95 Num df=4 Den df=12 Enter See Inverse 3.25917= Critical value 8.21 is greater than 3.26 so it is probable that there is a significant difference between drivers. F5 A:Cdf Lower value =8.21 Upper Value 100 Num df=4 Den df=12 Enter Area=.001982 = probability that difference in driver time is due to chance. ==========