# [R] Homework help: Is this how CIs of normal distributionsare computed?

Zembower, Kevin kzembowe at jhuccp.org
Wed Oct 31 21:17:50 CET 2007

```Daniel, thanks, I should have remembered this, too; I've seen it and
worked with it before. Thanks.

-Kevin

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of Daniel Lakeland
Sent: Wednesday, October 31, 2007 4:04 PM
To: r-help at r-project.org
Subject: Re: [R] Homework help: Is this how CIs of normal
distributionsare computed?

On Wed, Oct 31, 2007 at 03:56:37PM -0400, Zembower, Kevin wrote:
> I'm looking for a function in R similar to t.test() which was
generously
> pointed out to me yesterday, but which can be used for normally
> distributed data.
...
> > x100<-sample(x, 100, replace=TRUE)
>
> I think that I should be able to use a normal distribution, because of
> the n>30 rule-of-thumb.
>
> I can compute the 95% CI using:
> > mean(x100) - qnorm(alpha/2)*sd(x100)/sqrt(length(x100))

You can compute quantiles of the particular normal distribution itself
rather than transforming from the standardized normal by hand.

qnorm(c(.025,.975),mean=mean(x100),sd=sd(x100)/sqrt(length(x100)))

--
Daniel Lakeland
dlakelan at street-artists.org
http://www.street-artists.org/~dlakelan

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help