Download S-Plus 4.5 Supplement

Transcript
NORMALLY DISTRIBUTED DATA
#
# lower-tail test, minimum detectable difference
#
> summary(normal.sample.size(mean = 100, sd1 = 10, n1 =
(1:5)*20,
power = .9, alt = "l"))
mean.alt
delta power n1
1 93.45636 -6.543641
0.9 20
2 95.37295 -4.627053
0.9 40
3 96.22203 -3.777973
0.9 60
4 96.72818 -3.271821
0.9 80
5 97.07359 -2.926405
0.9 100
See
the
online
help files for
for more details.
normal.sample.size
and
summary.power.table
Comparing
Means From
Two Samples
Extending this formula to two-sampled tests, is relatively easy. Given two
independent samples from normal distributions
X1, i ∼ N ( µ 1, σ 12 )
i = 1, …, n 1
X2, j ∼ N ( µ2, σ 22 )
j = 1, …, n 2
where n 2 = kn 1 , we'll construct a two-sided test of equality of means
H o : µ1 = µ 2
H a : µ1 ≠ µ 2
which is more conveniently written
H o : µ 2 – µ1 = 0
Ha : µ2 – µ1 ≠ 0
143