[R] Mean from confidence intervals

Peter Francis peterfrancis at me.com
Sat Jan 29 15:39:36 CET 2011

Dear all,

The data is generated from 1000 random samples of a phylogenetic tree to calculate phylogenetic diversity. I sampled the tree 1000 times at with various species communities (600) to get a random PD per community. I then want to test my observed PD with that of a random sample to test for significance.

However the script i used, output 

q0.005	q0.01 etc upto q0.995

But i wanted to know the mean PD value per community based on the output, and that is where i am struggling


On 29 Jan 2011, at 02:16, Joshua Wiley wrote:

Hi Peter,

Do you know the formula used to calculate the confidence interval?  I
suspect it is possible with minimal algebraic manipulation of the CI
formula to find what the mean is.  Assuming a normal distribution (as
David), then it is certainly possible to find.  This wikipedia page
might help:


And no, this is not really the correct place to ask.  My basic rule of
thumb is, "Does my question have anything to do with R?  If my answer
is, "No." then I usually look for somewhere else to post.  Of course,
for a comprehensive list, see the posting guide.

If you are wondering if there is a function to do it for you, I am not
sure, but it would be trivial to programme and if you show us the
formula for it (the mean from the CI), we can certainly give you
pointers for how to write your own :)



On Fri, Jan 28, 2011 at 2:15 PM, Peter Francis <peterfrancis at me.com> wrote:
> Dear List,
> I am not sure if A) this is possible or B) the correct place to ask.
> I am looking to find the mean - i have n, and the two-tailed confidence intervals 0.95 & 0.25 with a  p-value of 0.05.
> Can i find the mean from this data ?
> Thanks
> Peter
> ______________________________________________
> R-help at 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.

Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles

More information about the R-help mailing list