ht_twosample_tpooled(A, B, alpha, type)

Pooled T-test for two population means. Hypothesis test for two population means. Samples are stored in arrays A and B; alpha is the significance level. Parameter type can be 0 (left tail), 1 (right tail), or 2 (both tails).
Assumes samples are independent, populations are normal or that the samples are large. Also, it assumes both populations have the same standard deviation.


See also ht_twosample_std ht_twosample_tnonpooled ht_twosample_tpaired 


Example


(See NOTE below)


a=(34.2, 90, 100.4, 24.6, 107.4, 63.6, 56.8, 41.4, 35, 54.2, 24.4, 56, 58.2, 76.8, 84.2, 79.4, 42.2, 81.8, 29.2, 15.8, 33.8, 40.2, 51.2, 41.2, 60.2, 88.2, 44.6, 64.4, 74, 71)

( 34.2 90 100.4 24.6 107.4 63.6 56.8 41.4 35 54.2 24.4 56 58.2 76.8 84.2 79.4 42.2 81.8 29.2 15.8 33.8 40.2 51.2 41.2 60.2 88.2 44.6 64.4 74 71 )


b=(92.9, 52, 63.1, 118.5, 37.7, 102.2, 62.9, 53.8, 101., 68.6, 51.5, 46.4, 45.2, 76., 56.1, 77.6, 61.6, 78.3, 66.3, 31.1, 71.1, 73.5, 67.6, 52.4, 47.2, 59.3, 97.5, 27.2, 81.2, 24.8, 71., 97.3, 92.6, 56, 62.3)

( 92.9 52 63.1 118.5 37.7 102.2 62.9 53.8 101.0 68.6 51.5 46.4 45.2 76.0 56.1 77.6 61.6 78.3 66.3 31.1 71.1 73.5 67.6 52.4 47.2 59.3 97.5 27.2 81.2 24.8 71.0 97.3 92.6 56 62.3 )


ht_twosample_tpooled(a, b, .05, 2)


Pooled-T Test for Two Samples.

Hypothesis test for the means of two independent samples.

Ho : m1==m2

Ha : m1!=m2

Significance level : 0.05 (5.0%)

Results:

m1 : 57.48000000000001

m2 : 66.3942857142857

s1 : 23.952804169579117

s2 : 22.261123364407695

sp : 23.05525690050534

Test statistics T : -1.5540126689821956

Critical value left found is -1.9983405419869322

Critical right value found is 1.998340541986931

P value is : 0.12519098352262284

Do not reject the null hypothesis.





NOTE: The data used in this example was taken from the textbook Introductory Statistics 6th Ed. by Neil A. Weiss with kind permission of Addison Wesly Longman, Inc. (AWL). AWL does not endorse nor it supports the Calcugator.