I am doing some problems on hypothesis tests on the variance, using a $\chi^2$ distribution. I need to find the power of the test, and I tried to write my own code in R.
I don't know how to express non-centrality parameter in terms of other known values like sample size or sample variance. I was looking at R package called pwr
and there is a function called pwr.chisq.test
, but this function is talking about the effect size.
How do I related the effect size to the non-centrality parameter to do my calculation?
Ok I will just post a problem here... The assumption here is that the underlying distribution is normal... Some study is to be done on the diameter of the rivet holes which are used in engineering components. Sample of 15 components (n=15) was tested and it was found that standard dev, s = 0.008 mm. Is there strong evidence to indicate that std of hole diameter exceeds 0.01 mm ? Use $\alpha = 0.01$. Find the P-value of the test.( I can do this part using pchisq function in R... till this point its fine).. If real std is as large as 0.0125 mm, what sample size will be required to detect this with power of at least 0.8 ?
This is the part I am having trouble with R. I can use Minitab to get the answer. But I want to learn how to use R to do this. This function pwr.chisq.test
has the parameter called effect size and in this case I don't have idea how to choose it.