# Math Help - Choice of Sample size for Hypothesis tests on variance

1. ## Choice of Sample size for Hypothesis tests on variance

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 ?
thanks

2. ## Re: Choice of Sample size for Hypothesis tests on variance

Hey issacnewton.

What are the specific hypothesis you are testing? Usually for a power test you will be testing say sigma^2 = a vs sigma^2 = b and if this is the case you will either find some measure getting power usually for specific values of a and b and not one that is algebraic or symbolic (like a formula) due to the complicated nature of the statistical distributions.

So do you have specific values for a and b and are the hypothesis tests I mentioned accurate or not?

3. ## Re: Choice of Sample size for Hypothesis tests on variance

Hi chiro

Basically I am doing following hypothesis test.

$H_0 : \sigma^2 = \sigma_0^2$

$H_1 : \sigma^2 \ne \sigma_0^2$

And I need to find the power of the test....... I am using Montgomery and Runger's "Applied Statistics and Probability for Engineers" 3ed. And author introduces
something he calls as abscissa parameter $\lambda$

$\lambda= \frac{\sigma}{\sigma_0}$

and then he uses the ROC curves of $\beta$ (type II error) against $\lambda$ to estimate the power. I am putting the snapshot of
one of these curves he is using. Now authors must have used some software to plot these plots...... So I want to use R to plot such curves for these
problems (hypothesis tests on the variance of a single sample from normal population). How can I do that ?

5. ## Re: Choice of Sample size for Hypothesis tests on variance

hi chiro

I finally figured it out. We need to first define effect size. In case of one sample hypothesis test on the population variance, the effect size is defined as the ratio of
true variance to the hypothesized variance. Then the power turns out to be (this is case for upper sided test)

$P\left( \chi^2 > \frac{CV}{ES}\right)$

where CV is the critical value

$CV = \chi^2_{\alpha,n-1}$

and ES is the effect size. We can use R for this. While looking for these answers, I also found a free statistical software, G*power