The TTEST Procedure

Two-Independent-Sample Design

Define the following notation:

StartLayout 1st Row 1st Column n 1 Superscript star 2nd Column equals number of observations at first class level 2nd Row 1st Column n 2 Superscript star 2nd Column equals number of observations at second class level 3rd Row 1st Column y Subscript 1 i 2nd Column equals value of i th observation at first class level comma i element-of StartSet 1 comma ellipsis comma n 1 Superscript star Baseline EndSet 4th Row 1st Column y Subscript 2 i 2nd Column equals value of i th observation at second class level comma i element-of StartSet 1 comma ellipsis comma n 2 Superscript star Baseline EndSet 5th Row 1st Column f Subscript 1 i 2nd Column equals frequency of i th observation at first class level comma i element-of StartSet 1 comma ellipsis comma n 1 Superscript star Baseline EndSet 6th Row 1st Column f Subscript 2 i 2nd Column equals frequency of i th observation at second class level comma i element-of StartSet 1 comma ellipsis comma n 2 Superscript star Baseline EndSet 7th Row 1st Column w Subscript 1 i 2nd Column equals weight of i th observation at first class level comma i element-of StartSet 1 comma ellipsis comma n 1 Superscript star Baseline EndSet 8th Row 1st Column w Subscript 2 i 2nd Column equals weight of i th observation at second class level comma i element-of StartSet 1 comma ellipsis comma n 2 Superscript star Baseline EndSet 9th Row 1st Column n 1 2nd Column equals sample size for first class level equals sigma-summation Underscript i Overscript n 1 Superscript star Baseline Endscripts f Subscript 1 i Baseline 10th Row 1st Column n 2 2nd Column equals sample size for second class level equals sigma-summation Underscript i Overscript n 2 Superscript star Baseline Endscripts f Subscript 2 i Baseline EndLayout
Normal Difference (DIST=NORMAL TEST=DIFF)

Observations at the first class level are assumed to be distributed as normal upper N left-parenthesis mu 1 comma sigma 1 squared right-parenthesis, and observations at the second class level are assumed to be distributed as normal upper N left-parenthesis mu 2 comma sigma 2 squared right-parenthesis, where mu 1, mu 2, sigma 1, and sigma 2 are unknown.

The within-class-level mean estimates (y overbar Subscript 1 and y overbar Subscript 2), standard deviation estimates (s 1 and s 2), standard errors (normal upper S normal upper E 1 and normal upper S normal upper E 2), and confidence limits for means and standard deviations are computed in the same way as for the one-sample design in the section Normal Data (DIST=NORMAL).

The mean difference mu 1 minus mu 2 equals mu Subscript d is estimated by

y overbar Subscript d Baseline equals y overbar Subscript 1 Baseline minus y overbar Subscript 2

Under the assumption of equal variances (sigma 1 squared equals sigma 2 squared), the pooled estimate of the common standard deviation is

s Subscript p Baseline equals left-parenthesis StartFraction left-parenthesis n 1 minus 1 right-parenthesis s 1 squared plus left-parenthesis n 2 minus 1 right-parenthesis s 2 squared Over n 1 plus n 2 minus 2 EndFraction right-parenthesis Superscript one-half

The pooled standard error (the estimated standard deviation of y overbar Subscript d assuming equal variances) is

normal upper S normal upper E Subscript p Baseline equals s Subscript p Baseline left-parenthesis StartFraction 1 Over sigma-summation Underscript i equals 1 Overscript n 1 Superscript star Baseline Endscripts f Subscript 1 i Baseline w Subscript 1 i Baseline EndFraction plus StartFraction 1 Over sigma-summation Underscript i equals 1 Overscript n 2 Superscript star Baseline Endscripts f Subscript 2 i Baseline w Subscript 2 i Baseline EndFraction right-parenthesis Superscript one-half

The pooled 100(1 – alpha)% confidence interval for the mean difference mu Subscript d is

