Date: Mon, 3 May 2004 13:19:43 +0200
Reply-To: Spousta Jan <JSpousta@CSAS.CZ>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Spousta Jan <JSpousta@CSAS.CZ>
Subject: Re: syntax to compute a common standard deviation - is there a pr
oblem with the syntax I have been using
Content-Type: text/plain; charset="iso-8859-2"
I suspect, that the calculator gives not a 'pure' standard deviation, but sd times a quantile of a Student's distribution - 0,63 * 1,96 is very close to the calculator's result.
One more advice: It is better to write formulae in one row, if they are not too complicated:
compute s = sqrt(((n1-1)*s1**2 + (n2-1)*s2**2)/(n1+n2-2)).
But your method also leads to correct results, I think, although it is not so easy to check it.
From: Bob Green [mailto:firstname.lastname@example.org]
Sent: Monday, May 03, 2004 1:02 PM
Subject: syntax to compute a common standard deviation - is there a
problem with the syntax I have been using
I am wanting to compute a common standard deviation to perform a power
analysis of a t-test. I found the following formula:
s = sqrt[((n1-1)s1^2 + (n2-1)s2^2)/(n1+n2-2)]
I wrote the no-doubt inefficient syntax (below) to perform this
operation. Sample values are:
(mean = 1.644444)
s2 = .6135986
(mean 2 =1.595745)
When I used the syntax below I arrived at a value of .63 , whereas when I
entered this data into a power calculator the value was 1.2408 ( the
correct mean difference was reported .0487)
Any advice is appreciated,
COMPUTE n1minus = n1-1.
COMPUTE n2minus = n2-1.
compute sd1sq = s1*s1.
compute sd2sq = s2*s2.
compute nom = n1minus*sd1sq + n2minus*sd2sq .
compute denom = (n1 +n2) -2.
COMPUTE nomdenom = nom/denom.
COMPUTE comstd = SQRT (nomdenom).