[R] problem about finding power in test about variances

ati sundar atisundar at yahoo.com
Thu Apr 30 17:59:25 CEST 2009


Ok sorry Uwe.

Let me put a specific problem. I have some data for which sample size
n=15 and sample standard deviation s=0.008 mm. Now there are two parts of
the question. Here the random variable is diameter of rivet hole.
a) Is there a strong evidence to indicate that the standard deviation
of hole diameter exceeds 0.01 mm. Use aplha=0.05 .
 Now here Ho: variance = (0.01)^2 = 0.0001 mm
          H1: variance > 0.0001 mm
we can use test statistic  chisq = (n-1)*s^2 / 0.0001

Chisq has degree of freedom n-1=14. So using this test  statistic
we can check the null hypothesis. I can do this part. Now lets
look at the next part.

b)If true variance (sigma) is as large as 0.0125 mm, what sample size will
be required to detect this with power of at least 0.8 

Now this is the part where I am stuck and I want to use R to solve this
I know that R has power tests for other test statistics, but how do I solve this ?

Ati


--- On Thu, 4/30/09, Uwe Ligges <ligges at statistik.tu-dortmund.de> wrote:

> From: Uwe Ligges <ligges at statistik.tu-dortmund.de>
> Subject: Re: [R] problem about finding power in test about variances
> To: atisundar at yahoo.com
> Cc: r-help at r-project.org
> Date: Thursday, April 30, 2009, 4:37 PM
> ati sundar wrote:
> > Hello All
> > 
> > I am new to this list. I have a problem where for a
> single sample drawn from normal population, null hypothesis
> is that variance = k (say).
> 
> Perhaps you want to tell us more precisely what you are
> going to do rather than asking the same inprecise question
> again and again (including messages to single persons on the
> list).
> Is k fixed or the variance? What are your data?  Specify a
> valid Null / Alternative combination. If you Null is
> variance = k (say) then you alternative is variance != k or
> if the alternative is variance > k, then your null is
> probably variance <= k
> 
> Uwe Ligges
> 
> 
> 
>  Alternative hypothesis is variance > k. Now if we know
> the true variance, then I would like to calculate the sample
> size required to produce certain power (for some
> > significance). How do I do this ? I thought of using
> pwr.chisq.test, and I contacted the author stephane
> champely, but he said his package can't do this. Does
> anybody have an idea ?
> > 
> > Thanks
> > Ati
> > 
> > ______________________________________________
> > 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.




More information about the R-help mailing list