StartLayout 1st Row 1st Column left-parenthesis y overbar Subscript d Baseline minus t Subscript 1 minus StartFraction alpha Over 2 EndFraction comma n 1 plus n 2 minus 2 Baseline normal upper S normal upper E Subscript p Baseline comma y overbar Subscript d Baseline plus t Subscript 1 minus StartFraction alpha Over 2 EndFraction comma n 1 plus n 2 minus 2 Baseline normal upper S normal upper E Subscript p Baseline right-parenthesis 2nd Column comma SIDES equals 2 2nd Row 1st Column left-parenthesis negative normal infinity comma y overbar Subscript d Baseline plus t Subscript 1 minus alpha comma n 1 plus n 2 minus 2 Baseline normal upper S normal upper E Subscript p Baseline right-parenthesis 2nd Column comma SIDES equals upper L 3rd Row 1st Column left-parenthesis y overbar Subscript d Baseline minus t Subscript 1 minus alpha comma n 1 plus n 2 minus 2 Baseline normal upper S normal upper E Subscript p Baseline comma normal infinity right-parenthesis 2nd Column comma SIDES equals upper U EndLayout

The t value for the pooled test is computed as

t Subscript p Baseline equals StartFraction y overbar Subscript d Baseline minus mu 0 Over normal upper S normal upper E Subscript p Baseline EndFraction

The p-value of the test is computed as

p hyphen value equals StartLayout Enlarged left-brace 1st Row 1st Column upper P left-parenthesis t Subscript p Superscript 2 Baseline greater-than upper F Subscript 1 minus alpha comma 1 comma n 1 plus n 2 minus 2 Baseline right-parenthesis comma 2nd Column two hyphen sided 2nd Row 1st Column upper P left-parenthesis t Subscript p Baseline less-than t Subscript alpha comma n 1 plus n 2 minus 2 Baseline right-parenthesis comma 2nd Column lower one hyphen sided 3rd Row 1st Column upper P left-parenthesis t Subscript p Baseline greater-than t Subscript 1 minus alpha comma n 1 plus n 2 minus 2 Baseline right-parenthesis comma 2nd Column upper one hyphen sided EndLayout

Under the assumption of unequal variances (the Behrens-Fisher problem), the unpooled standard error is computed as

normal upper S normal upper E Subscript u Baseline equals left-parenthesis StartFraction s 1 squared Over sigma-summation Underscript i equals 1 Overscript n 1 Superscript star Baseline Endscripts f Subscript 1 i Baseline w Subscript 1 i Baseline EndFraction plus StartFraction s 2 squared Over sigma-summation Underscript i equals 1 Overscript n 2 Superscript star Baseline Endscripts f Subscript 2 i Baseline w Subscript 2 i Baseline EndFraction right-parenthesis Superscript one-half

Satterthwaite’s (1946) approximation for the degrees of freedom, extended to accommodate weights, is computed as

normal d normal f Subscript u Baseline equals StartStartFraction normal upper S normal upper E Subscript u Superscript 4 Baseline OverOver StartFraction s 1 Superscript 4 Baseline Over left-parenthesis n 1 minus 1 right-parenthesis left-parenthesis sigma-summation Underscript i equals 1 Overscript n 1 Superscript star Baseline Endscripts f Subscript 1 i Baseline w Subscript 1 i Baseline right-parenthesis squared EndFraction plus StartFraction s 2 Superscript 4 Baseline Over left-parenthesis n 2 minus 1 right-parenthesis left-parenthesis sigma-summation Underscript i equals 1 Overscript n 2 Superscript star Baseline Endscripts f Subscript 2 i Baseline w Subscript 2 i Baseline right-parenthesis squared EndFraction EndEndFraction

The unpooled Satterthwaite 100(1 – alpha)% confidence interval for the mean difference mu Subscript d is

