Two sample problems

Download a pdf copy of this help file  here


This set of results, rearranged for use in a simulation model, compare the means and standard deviations between two populations X and Y that are assumed Normally distributed (Normal(mX, sX) and Normal(mY, sY)), and from which we have nX and nY random observations {xi} and {yi}.

The sample mean is given by:

and the sample standard deviation is given by:

 denotes a Chisq distribution with n degrees of freedom, i.e. VoseChisq(n)

 denotes a Student-t distribution with n degrees of freedom, i.e. VoseStudent(n)

Difference between means mX and mY 

Ratio between variances s2X and s2Y 


Difference between means mX and m

Example 1: X, Y have the same standard deviation s, but it is unknown

Example 2: sX, sY are known

Example 3: sX, sY may be different

Known as the Behrens-Fisher problem, there is no exact solution is available for this example and it is a place where statisticians have a lot of fun fighting over the methods to use (Bayesian inference has an exact solution). Classical statistics does offer an approximate (known as the Welch) solution which is a good compromise between opinions:

where  is the nearest integer to


Ratio between variances s2X and s2Y 

Example 1: X, Y have unknown means mX, m

where  is an F distribution. We can also generate values from this uncertainty distribution by using the ratio of Chisq distributions identity:

Example 2: X, Y have known means mX, mY 

or, for simulation purposes:

See Also