[R] Fw: Sample size required to estimate population variance Solution

Thomas Subia Thom@@@Sub|@ @end|ng |rom |mc-n@@com
Tue Jul 9 17:22:20 CEST 2019


Colleagues,

The original question was how many samples should be taken in order to estimate a population standard deviation to within a defined percentage of its actual value.
In an article from The American Statistician, Volume 15, 1961, Issue 3, the sample size is given by:

N = (1/2) * (y/d)^2

Where y = the Z score of the confidence interval one desires and d = the desired margin of error as a percentage.

Note here that when coding this with R, one needs to apply the ceiling function to the equation since N may not be an integer.

The corresponding confidence intervals can be found using the equations in the article.

All the best,

Thomas Subia
Quality Engineer / Statistician
Fresenius Medical Care North America

From: tgs77m using yahoo.com <tgs77m using yahoo.com> 
Sent: Tuesday, July 9, 2019 8:01 AM
To: Thomas Subia <Thomas.Subia using fmc-na.com>
Subject: [EXTERNAL EMAIL] Fw: [R] Sample size required to estimate population variance

NOT an FMCNA email - External email
FYI

----- Forwarded Message -----
From: Stephen Ellison <mailto:S.Ellison using LGCGroup.com>
To: Thomas Subia <mailto:tgs77m using yahoo.com>; mailto:r-help using r-project.org <mailto:r-help using r-project.org>
Sent: Friday, July 5, 2019, 06:28:54 AM PDT
Subject: RE: [R] Sample size required to estimate population variance

>  Thanks for the suggestion but I'm not sure that it answers my original
> question.I need to know how many samples I need to collect to collect in
> order to estimate the sample size needed to achieve a specific margin of
> error for confidence intervals for the population variance. I'm not sure
> whether the pwr package does that.


You could consider the case of 50% power, though that'd not be exact for asymmetry.

But if this is a simple univariate data set, it sounds like messing around with chi-squared quantiles and uniroot ought to work. Exactly how are you calculating your confidence limits and which one (upper or lower) needs to be of a specific size?


*******************************************************************
This email and any attachments are confidential. Any use, copying or
disclosure other than by the intended recipient is unauthorised. If 
you have received this message in error, please notify the sender 
immediately via +44(0)20 8943 7000 or notify mailto:postmaster using lgcgroup.com 
and delete this message and any copies from your computer and network. 
LGC Limited. Registered in England 2991879. 
Registered office: Queens Road, Teddington, Middlesex, TW11 0LY, UK



More information about the R-help mailing list