StartLayout 1st Row 1st Column left-parenthesis y overbar Subscript d Baseline minus t Subscript 1 minus StartFraction alpha Over 2 EndFraction comma normal d normal f Sub Subscript u Subscript Baseline normal upper S normal upper E Subscript u Baseline comma y overbar Subscript d Baseline plus t Subscript 1 minus StartFraction alpha Over 2 EndFraction comma normal d normal f Sub Subscript u Subscript Baseline normal upper S normal upper E Subscript u Baseline right-parenthesis 2nd Column comma SIDES equals 2 2nd Row 1st Column left-parenthesis negative normal infinity comma y overbar Subscript d Baseline plus t Subscript 1 minus alpha comma normal d normal f Sub Subscript u Subscript Baseline normal upper S normal upper E Subscript u Baseline right-parenthesis 2nd Column comma SIDES equals upper L 3rd Row 1st Column left-parenthesis y overbar Subscript d Baseline minus t Subscript 1 minus alpha comma normal d normal f Sub Subscript u Subscript Baseline normal upper S normal upper E Subscript u Baseline comma normal infinity right-parenthesis 2nd Column comma SIDES equals upper U EndLayout

The t value for the unpooled Satterthwaite test is computed as

t Subscript u Baseline equals StartFraction y overbar Subscript d Baseline minus mu 0 Over normal upper S normal upper E Subscript u Baseline EndFraction

The p-value of the unpooled Satterthwaite test is computed as

p hyphen value equals StartLayout Enlarged left-brace 1st Row 1st Column upper P left-parenthesis t Subscript u Superscript 2 Baseline greater-than upper F Subscript 1 minus alpha comma 1 comma normal d normal f Sub Subscript u Subscript Baseline right-parenthesis comma 2nd Column two hyphen sided 2nd Row 1st Column upper P left-parenthesis t Subscript u Baseline less-than t Subscript alpha comma normal d normal f Sub Subscript u Subscript Baseline right-parenthesis comma 2nd Column lower one hyphen sided 3rd Row 1st Column upper P left-parenthesis t Subscript u Baseline greater-than t Subscript 1 minus alpha comma normal d normal f Sub Subscript u Subscript Baseline right-parenthesis comma 2nd Column upper one hyphen sided EndLayout

When the COCHRAN option is specified in the PROC TTEST statement, the Cochran and Cox (1950) approximation of the p-value of the t Subscript u statistic is the value of p such that

t Subscript u Baseline equals StartStartFraction left-parenthesis StartFraction s 1 squared Over sigma-summation Underscript i equals 1 Overscript n 1 Superscript star Baseline Endscripts f Subscript 1 i Baseline w Subscript 1 i Baseline EndFraction right-parenthesis t 1 plus left-parenthesis StartFraction s 2 squared Over sigma-summation Underscript i equals 1 Overscript n 2 Superscript star Baseline Endscripts f Subscript 2 i Baseline w Subscript 2 i Baseline EndFraction right-parenthesis t 2 OverOver left-parenthesis StartFraction s 1 squared Over sigma-summation Underscript i equals 1 Overscript n 1 Superscript star Baseline Endscripts f Subscript 1 i Baseline w Subscript 1 i Baseline EndFraction right-parenthesis plus left-parenthesis StartFraction s 2 squared Over sigma-summation Underscript i equals 1 Overscript n 2 Superscript star Baseline Endscripts f Subscript 2 i Baseline w Subscript 2 i Baseline EndFraction right-parenthesis EndEndFraction

where t 1 and t 2 are the critical values of the t distribution corresponding to a significance level of p and sample sizes of n 1 and n 2, respectively. The number of degrees of freedom is undefined when n 1 not-equals n 2. In general, the Cochran and Cox test tends to be conservative (Lee and Gurland 1975).

The 100(1 – alpha)% CI=EQUAL and CI=UMPU confidence intervals for the common population standard deviation sigma assuming equal variances are computed as discussed in the section Normal Data (DIST=NORMAL) for the one-sample design, except replacing s squared by s Subscript p Superscript 2 and left-parenthesis n minus 1 right-parenthesis by left-parenthesis n 1 plus n 2 minus 1 right-parenthesis.

The folded form of the F statistic, upper F prime, tests the hypothesis that the variances are equal (Steel and Torrie 1980), where

