Records of 40 used passenger cars and 40 used pickup trucks
Records of 40 used passenger cars and 40 used pickup trucks (none used commercially) were randomly selected to investigate whether there was any difference in the mean time in years that they were kept by the original owner before being sold. For cars the mean was 5.3 years with standard deviation 2.2 years. For pickup trucks the mean was 7.1 years with standard deviation 3.0 years. Construct the 95% confidence interval for the difference in the means based on these data. Test the hypothesis that there is a difference in the means against the null hypothesis that there is no difference. Use the 1% level of significance. Compute the observed significance of the test in part (b).
Solution
a)
 CI = x1 - x2 ± t a/2 * Sqrt ( sd1 ^2 / n1 + sd2 ^2 /n2 )
 Where,
 x1 = Mean of Sample 1, x2 = Mean of sample2
 sd1 = SD of Sample 1, sd2 = SD of sample2
 a = 1 - (Confidence Level/100)
 ta/2 = t-table value
 CI = Confidence Interval
 Mean(x1)=5.3
 Standard deviation( sd1 )=2.2
 Sample Size(n1)=40
 Mean(x2)=7.1
 Standard deviation( sd2 )=3
 Sample Size(n1)=40
 CI = [ ( 5.3-7.1) ±t a/2 * Sqrt( 4.84/40+9/40)]
 = [ (-1.8) ± t a/2 * Sqrt( 0.35) ]
 = [ (-1.8) ± 2.023 * Sqrt( 0.35) ]
 = [-2.99 , -0.61]
 b)
 Set Up Hypothesis
 Null Hypothesis , There Is No-Significance between them Ho: u1 = u2
 Alternate Hypothesis, There Is Significance between them - H1: u1 != u2
 Test Statistic
 X(Mean)=5.3
 Standard Deviation(s.d1)=2.2 ; Number(n1)=40
 Y(Mean)=7.1
 Standard Deviation(s.d2)=3; Number(n2)=40
 we use Test Statistic (t) = (X-Y)/Sqrt(s.d1^2/n1)+(s.d2^2/n2)
 to =5.3-7.1/Sqrt((4.84/40)+(9/40))
 to =-3.06
 | to | =3.06
 Critical Value
 The Value of |t | with Min (n1-1, n2-1) i.e 39 d.f is 2.708
 We got |to| = 3.06009 & | t  | = 2.708
 Make Decision
 Hence Value of | to | > | t | and Here we Reject Ho
 P-Value: Two Tailed ( double the one tail ) - Ha : ( P != -3.0601 ) = 0.004
 Hence Value of P0.01 > 0.004,Here we Reject Ho

