Dataplot Vol 1 Vol 2

DIFFERENCE OF MEANS CONFIDENCE INTERVAL

Name:
DIFFERENCE OF MEANS CONFIDENCE INTERVAL
Type:
Analysis Command
Purpose:
Generates a confidence interval for the difference between two means.
Description:
The confidence interval for the difference between tow means is defined by:

$$(\bar{Y}_{1} - \bar{Y}_{2}) \pm \sqrt{\frac{s_{1}^{2}}{n_{1}} + \frac{s_{2}^{2}}{n_{2}}} t_{1-\alpha/2,df}$$

where

$$\bar{Y}_1$$ = mean of first sample
$$\bar{Y}_2$$ = mean of second sample
s1 = standard deviation of sample 1
s2 = standard deviation of sample 2
$$\alpha$$ = the desired significance level
df = the degrees of freedom

= $$\frac{(\frac{s_{1}^{2}}{n_{1}} + \frac{s_{2}^{2}}{n_{2}})^2} {(\frac{s_{1}^{2}}{n_{1}})^{2}(n_1 - 1) + (\frac{s_{2}^{2}}{n_{2}})^{2}(n_2 - 1)}$$

Syntax:
DIFFERENCE OF MEANS CONFIDENCE INTERVAL <y1> <y2>
<SUBSET/EXCEPT/FOR qualification>
where <y1> is the first response variable,
<y2> is the second response variable,
and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
DIFFERENCE OF MEANS CONFIDENCE INTERVAL Y1 Y2
DIFFERENCE OF MEANS CONFIDENCE INTERVAL Y1 Y2 SUBSET TAG > 2
DIFFERENCE OF MEANS CONFIDENCE INTERVAL Y1 Y2 SUBSET Y1 > 0
Note:
A table of confidence intervals is printed for alpha levels of 50.0, 75.0, 90.0, 95.0, 99.0, 99.9, 99.99, and 99.999. The sample sizes, sample means, sample standard deviations, and the standard error are also printed. The t-value and t-value X standard error are printed in the table.
Default:
None
Synonyms:
None
Related Commands:
 CONFIDENCE LIMITS = Generate a confidence interval for the mean. T-TEST = Perform a two sample t-test. BIHISTOGRAM = Generate a bihistogram. QUANTILE-QUANTILE PLOT = Generate a quantile-quantile plot. KOLMOGOROV-SMIRNOV TWO SAMPLE TEST = Generate a Kolmogorov- Smirnov two sample test.
Reference:
Confidence intervals for the difference of two means are covered in most introductory statistics books.
Applications:
Confirmatory Data Analysis
Implementation Date:
1999/03
Program:
SKIP 25
RETAIN Y2 SUBSET Y2 >= 0
SET WRITE DECIMALS 5
DIFFERENCE OF MEANS CONFIDENCE INTERVAL Y1 Y2

Dataplot generates the following output:

Confidence Limits for the Difference Between Means
(Two-Sided)

Response Variable 1: Y1
Response Variable 2: Y2

Summary Statistics for Variable 1:
Number of Observations:                  249
Sample Mean:                             20.1446
Sample Standard Deviation:               6.4147

Summary Statistics for Variable 2:
Number of Observations:                  79
Sample Mean:                             30.4810
Sample Standard Deviation:               6.1077

Difference Between Sample Means:         -10.3364
Standard Error:                          0.7984

-----------------------------------------------------------------
Confidence       t      t-Value X          Lower          Upper
Value (%)   Value         StdErr          Limit          Limit
-----------------------------------------------------------------
50.000   0.676         0.5400       -10.8764        -9.7965
75.000   1.155         0.9224       -11.2588        -9.4141
90.000   1.656         1.3222       -11.6586        -9.0142
95.000   1.977         1.5788       -11.9152        -8.7576
99.000   2.612         2.0856       -12.4220        -8.2508
99.900   3.363         2.6850       -13.0215        -7.6514
99.990   4.008         3.2002       -13.5366        -7.1362
99.999   4.588         3.6632       -13.9996        -6.6733

Date created: 02/25/2003
Last updated: 12/11/2023