upper F prime equals StartFraction max left-parenthesis s 1 squared comma s 2 squared right-parenthesis Over min left-parenthesis s 1 squared comma s 2 squared right-parenthesis EndFraction

A test of upper F prime is a two-tailed F test because you do not specify which variance you expect to be larger. The p-value (Steel and Torrie 1980) is equal-tailed and is computed as

StartLayout 1st Row 1st Column p hyphen value 2nd Column equals 2 upper P left-parenthesis upper F prime greater-than upper F Subscript 1 minus alpha comma normal d normal f Sub Subscript a Subscript comma normal d normal f Sub Subscript b Subscript Baseline right-parenthesis 2nd Row 1st Column Blank 2nd Column equals StartLayout Enlarged left-brace 1st Row 1st Column upper P left-parenthesis s 1 squared slash s 2 squared greater-than upper F Subscript 1 minus alpha comma normal d normal f Sub Subscript 1 Subscript comma normal d normal f Sub Subscript 2 Subscript Baseline right-parenthesis plus upper P left-parenthesis s 2 squared slash s 1 squared less-than-or-equal-to upper F Subscript 1 minus alpha comma normal d normal f Sub Subscript 2 Subscript comma normal d normal f Sub Subscript 1 Subscript Baseline right-parenthesis comma 2nd Column s 1 squared slash s 2 squared greater-than-or-equal-to 1 2nd Row 1st Column upper P left-parenthesis s 1 squared slash s 2 squared less-than-or-equal-to upper F Subscript 1 minus alpha comma normal d normal f Sub Subscript 1 Subscript comma normal d normal f Sub Subscript 2 Subscript Baseline right-parenthesis plus upper P left-parenthesis s 2 squared slash s 1 squared greater-than upper F Subscript 1 minus alpha comma normal d normal f Sub Subscript 2 Subscript comma normal d normal f Sub Subscript 1 Subscript Baseline right-parenthesis comma 2nd Column s 1 squared slash s 2 squared less-than 1 EndLayout EndLayout

where normal d normal f Subscript 1, normal d normal f Subscript 2, normal d normal f Subscript a, and normal d normal f Subscript b are the degrees of freedom that correspond to s 1 squared, s 1 squared, max left-parenthesis s 1 squared comma s 2 squared right-parenthesis, and min left-parenthesis s 1 squared comma s 2 squared right-parenthesis, respectively.

Note that the p-value is similar to the probability p Superscript star of a greater upper F prime value under the null hypothesis that sigma 1 squared equals sigma 2 squared,

p Superscript star Baseline equals StartLayout Enlarged left-brace 1st Row 1st Column upper P left-parenthesis s 1 squared slash s 2 squared greater-than upper F Subscript 1 minus alpha comma normal d normal f Sub Subscript 1 Subscript comma normal d normal f Sub Subscript 2 Subscript Baseline right-parenthesis plus upper P left-parenthesis s 2 squared slash s 1 squared less-than-or-equal-to upper F Subscript 1 minus alpha comma normal d normal f Sub Subscript 1 Subscript comma normal d normal f Sub Subscript 2 Subscript Baseline right-parenthesis comma 2nd Column s 1 squared slash s 2 squared greater-than-or-equal-to 1 2nd Row 1st Column upper P left-parenthesis s 1 squared slash s 2 squared less-than-or-equal-to upper F Subscript 1 minus alpha comma normal d normal f Sub Subscript 1 Subscript comma normal d normal f Sub Subscript 2 Subscript Baseline right-parenthesis plus upper P left-parenthesis s 2 squared slash s 1 squared greater-than upper F Subscript 1 minus alpha comma normal d normal f Sub Subscript 1 Subscript comma normal d normal f Sub Subscript 2 Subscript Baseline right-parenthesis comma 2nd Column s 1 squared slash s 2 squared less-than 1 EndLayout

The upper F prime test is not very robust to violations of the assumption that the data are normally distributed, and thus it is not recommended without confidence in the normality assumption.

Lognormal Ratio (DIST=LOGNORMAL TEST=RATIO)

