Diet A
n 1 = 10 x ˉ 1 = ∑ x n 1 = 120 10 = 12 n_1=10\\\bar x_1={\sum x\over n_1}={120\over10}=12 n 1 = 10 x ˉ 1 = n 1 ∑ x = 10 120 = 12
s 1 2 = ∑ x 2 − ( ∑ x ) 2 n 1 n 1 − 1 = 1560 − 1440 9 = 13.33333 s_1^2={\sum x^2-{(\sum x)^2\over n_1}\over n_1-1}={1560-1440\over9}=13.33333 s 1 2 = n 1 − 1 ∑ x 2 − n 1 ( ∑ x ) 2 = 9 1560 − 1440 = 13.33333
Diet B
n 2 = 12 x ˉ 2 = ∑ x n 2 = 179 12 = 14.92 n_2=12\\\bar x_2={\sum x\over n_2}={179\over12}=14.92 n 2 = 12 x ˉ 2 = n 2 ∑ x = 12 179 = 14.92
s 2 2 = ∑ x 2 − ( ∑ x ) 2 n 2 n 2 − 1 = 2989 − 2670.083 11 = 28.9924245 s_2^2={\sum x^2-{(\sum x)^2\over n_2}\over n_2-1}={2989-2670.083\over11}=28.9924245 s 2 2 = n 2 − 1 ∑ x 2 − n 2 ( ∑ x ) 2 = 11 2989 − 2670.083 = 28.9924245
Before we test for the difference in means we have to test their variability using F-test.
We test,
H 0 : σ 1 2 = σ 2 2 v s H 1 : σ 1 2 ≠ σ 2 2 H_0:\sigma_1^2=\sigma_2^2\\vs\\H_1:\sigma_1^2\not=\sigma_2^2 H 0 : σ 1 2 = σ 2 2 v s H 1 : σ 1 2 = σ 2 2
The test statistic is,
F c = s 2 2 s 1 2 = 28.9924245 13.3333333 = 2.1744 F_c={s_2^2\over s_1^2}={28.9924245\over13.3333333}=2.1744 F c = s 1 2 s 2 2 = 13.3333333 28.9924245 = 2.1744
The table value is,
F α , n 1 − 1 , n 2 − 1 = F 0.05 , 11 , 9 = 3.102485 F_{\alpha,n_1-1,n_2-1}=F_{0.05,11,9}= 3.102485 F α , n 1 − 1 , n 2 − 1 = F 0.05 , 11 , 9 = 3.102485 and we reject the null hypothesis if F c > F α , n 1 − 1 , n 2 − 1 F_c\gt F_{\alpha,n_1-1,n_2-1} F c > F α , n 1 − 1 , n 2 − 1
Since F c = 2.1744 < F 0.05 , 11 , 9 = 3.102485 F_c=2.1744\lt F_{0.05,11,9}= 3.102485 F c = 2.1744 < F 0.05 , 11 , 9 = 3.102485 , we fail to reject the null hypothesis and conclude that the means for both diets are equal.
Now,
The hypothesis tested are,
H 0 : μ 1 = μ 2 v s H 1 : μ 1 ≠ μ 2 H_0:\mu_1=\mu_2\\vs\\H_1:\mu_1\not=\mu_2 H 0 : μ 1 = μ 2 v s H 1 : μ 1 = μ 2
The test statistic is,
t c = ( x ˉ 1 − x ˉ 2 ) s p 2 ( 1 n 1 + 1 n 2 ) t_c={(\bar x_1-\bar x_2)\over \sqrt{sp^2({1\over n_1}+{1\over n_2})}} t c = s p 2 ( n 1 1 + n 2 1 ) ( x ˉ 1 − x ˉ 2 )
where s p 2 sp^2 s p 2 is the pooled sample variance given as,
s p 2 = ( n 1 − 1 ) s 1 2 + ( n 2 − 1 ) s 2 2 n 1 + n 2 − 2 = ( 9 × 13.3333333 ) + ( 11 × 28.9924245 ) 20 = 438.91667 20 = 21.9458335 sp^2={(n_1-1)s_1^2+(n_2-1)s_2^2\over n_1+n_2-2}={(9\times13.3333333)+(11\times28.9924245)\over20}={438.91667\over20}=21.9458335 s p 2 = n 1 + n 2 − 2 ( n 1 − 1 ) s 1 2 + ( n 2 − 1 ) s 2 2 = 20 ( 9 × 13.3333333 ) + ( 11 × 28.9924245 ) = 20 438.91667 = 21.9458335
Therefore,
t c = ( 12 − 14.91667 ) 21.95 ( 1 10 + 1 12 ) = 2.91667 2.0058 = 1.4541 ( 4 d p ) t_c={(12-14.91667)\over \sqrt{21.95({1\over 10}+{1\over 12})}}={2.91667\over2.0058}=1.4541(4dp) t c = 21.95 ( 10 1 + 12 1 ) ( 12 − 14.91667 ) = 2.0058 2.91667 = 1.4541 ( 4 d p )
t c t_c t c is compared with the table value at α = 0.05 \alpha=0.05 α = 0.05 with n 1 + n 2 − 2 = 10 + 12 − 2 = 20 n_1+n_2-2=10+12-2=20 n 1 + n 2 − 2 = 10 + 12 − 2 = 20 degrees of freedom.
The table value is,
t 0.05 2 , 20 = t 0.025 , 20 = 2.085963 t_{{0.05\over2},20}=t_{0.025,20}= 2.085963 t 2 0.05 , 20 = t 0.025 , 20 = 2.085963
The null hypothesis is rejected if t c > t 0.025 , 20 . t_c\gt t_{0.025,20}. t c > t 0.025 , 20 .
Since, t c = 1.4541 < t 0.025 , 20 = 2.085963 t_c=1.4541\lt t_{0.025,20}=2.085963 t c = 1.4541 < t 0.025 , 20 = 2.085963 , we fail to reject the null hypothesis and conclude that there is no sufficient evidence to show that the two sample means for diet A and diet B differ significantly regarding their effect on weight increase at 5% level of significance.
Comments