I am doing some problems on hypothesis tests on the variance. Here we use chi-sqaure distribution .And I need to find the power of the test. I was trying to write my own code in R. But I don't know how to express non-centrality parameter in terms of other known values like sample size, 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. So how do I relate the effect size to the non-centrality parameter to do my calculation ?