The DIST=LOGNORMAL analysis is handled by log-transforming the data and null value, performing a DIST=NORMAL analysis, and then transforming the results back to the original scale. See the section Normal Data (DIST=NORMAL) for the one-sample design for details on how the DIST=NORMAL computations for means and standard deviations are transformed into the DIST=LOGNORMAL results for geometric means and CVs. As mentioned in the section Coefficient of Variation, the assumption of equal CVs on the lognormal scale is analogous to the assumption of equal variances on the normal scale.

Normal Ratio (DIST=NORMAL TEST=RATIO)

The distributional assumptions, equality of variances test, and within-class-level mean estimates (y overbar Subscript 1 and y overbar Subscript 2), standard deviation estimates (s 1 and s 2), standard errors (normal upper S normal upper E 1 and normal upper S normal upper E 2), and confidence limits for means and standard deviations are the same as in the section Normal Difference (DIST=NORMAL TEST=DIFF) for the two-independent-sample design.

The mean ratio mu 1 slash mu 2 equals mu Subscript r is estimated by

ModifyingAbove mu With caret Subscript r Baseline equals y overbar Subscript 1 Baseline slash y overbar Subscript 2

No estimates or confidence intervals for the ratio of standard deviations are computed.

Under the assumption of equal variances (sigma 1 squared equals sigma 2 squared), the pooled confidence interval for the mean ratio is the Fieller (1954) confidence interval, extended to accommodate weights. Let

StartLayout 1st Row 1st Column a Subscript p 2nd Column equals StartFraction s Subscript p Superscript 2 Baseline t Subscript 1 minus StartFraction alpha Over 2 EndFraction comma n 1 plus n 2 minus 2 Superscript 2 Baseline Over sigma-summation Underscript i equals 1 Overscript n 2 Superscript star Baseline Endscripts f Subscript 2 i Baseline w Subscript 2 i Baseline EndFraction minus y overbar Subscript 2 Superscript 2 Baseline 2nd Row 1st Column b Subscript p 2nd Column equals y overbar Subscript 1 Baseline y overbar Subscript 2 Baseline 3rd Row 1st Column c Subscript p 2nd Column equals StartFraction s Subscript p Superscript 2 Baseline t Subscript 1 minus StartFraction alpha Over 2 EndFraction comma n 1 plus n 2 minus 2 Superscript 2 Baseline Over sigma-summation Underscript i equals 1 Overscript n 1 Superscript star Baseline Endscripts f Subscript 1 i Baseline w Subscript 1 i Baseline EndFraction minus y overbar Subscript 1 Superscript 2 EndLayout

where s Subscript p is the pooled standard deviation defined in the section Normal Difference (DIST=NORMAL TEST=DIFF) for the two-independent-sample design. If a Subscript p Baseline greater-than-or-equal-to 0 (which occurs when y overbar Subscript 2 is too close to zero), then the pooled two-sided 100(1 – alpha)% Fieller confidence interval for mu Subscript r does not exist. If a less-than 0, then the interval is

left-parenthesis minus StartFraction b Subscript p Baseline Over a Subscript p Baseline EndFraction plus StartFraction left-parenthesis b Subscript p Superscript 2 Baseline minus a Subscript p Baseline c Subscript p Baseline right-parenthesis Superscript one-half Baseline Over a Subscript p Baseline EndFraction comma minus StartFraction b Subscript p Baseline Over a Subscript p Baseline EndFraction minus StartFraction left-parenthesis b Subscript p Superscript 2 Baseline minus a Subscript p Baseline c Subscript p Baseline right-parenthesis Superscript one-half Baseline Over a Subscript p Baseline EndFraction right-parenthesis

For the one-sided intervals, let

