# Two sample tests on quantities with restricted domains

So, the idea of a two sample t-test is pretty simple. Two samples, each with values drawn from a given set. Consider the difference in the means of the two sample - the mean and variance of its distribution. Then, calculate the t-statistic and finally the p-value on the assumption that the difference follows a t-distribution. When the two samples consist of integers for example, this seems reasonable because the difference can be any integer between -Inf and +Inf (and the mean can be rational). But what about cases where the two samples consist of just binary outcomes? The link here - http://stattrek.com/hypothesis-test/proportion.aspx suggests doing a permutation test. The only difference is in the way they calculate the variance. Apart from that, they still use a normal distribution on the z-score for the p-value. However, the difference between the means in the two samples can never be greater than 1. A normal distribution however, lives in [-Inf,+Inf] is it therefore appropriate to use it to calculate the p-value? Similarly for cases where the two samples consist of only fractional values (all between [0,1]). How should the p-value be calculated without an assumption of normality since the distribution isn't normal (max value 1).

• Can you show me where on that page you link to it suggests a permutation test? I tried searching but couldn't locate 'permutation test', 'randomization test' or 'resampling test' on the page. – Glen_b Apr 25 '14 at 12:14