[R] Homework help: Is this how CIs of normal distributions are computed?
Nordlund, Dan (DSHS/RDA)
NordlDJ at dshs.wa.gov
Wed Oct 31 21:36:23 CET 2007
> -----Original Message-----
> From: r-help-bounces at r-project.org
> [mailto:r-help-bounces at r-project.org] On Behalf Of Zembower, Kevin
> Sent: Wednesday, October 31, 2007 12:57 PM
> To: r-help at r-project.org
> Subject: [R] Homework help: Is this how CIs of normal
> distributions are computed?
>
> 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.
>
> To recap yesterday:
> > x <- scan()
> 1: 62 52 68 23 34 45 27 42 83 56 40
> 12:
> Read 11 items
> > alpha<- .05
> > t.test(x)
>
> One Sample t-test
>
> data: x
> t = 8.8696, df = 10, p-value = 4.717e-06
> alternative hypothesis: true mean is not equal to 0
> 95 percent confidence interval:
> 36.21420 60.51307
> sample estimates:
> mean of x
> 48.36364
>
> What if I now mock-up my data for 100 trials:
> > 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.
>
<<<snip>>>
You could probably use the Normal distribution as an approximation under these circumstances, but why would you when you have a more accurate CI using t.test?
Dan
Daniel J. Nordlund
Research and Data Analysis
Washington State Department of Social and Health Services
Olympia, WA 98504-5204
More information about the R-help
mailing list