Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.stat.math.independent

Topic: Semi-amplitude Confidence Intervals for the two normal difference means
Replies: 2   Last Post: Jun 12, 2013 1:45 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Luis A. Afonso

Posts: 4,526
From: LIsbon (Portugal)
Registered: 2/16/05
Semi-amplitude Confidence Intervals for the two normal difference means
Posted: May 27, 2013 3:02 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Semi-amplitude Confidence Intervals for the two normal difference means

With normal data X~N(muX, sigma): nX, Y~N(muY, sigma): nY whatever the sample sizes nX, nY , the C.I. for D= muX-muY is obtained from:

Obsvdiff - t0*s <= D <= Obsvdiff + t0*s

Where Obsvdiff is the observed difference of the sample mean values, t0(1- alpha/2) is the student T value nX+nY-2 degrees of freedom, and s is such that
s0^2 = (ssdX+ssdY)/(nX+nY-2) *(1/nX+1/nY)
ssd= sum of squared deviations.

For alpha= 0.05, two-tails,
Sample sizes______CI semi-amplitude
__5,5____________2.160_______
_10,10___________1.244_______
_15,15___________0.943_______
_20,20___________0.784_______
_25,25___________0.682_______
_30,30___________0.611_______

The T values were 2.306, 2.011, 2.048, 2.024, 2.011, 2.002, respectively.
Aim: these evaluations do show how large should be the samples in order that a given difference on observed sample means can be ascribed to differences on Populations and not to unavoidable random fluctuations.
Luis A. Afonso
REM "class-2"
CLS
PRINT " < class-2 > "
DEFDBL A-Z
DIM ww(8001)
INPUT " nX, nY (<= ) "; nX, nY
pi = 4 * ATN(1)
df = nX + nY - 2
PRINT " df= "; df
INPUT " Tstudent "; tst
INPUT " How many "; many
FOR rt = 1 TO 10
RANDOMIZE TIMER
REM
FOR rpt = 1 TO many
REM
mx = 0: xx = 0
FOR i = 1 TO nX
aa = SQR(-2 * LOG(RND))
x = 0 + aa * COS(2 * pi * RND)
mx = mx + x / nX
xx = xx + x * x
NEXT i
sqdX = xx - nX * mx * mx
my = 0: yy = 0
FOR i = 1 TO nY
aa = SQR(-2 * LOG(RND))
Y = 0 + aa * COS(2 * pi * RND)
my = my + Y / nY
yy = yy + Y * Y
NEXT i
sqdY = yy - nY * my * my
sqd = sqdX + sqdY
uW =
SQR(sqd / (nX + nY - 2)) * SQR(1 / nX + 1 / nY)
uW = tst * uW
uu = INT(uW * 1000 + .5)
IF uu > 8000 THEN uu = 8000
ww(uu) = ww(uu) + 1 / many
NEXT rpt
g = .975
sw = 0
FOR t = 0 TO 8000
sw = sw + ww(t)
IF sw > g THEN GOTO 14
NEXT t
14 PRINT USING " #.### "; t / 1000; sw
REM
xi = t / 1000
mix = mix + xi / 10
xxi = xxi + xi * xi
FOR tt = 0 TO 8001: ww(tt) = 0: NEXT tt
NEXT rt
REM
ssdi = xxi - 10 * mix * mix
v = ssdi / (10 * 9)
e = SQR(v / 9)
PRINT USING " mean #.### "; mix;
PRINT USING "+/- #.### "; e
END



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.