And another problem, in addition to the points made by others, is that the formula for the SD gives a biased estimate (it underestimates it) of the population SD for small n when sampling from a normal distribution. When n is about twelve or so or more, the bias can usually be ignored (it is about 2.2%), but when you have only two numbers, the correction factor is about 1.25.
The approximate correction formula, as I understand it, is (n-.75)/(n-1), so if n = 2, then it is 1.25/1, but this is not exact. The "real" formula is more complex (not difficult, but involves the gamma function) and my reference to it is not at this office, or I would give it. HTH, Ben -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ron Michael Sent: Wednesday, January 16, 2008 2:15 AM To: [EMAIL PROTECTED] Subject: [PS] [R] Different results in calculating SD of 2 numbers Hi all, Can anyone tell me why I am getting different results in calculating SD of 2 numbers ? > (1.25-0.95)/2 [1] 0.15 > sd(c(1.25, 0.95)) [1] 0.2121320 # why it is different from 0.15? Regards, Send instant messages to your online friends http://uk.messenger.yahoo.com [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.