In: Statistics and Probability
Suppose you needed to test the claim that the two samples described below come from populations with the same mean. Assume that the samples are independent simple random samples.
Sample 1: n1=17, x¯¯¯1=24.7, s1=3.05n1=17, x¯1=24.7, s1=3.05
Sample 2: n2=7, x¯¯¯2=22.5, s2=4.62n2=7, x¯2=22.5, s2=4.62
Compute:
(a) the degrees of freedom:
(b) the test statistic (use Sample 1 −− Sample 2):
(c) he P-value:
Given
Sample 1: n1=17, x1=24.7, s1=3.05
Sample 2: n2=7, x2=22.5, s2=4.62
To test
H0 : 1 = 2 ( two populations have same mean )
H1 : 1 2 ( two populations mean differ significantly )
we have n1 = 17 , 1 =24.7 , s1 = 3.05
n2=7 , 2=22.5 , s2=4.62
Test statistics T.S :
T.S =
where
S.E =
To calculate sd2 we have
sd2 =
Using above samples information
sd2 =
after calculation
sd2 =
Hence
S.E = = = ( 2.734156 ) 1/2= 1.653528
Hence S.E = 1.653528
Thus
T.S =
= = 1.186761
Hence calculated test statistics is T.S = 1.330488
a) Degree of freedom df = n1+n2-2 = 17+7-2 = 22
b) the test statistic is T.S = 1.186761
c) To calculate P-value we have
P-value = P ( t < -T.S ) + P (t > T.S )
= 2 * P ( t < -T.S )
P-value = 2 * P ( t < -1.330488)
where t is t-distributed with n1-n2-2 = 22 degree of freedom
Required probability can be computed from statistical book or more accurately from any software like R,Excel
From R
> 2*pt(
-1.330488,22)
# 2 * P ( t < -1.186761 )
[1] 0.1969851
So 2 * P ( t < -1.330488 ) = 0.1969851
Hence
P-value = 2 * P ( t < -1.330488 ) =0.1969851
i.e P-value = 0.1969851
Conclusion
Now P-value = 0.1969851 > 0.05 then we can not reject null hypothesis at 5% of level of significance ,
hence we conclude that two samples described below may come from populations with the same mean.