[R] Different results in calculating SD of 2 numbers

Bjørn-Helge Mevik b.h.mevik at usit.uio.no
Wed Jan 16 09:34:44 CET 2008


Ron Michael <ron_michael70 at yahoo.com> writes:

> Can anyone tell me why I am getting different results in calculating
> SD of 2 numbers ?
>
>> (1.25-0.95)/2
> [1] 0.15

Because this is not the SD?  Try

> (1.25-0.95)/sqrt(2)

:-)

>> sd(c(1.25, 0.95))
> [1] 0.2121320          # why it is different from 0.15?

-- 
Bjørn-Helge Mevik




More information about the R-help mailing list