StartLayout 1st Row 1st Column a Subscript p Superscript star 2nd Column equals StartFraction s Subscript p Superscript 2 Baseline t Subscript 1 minus alpha comma n 1 plus n 2 minus 2 Superscript 2 Baseline Over sigma-summation Underscript i equals 1 Overscript n 2 Superscript star Baseline Endscripts f Subscript 2 i Baseline w Subscript 2 i Baseline EndFraction minus y overbar Subscript 2 Superscript 2 Baseline 2nd Row 1st Column c Subscript p Superscript star 2nd Column equals StartFraction s Subscript p Superscript 2 Baseline t Subscript 1 minus alpha comma n 1 plus n 2 minus 2 Superscript 2 Baseline Over sigma-summation Underscript i equals 1 Overscript n 1 Superscript star Baseline Endscripts f Subscript 1 i Baseline w Subscript 1 i Baseline EndFraction minus y overbar Subscript 1 Superscript 2 EndLayout

which differ from a Subscript p and c Subscript p only in the use of alpha in place of alpha slash 2. If a Subscript p Superscript star Baseline greater-than-or-equal-to 0, then the pooled one-sided 100(1 – alpha)% Fieller confidence intervals for mu Subscript r do not exist. If a Subscript p Superscript star Baseline less-than 0, then the intervals are

StartLayout 1st Row 1st Column left-parenthesis negative normal infinity comma minus StartFraction b Subscript p Baseline Over a Subscript p Superscript star Baseline EndFraction minus StartFraction left-parenthesis b Subscript p Superscript 2 Baseline minus a Subscript p Superscript star Baseline c Subscript p Superscript star Baseline right-parenthesis Superscript one-half Baseline Over a Subscript p Superscript star Baseline EndFraction right-parenthesis 2nd Column comma SIDES equals upper L 2nd Row 1st Column left-parenthesis minus StartFraction b Subscript p Baseline Over a Subscript p Superscript star Baseline EndFraction plus StartFraction left-parenthesis b Subscript p Superscript 2 Baseline minus a Subscript p Superscript star Baseline c Subscript p Superscript star Baseline right-parenthesis Superscript one-half Baseline Over a Subscript p Superscript star Baseline EndFraction comma normal infinity right-parenthesis 2nd Column comma SIDES equals upper U EndLayout

The pooled t test assuming equal variances is the Sasabuchi (1988a, 1988b) test. The hypothesis upper H 0 colon mu Subscript r Baseline equals mu 0 is rewritten as upper H 0 colon mu 1 minus mu 0 mu 2 equals 0, and the pooled t test in the section Normal Difference (DIST=NORMAL TEST=DIFF) for the two-independent-sample design is conducted on the original y Subscript 1 i values (i element-of StartSet 1 comma ellipsis comma n 1 Superscript star Baseline EndSet) and transformed values of y Subscript 2 i

y Subscript 2 i Superscript star Baseline equals mu 0 y Subscript 2 i Baseline comma i element-of StartSet 1 comma ellipsis comma n 2 Superscript star Baseline EndSet

with a null difference of 0. The t value for the Sasabuchi pooled test is computed as

t Subscript p Baseline equals StartFraction y overbar Subscript 1 Baseline minus mu 0 y overbar Subscript 2 Baseline Over s Subscript p Baseline left-parenthesis StartFraction 1 Over sigma-summation Underscript i equals 1 Overscript n 1 Superscript star Baseline Endscripts f Subscript 1 i Baseline w Subscript 1 i Baseline EndFraction plus StartFraction mu 0 squared Over sigma-summation Underscript i equals 1 Overscript n 2 Superscript star Baseline Endscripts f Subscript 2 i Baseline w Subscript 2 i Baseline EndFraction right-parenthesis Superscript one-half Baseline EndFraction

The p-value of the test is computed as

p hyphen value equals StartLayout Enlarged left-brace 1st Row 1st Column upper P left-parenthesis t Subscript p Superscript 2 Baseline greater-than upper F Subscript 1 minus alpha comma 1 comma n 1 plus n 2 minus 2 Baseline right-parenthesis comma 2nd Column two hyphen sided 2nd Row 1st Column upper P left-parenthesis t Subscript p Baseline less-than t Subscript alpha comma n 1 plus n 2 minus 2 Baseline right-parenthesis comma 2nd Column lower one hyphen sided 3rd Row 1st Column upper P left-parenthesis t Subscript p Baseline greater-than t Subscript 1 minus alpha comma n 1 plus n 2 minus 2 Baseline right-parenthesis comma 2nd Column upper one hyphen sided EndLayout

