Power of One Sample Variance Testing

Let \sigma_0^2 represent the hypothetical variance and s2 the observed variance. Let x+crit be the right critical value (based on the null hypothesis with significance level α/2) and x-crit be the left critical value (two-tailed test) , i.e.

x-crit = CHIINV(1−α/2,n−1)               x+crit = CHIINV(α/2,n−1)

Let δ = \sigma_0^2/s2. Then the beta value for the two-tailed test is given by

β = CHIDIST(δ*x-crit,n−1)−CHIDIST(δ*x+crit,n−1)

For the one-tailed test H0: \sigma^2 ≤ \sigma_0^2, we use

xcrit = CHIINV(α,n−1)

β = 1−CHIDIST(δ*xcrit,n−1)

For the one-tailed test H0: \sigma^2 ≥ \sigma_0^2, we use

xcrit = CHIINV(α,n−1)

β = CHIDIST(xcrit/δ,n−1)

Example 1: Calculate the power for the one-tailed and two-tailed tests from Example 3 of One Sample Variance Testing based on a sample of 50 pipes.

The results are shown in Figure 1: 73.4% for the one-tailed test and 63.9% for the two-tailed test.

Power one-sample variance

Figure 1 – Power of a one sample test of the variance

Real Statistics Functions: The following function is provided in the Real Statistics Resource  Pack:

VAR1_POWER(ratio, n, tails, α) = the power of a one sample chi-square variance test where ratio = \sigma_0^2/s2 (effect size), n = the sample size, tails = # of tails: 1 or 2 (default) and α = alpha (default = .05).

VAR1_SIZE(ratio, 1−β, tails, α) = the minimum sample size required to achieve power of 1−β (default .80) in a one sample chi-square variance test where ratio = \sigma_0^2/s2 (effect size), tails = # of tails: 1 or 2 (default) and α = alpha (default = .05).

For Example 1, VAR1_POWER(E7,E8,1,E10) = 0.733927 and VAR1_POWER(J7,J8,2,J10) = 0.638379, which is the same as the results shown in Figure 1.

Example 2: Calculate the sample size required to find an effect of size .64 with alpha = .05 and power of .80 for the one-tailed and two-tailed tests.

The one tailed test requires a sample size of VAR1_SIZE(.64, .80, 1, .05) = 67 and the two tailed test requires a sample of size VAR1_SIZE(.64) = VAR1_SIZE(.64, .80, 2, .05) = 86.

12 Responses to Power of One Sample Variance Testing

  1. Javier says:

    Hi. Already using the RealStats pack to do some underrated but quite interesting statistical power calculations.

    When I plug VAR1_POWER(0.64,50,1,0.05) I get 0,677983 and when plugging VAR1_POWER(0.64,50,2,0.05) I get 0,539065. The VAR1_SIZE values I get are the same than in the example. I’m using Excel 2016.

    Could this be a matter of some iteration or precision settings somewhere in Excel I need to adjust?

    • Charles says:

      Javier,
      Sorry, but I don’t understand what you mean “the VAR1_SIZE values I get are the same than in the example”. Please explain.
      Charles

      • Daniel says:

        Hi Charles,

        I love the website and the add in. I tend to recommend it to people whenever the opportunity arises.

        I had exactly the same problem that Javier had, and found that I could get the correct outputs when I used 1/δ as my first argument. So it seems like the issue is based around which variance is taken to be the hypothetical. However, Example 1 as illustrated, is still producing 0.677983 and 0.539065 for one and two-tailed tests respectively (at least in my experience).

        Thanks.

        • Charles says:

          Daniel,
          I thought that this was already fixed in Rel 4.14, but if not I will make sure that it is fixed in the next release (Rel 4.15). I am finishing up the testing for this release and it should be available soon.
          Charles

          • Daniel says:

            I just double checked the example using a fresh copy of your add-in. I can confirm that my results are still as described above.

            As always, thank you for your generous work.

          • Charles says:

            Daniel,
            I will make sure that this change is made in Rel 4.15.
            Charles

  2. Alex Bartic says:

    Hi,

    Why for the second one-tailed test, at the call of CHIDIST, did you divided by delta instead of multiply?

  3. Jonathan Bechtel says:

    Hi Charles,

    I believe you have a few inconsistencies on this page.

    1). The sample size you use for this problem is 50, but the sample size from the problem you reference is 25.

    2). At the top of the page you say X-crit = CHIINV(a/2, n-1) and X+crit = CHIINV(1-a/2, n-1) but in your two tailed problem you use the inverse.

    3). When you talk about the answers given by var1_power you use var1_power(E7, E8, 1, E10) for the 2 tailed case. I’m guessing you mean var1_power(J7, J8, 2, J10), which does give the correct answer.

    4). When I plug in VAR1_SIZE(0.64, 0.80, 1, .05) and VAR1_SIZE(0.64, .80, 2, .05) I get 67 and 86. I’m using Excel 2013 on a Windows.

    • Charles says:

      Jonathan,
      Thanks for carefully looking at this webpage and finding the mistakes identified in your comment. I have now made the necessary corrections on the webpage. I really appreciate your diligence and help in making the website more accurate, and therefore easier to understand.
      Charles

      • Jonathan Bechtel says:

        No problem.

        I LOVE this website.

        Studying its contents has now become my sacred daily ritual and acquiring a higher understanding of mathematics is incredibly gratifying.

        There is no way I’d ever be able to learn what I’m learning without this site.

        • Charles says:

          Jonathan,
          I am please to hear this. I am glad that you are learning a lot from the site and I appreciate your diligence in finding errors to help improve the site.
          Charles

Leave a Reply

Your email address will not be published. Required fields are marked *