Suppose that ~ Bin(m, and ~ Bin(n, Further suppose that and are X p1) Y p2). X Y independent. The data layout can be summarized in this twobytwo table: Group Successes Failures Total 1 = - = = X A m X B m A+B 2 = - = = Y C n Y D n C+D Total = A+C B+D N A+B+C+D The display is overlaid with the - - - this notation at the A B C D notation. We’ll refer to end. We want to test the null hypothesis = . For the moment, we will be H0: p1 p2 intentionally vague about whether is > or < or . If and are H1 p1 p2 p1 p2 p1 p2 m n reasonably large, then we can use the chisquared statistic 2 = to use the normal Here “reasonably large” means big enough approximation. This would seem to require that 30 and 30. m n The approximation also requires that not be too close to 0 or to X and also that also not be too close to 0 or to in such cases a m, Y n; Poisson approximation would be more appropriate. There is now some question about how to proceed if and/on is use the m n small. Let’s symbol = + as the total of the first column. In terms of the T X Y random variables, let’s note the table as Group Successes Failures Total 1 X m 2 Y n Total T N The joint distribution, under , of (X, is H0 Y) = f(x, y) This uses as the common value for and . make the transformation p p1 p2 Let’s (X, (X, Y) T) Since these are all discrete random variables, we do not need to worry about the Jacobian of a multivariable transformation. We need only replace by The transformed y t x. likelihood is = f(x, t)
Suppose that X ~ Bin(m, p1) and Y ~ Bin(n, p2). Further suppose that X and Y are independent. The data layout can be summarized in this twobytwo table: Group Successes Failures Total 1 X = A m - X = B m = A+B 2 Y = C n - Y = D n = C+D Total A+C B+D N = A+B+C+D The display is overlaid with the A - B - C - D notation. We’ll refer to this notation at the end. We want to test the null hypothesis H0: p1 = p2 . For the moment, we will be intentionally vague about whether H1 is p1 > p2 or p1 < p2 or p1 p2 . If m and n are reasonably large, then we can use the chisquared statistic 2 = Here “reasonably large” means big enough to use the normal approximation. This would seem to require that m 30 and n 30. The approximation also requires that X not be too close to 0 or to m, and also that Y also not be too close to 0 or to n; in such cases a Poisson approximation would be more appropriate. There is now some question about how to proceed if m and/on n is small. Let’s use the symbol T = X + Y as the total of the first column. In terms of the random variables, let’s note the table as Group Successes Failures Total 1 X m 2 Y n Total T N The joint distribution, under H0 , of (X, Y) is f(x, y) = This uses p as the common value for p1 and p2 . Let’s make the transformation (X, Y) (X, T) Since these are all discrete random variables, we do not need to worry about the Jacobian of a multivariable transformation. We need only replace y by t x. The transformed likelihood is f(x, t) =