Under the assumption of unequal variances, the unpooled Satterthwaite-based confidence interval for the mean ratio mu Subscript r is computed according to the method in Dilba, Schaarschmidt, and Hothorn (2007, the section "Two-sample Problem" on page 20), extended to accommodate weights. The degrees of freedom for the confidence interval are based on the same approximation as in Tamhane and Logan (2004) for the unpooled t test but with the null mean ratio mu 0 replaced by the maximum likelihood estimate ModifyingAbove mu With caret Subscript r Baseline equals y overbar Subscript 1 Baseline slash y overbar Subscript 2:

normal d normal f Subscript u Baseline equals StartStartFraction left-parenthesis StartFraction s 1 squared Over sigma-summation Underscript i equals 1 Overscript n 1 Superscript star Baseline Endscripts f Subscript 1 i Baseline w Subscript 1 i Baseline EndFraction plus StartFraction ModifyingAbove mu With caret Subscript r Superscript 2 Baseline s 2 squared Over sigma-summation Underscript i equals 1 Overscript n 2 Superscript star Baseline Endscripts f Subscript 2 i Baseline w Subscript 2 i Baseline EndFraction right-parenthesis squared OverOver StartFraction s 1 Superscript 4 Baseline Over left-parenthesis n 1 minus 1 right-parenthesis left-parenthesis sigma-summation Underscript i equals 1 Overscript n 1 Superscript star Baseline Endscripts f Subscript 1 i Baseline w Subscript 1 i Baseline right-parenthesis squared EndFraction plus StartFraction ModifyingAbove mu With caret Subscript r Superscript 4 Baseline s 2 Superscript 4 Baseline Over left-parenthesis n 2 minus 1 right-parenthesis left-parenthesis sigma-summation Underscript i equals 1 Overscript n 2 Superscript star Baseline Endscripts f Subscript 2 i Baseline w Subscript 2 i Baseline right-parenthesis squared EndFraction EndEndFraction

Let

StartLayout 1st Row 1st Column a Subscript u 2nd Column equals StartFraction s 2 squared t Subscript 1 minus StartFraction alpha Over 2 EndFraction comma normal d normal f Sub Subscript u Subscript Superscript 2 Baseline Over sigma-summation Underscript i equals 1 Overscript n 2 Superscript star Baseline Endscripts f Subscript 2 i Baseline w Subscript 2 i Baseline EndFraction minus y overbar Subscript 2 Superscript 2 Baseline 2nd Row 1st Column b Subscript u 2nd Column equals y overbar Subscript 1 Baseline y overbar Subscript 2 Baseline 3rd Row 1st Column c Subscript u 2nd Column equals StartFraction s 1 squared t Subscript 1 minus StartFraction alpha Over 2 EndFraction comma normal d normal f Sub Subscript u Subscript Superscript 2 Baseline Over sigma-summation Underscript i equals 1 Overscript n 1 Superscript star Baseline Endscripts f Subscript 1 i Baseline w Subscript 1 i Baseline EndFraction minus y overbar Subscript 1 Superscript 2 EndLayout

where s 1 and s 2 are the within-class-level standard deviations defined in the section Normal Difference (DIST=NORMAL TEST=DIFF) for the two-independent-sample design. If a Subscript u Baseline greater-than-or-equal-to 0 (which occurs when y overbar Subscript 2 is too close to zero), then the unpooled Satterthwaite-based two-sided 100(1 – alpha)% confidence interval for mu Subscript r does not exist. If a Subscript u Baseline less-than 0, then the interval is

left-parenthesis minus StartFraction b Subscript u Baseline Over a Subscript u Baseline EndFraction plus StartFraction left-parenthesis b Subscript u Superscript 2 Baseline minus a Subscript u Baseline c Subscript u Baseline right-parenthesis Superscript one-half Baseline Over a Subscript u Baseline EndFraction comma minus StartFraction b Subscript u Baseline Over a Subscript u Baseline EndFraction minus StartFraction left-parenthesis b Subscript u Superscript 2 Baseline minus a Subscript u Baseline c Subscript u Baseline right-parenthesis Superscript one-half Baseline Over a Subscript u Baseline EndFraction right-parenthesis

