Power and Sample Size for 1 Variance

On this page
  1. Purpose
  2. Key Capabilities
  3. Statistical Methods
  4. Input Fields & Options
  5. Output Descriptions
  6. Worked Example

Purpose

Power and Sample Size for 1 Variance plans a test of a process standard deviation (or variance) against a target or historical value. It answers how many measurements are needed to detect a given increase or decrease in spread, what power a planned sample gives, or the smallest change in spread a given sample can detect. The change is entered as a ratio of the true standard deviation to the hypothesized one, so you do not need to enter the standard deviation itself. Enter any two of sample size, ratio and power, and the tool solves for the third. Use it before a 1 Variance test, for example to check that a process change has not made the spread worse.

Key Capabilities

  • Solves for sample size, power or ratio: leave blank the one you want.
  • Several values at once, e.g. ratios “1.25 1.5 2” and power values “0.8 0.9”, give one row for each combination.
  • Two-sided (Ratio ≠ hypothesized ratio) or one-sided (less than, greater than) alternatives, at the confidence level you choose.
  • Exact chi-square calculation, no normal approximation.
  • Power curve of power against sample size for each ratio, with the solved points marked.

Statistical Methods

The test behind the calculation is the chi-square test for one variance: with n measurements from a normal population, (n − 1)·S²/σ₀² follows a chi-square distribution with n − 1 degrees of freedom when the true standard deviation equals the hypothesized value σ₀. If the true standard deviation is σ = r·σ₀, the same statistic is r² times a chi-square variable, so only the ratio r matters. The significance level is α = 1 − confidence level / 100.

For the “greater than” alternative, power = P(χ²ₙ₋₁ > c₁₋α / r²), where c₁₋α is the upper chi-square critical value. For “less than”, power = P(χ²ₙ₋₁ < c_α / r²). For the two-sided test both tails count, using c_α/2 and c₁₋α/2. The sample size for a target power is found numerically and rounded up, and the power at that whole number is reported as the actual power. When solving for the ratio, the tool searches below 1 for the “less than” alternative and above 1 otherwise.

The chi-square test assumes normal data and is sensitive to departures from normality, so check the shape of the data when you run the test. Detecting a change in spread needs more data than most people expect: small ratios such as 1.25 need large samples.

Input Fields & Options

Field

Description

Sample sizes

Space or comma-separated, e.g. “10 20 30”. Leave blank to solve for sample size.

Ratio(s)

Space or comma-separated, e.g. “1.5 2”. Ratio of the true standard deviation to the hypothesized standard deviation that you want to detect. Leave blank to solve for it.

Power values

Space or comma-separated, e.g. “0.8 0.9”. Leave blank to solve for power.

Confidence level

Default 95 (α = 0.05); 75 to 100.

Alternative hypothesis

Ratio ≠ hypothesized ratio (default), Ratio < hypothesized ratio or Ratio > hypothesized ratio.

Power curve

Ticked by default: draws power against sample size.

Title

Title shown on the output and the power curve.

power-and-sample-size-1-variance-inputs


Figure 1 — Solving for sample size: Ratio(s) = 1.5, Power values = 0.8 0.9, one-sided (Ratio > hypothesized ratio) at 95% confidence.

Output Descriptions

  • Settings — what was solved for, the confidence level and the alternative hypothesis.
  • Results — one row per combination: ratio, sample size, and target and actual power when solving for sample size, or power when solving for power, or ratio when solving for ratio.
  • Power Curve — power against sample size for each ratio, with the calculated points marked.
  • PDF export via Download.

power-and-sample-size-1-variance-output


Figure 2 — Results for the example: 19 tablets for 80% power and 27 for 90% power to detect a 50% increase in standard deviation.

Worked Example

A tablet press has a long-run weight standard deviation of 2 mg. After a new punch set is fitted, the quality team wants to check that the spread has not grown, and an increase to 3 mg (a ratio of 1.5) would be a problem. Only an increase matters, so they choose Ratio > hypothesized ratio. They leave Sample sizes blank and enter Ratio(s) = 1.5 and Power values = 0.8 0.9, at 95% confidence.

The tool needs 19 tablets for 80% power (actual power 0.802) and 27 tablets for 90% power (actual power 0.900). A quick check of 10 tablets has a power of only 0.583. The size of the change matters a great deal: detecting a ratio of 1.25 (2.5 mg) with 80% power needs 61 tablets, while a doubling of the standard deviation needs only 8. A two-sided test at ratio 1.5 needs 24 tablets for 80% power.