The t test assuming unequal variances is the test derived in Tamhane and Logan (2004). The hypothesis upper H 0 colon mu Subscript r Baseline equals mu 0 is rewritten as upper H 0 colon mu 1 minus mu 0 mu 2 equals 0, and the Satterthwaite t test in the section Normal Difference (DIST=NORMAL TEST=DIFF) for the two-independent-sample design is conducted on the original y Subscript 1 i values (i element-of StartSet 1 comma ellipsis comma n 1 Superscript star Baseline EndSet) and transformed values of y Subscript 2 i

y Subscript 2 i Superscript star Baseline equals mu 0 y Subscript 2 i Baseline comma i element-of StartSet 1 comma ellipsis comma n 2 Superscript star Baseline EndSet

with a null difference of 0. The degrees of freedom are computed as

normal d normal f Subscript u Baseline equals StartStartFraction left-parenthesis StartFraction s 1 squared Over sigma-summation Underscript i equals 1 Overscript n 1 Superscript star Baseline Endscripts f Subscript 1 i Baseline w Subscript 1 i Baseline EndFraction plus StartFraction mu 0 squared s 2 squared Over sigma-summation Underscript i equals 1 Overscript n 2 Superscript star Baseline Endscripts f Subscript 2 i Baseline w Subscript 2 i Baseline EndFraction right-parenthesis squared OverOver StartFraction s 1 Superscript 4 Baseline Over left-parenthesis n 1 minus 1 right-parenthesis left-parenthesis sigma-summation Underscript i equals 1 Overscript n 1 Superscript star Baseline Endscripts f Subscript 1 i Baseline w Subscript 1 i Baseline right-parenthesis squared EndFraction plus StartFraction mu 0 Superscript 4 Baseline s 2 Superscript 4 Baseline Over left-parenthesis n 2 minus 1 right-parenthesis left-parenthesis sigma-summation Underscript i equals 1 Overscript n 2 Superscript star Baseline Endscripts f Subscript 2 i Baseline w Subscript 2 i Baseline right-parenthesis squared EndFraction EndEndFraction

The t value for the Satterthwaite-based unpooled test is computed as

t Subscript u Baseline equals StartFraction y overbar Subscript 1 Baseline minus mu 0 y overbar Subscript 2 Baseline Over left-parenthesis StartFraction s 1 squared Over sigma-summation Underscript i equals 1 Overscript n 1 Superscript star Baseline Endscripts f Subscript 1 i Baseline w Subscript 1 i Baseline EndFraction plus StartFraction mu 0 squared s 2 squared Over sigma-summation Underscript i equals 1 Overscript n 2 Superscript star Baseline Endscripts f Subscript 2 i Baseline w Subscript 2 i Baseline EndFraction right-parenthesis Superscript one-half Baseline EndFraction

The p-value of the test is computed as

p hyphen value equals StartLayout Enlarged left-brace 1st Row 1st Column upper P left-parenthesis t Subscript u Superscript 2 Baseline greater-than upper F Subscript 1 minus alpha comma 1 comma normal d normal f Sub Subscript u Sub Superscript star Subscript Baseline right-parenthesis comma 2nd Column two hyphen sided 2nd Row 1st Column upper P left-parenthesis t Subscript u Baseline less-than t Subscript alpha comma normal d normal f Sub Subscript u Sub Superscript star Subscript Baseline right-parenthesis comma 2nd Column lower one hyphen sided 3rd Row 1st Column upper P left-parenthesis t Subscript u Baseline greater-than t Subscript 1 minus alpha comma normal d normal f Sub Subscript u Sub Superscript star Subscript Baseline right-parenthesis comma 2nd Column upper one hyphen sided EndLayout
Last updated: December 09, 2022