MANUFACTURING / INTEGRATION / AUTOMATION
LIVE TOOL

Power and sample size

How many parts to measure: power and sample size for t-tests, proportions and one-way ANOVA, and the sample size of a capability study for a Cpk confidence bound.

Calculator

1-sample t · input

Specify any two

Leave empty the one to calculate. Several values give a table: separate them with spaces or semicolons (0.8 0.9 0.95).

Test

Exact power from the noncentral t distribution, as Minitab. σ: the standard deviation of single values, from earlier data.

Runs in this browser. Data is not uploaded or stored.

1-sample t · results

n = 23 to 36

With n = 23 values, a difference of the mean from the target of 0.5 is detected with power 0.817 (target 0.8); with one less the power falls short. The table has all 3 combinations.

H₀: μ = μ₀, H₁: μ ≠ μ₀; difference = μ − μ₀; two-sided, α = 0.05; σ = 0.8; exact power from the noncentral t distribution, n − 1 degrees of freedom.

  • σ is a planning value: take it from earlier data of the same process (a capability study or a control chart); a σ that is too small gives too few samples.
Power curve for 1-sample t. Power from 0 to 1 against difference (μ − μ₀) from -0.75 to 0.75, one line per sample size: n = 23 (solid), n = 29 (dashed), n = 36 (dotted). Table values: 0.5 with n = 23: power 0.817; 0.5 with n = 29: power 0.901; 0.5 with n = 36: power 0.954. Reference line at 0 (no difference, power = α = 0.05).00.20.40.60.81-0.500.5Power curve for 1-sample tPowerDifference (μ − μ₀)
n = 23n = 29n = 36Table valueNo difference (power = α)
Sample size for each difference and power
DifferenceTarget powerSample sizeActual power
0.50.8230.817107
0.50.9290.901175
0.50.95360.954034

2-sample t · input

Specify any two

Leave empty the one to calculate. Several values give a table: separate them with spaces or semicolons (0.8 0.9 0.95).

Test

n is the size of each sample; both samples are assumed to have the same σ (Minitab’s assumption).

Runs in this browser. Data is not uploaded or stored.

2-sample t · results

n = 26 to 34 per sample

With n = 26 per sample, a difference between the means of 0.04 is detected with power 0.807 (target 0.8); with one less the power falls short. The table has all 2 combinations.

H₀: μ₁ = μ₂, H₁: μ₁ ≠ μ₂; difference = μ₁ − μ₂; two-sided, α = 0.05; σ = 0.05 in both samples; exact power from the noncentral t distribution, equal σ, 2n − 2 degrees of freedom.

  • σ is a planning value: take it from earlier data of the same process (a capability study or a control chart); a σ that is too small gives too few samples.
Power curve for 2-sample t. Power from 0 to 1 against difference (μ₁ − μ₂) from -0.06 to 0.06, one line per sample size: n = 26 (solid), n = 34 (dashed). Table values: 0.04 with n = 26: power 0.807; 0.04 with n = 34: power 0.902. Reference line at 0 (no difference, power = α = 0.05).00.20.40.60.81-0.06-0.04-0.0200.020.040.06Power curve for 2-sample tPowerDifference (μ₁ − μ₂)
n = 26n = 34Table valueNo difference (power = α)
Sample size for each difference and power
DifferenceTarget powerSample size per sampleActual power
0.040.8260.807487
0.040.9340.901502

Paired t · input

Specify any two

Leave empty the one to calculate. Several values give a table: separate them with spaces or semicolons (0.8 0.9 0.95).

Test

The paired t is the 1-sample t on the differences First − Second: σ is the standard deviation of those differences, not of the values.

Runs in this browser. Data is not uploaded or stored.

Paired t · results

Power = 0.651 to 0.942

With n = 10 pairs, a mean paired difference of 1 is detected with power 0.651: about 35 of 100 such studies would miss it. The table has all 3 combinations.

H₀: μ_d = 0, H₁: μ_d ≠ 0; difference = mean of First − Second; two-sided, α = 0.05; σ of the differences = 1.2; exact power from the noncentral t distribution, n − 1 degrees of freedom.

  • σ is a planning value: take it from earlier data of the same process (a capability study or a control chart); a σ that is too small gives too few samples.
Power curve for paired t. Power from 0 to 1 against difference (mean of first − second) from -1.5 to 1.5, one line per sample size: n = 10 (solid), n = 15 (dashed), n = 20 (dotted). Table values: 1 with n = 10: power 0.651; 1 with n = 15: power 0.851; 1 with n = 20: power 0.942. Reference line at 0 (no difference, power = α = 0.05).00.20.40.60.81-1.5-1-0.500.511.5Power curve for paired tPowerDifference (mean of First − Second)
n = 10n = 15n = 20Table valueNo difference (power = α)
Power for each difference and sample size
DifferencePairsPower
1100.651227
1150.850777
1200.942102

1 proportion · input

Specify any two

Leave empty the one to calculate. Several values give a table: separate them with spaces or semicolons (0.8 0.9 0.95).

Test

Normal approximation, as Minitab: σ₀ from p₀ under H₀, σ₁ from the comparison p under H₁.

Runs in this browser. Data is not uploaded or stored.

1 proportion · results

n = 253 to 322

With n = 253 items, a true proportion of 0.02 is detected with power 0.802 (target 0.8); with one less the power falls short. The table has all 2 combinations.

H₀: p = 0.05, H₁: p < 0.05; one-sided (<), α = 0.05; hypothesized p₀ = 0.05; normal approximation as Minitab (σ₀ from p₀, σ₁ from the comparison p).

  • Normal approximation, as Minitab’s Power and Sample Size: the exact binomial test has a saw-tooth power that can be a little lower or higher at a given n.
Power curve for 1 proportion. Power from 0 to 1 against comparison proportion p from 0.005 to 0.05, one line per sample size: n = 253 (solid), n = 322 (dashed). Table values: 0.02 with n = 253: power 0.802; 0.02 with n = 322: power 0.901. Reference line at 0.05 (no difference, power = α = 0.05).00.20.40.60.810.010.020.030.040.05Power curve for 1 proportionPowerComparison proportion p
n = 253n = 322Table valueNo difference (power = α)
Sample size for each comparison p and power
Comparison pTarget powerSample sizeActual power
0.020.82530.801725
0.020.93220.900533

2 proportions · input

Specify any two

Leave empty the one to calculate. Several values give a table: separate them with spaces or semicolons (0.8 0.9 0.95).

Test

Normal approximation, as Minitab: σ₀ from the pooled (p₁ + p₂)/2, σ₁ from p₁ and p₂; n is the size of each sample.

Runs in this browser. Data is not uploaded or stored.

2 proportions · results

n = 749 to 1002 per sample

With n = 749 per sample, a comparison proportion p₁ of 0.03 is detected with power 0.8 (target 0.8); with one less the power falls short. The table has all 2 combinations.

H₀: p₁ = p₂, H₁: p₁ ≠ p₂ (p₁ comparison, p₂ baseline); two-sided, α = 0.05; baseline p₂ = 0.06; normal approximation as Minitab (σ₀ from the pooled (p₁ + p₂)/2, σ₁ from p₁ and p₂).

  • Normal approximation, as Minitab’s Power and Sample Size: the exact binomial test has a saw-tooth power that can be a little lower or higher at a given n.
Power curve for 2 proportions. Power from 0 to 1 against comparison proportion p₁ from 0.015 to 0.105, one line per sample size: n = 749 (solid), n = 1002 (dashed). Table values: 0.03 with n = 749: power 0.8; 0.03 with n = 1002: power 0.9. Reference line at 0.06 (no difference, power = α = 0.05).00.20.40.60.810.020.040.060.080.1Power curve for 2 proportionsPowerComparison proportion p₁
n = 749n = 1002Table valueNo difference (power = α)
Sample size for each comparison p and power
Comparison pTarget powerSample size per sampleActual power
0.030.87490.800322
0.030.910020.900176

One-way ANOVA · input

Specify any two

Leave empty the one to calculate. Several values give a table: separate them with spaces or semicolons (0.8 0.9 0.95).

Design

Power for the least favourable means with that maximum difference (two means Δ apart, the others in the middle), as Minitab. n per level.

Runs in this browser. Data is not uploaded or stored.

One-way ANOVA · results

Maximum difference = 2.136 to 4.046

With n = 5 per level and power 0.9, the smallest effect detected is a maximum difference between the means of 4.04637. The table has all 3 combinations.

H₀: all means equal, H₁: not all equal; α = 0.05; 4 levels, σ = 1.5; exact power from the noncentral F distribution, λ = n Δ² / (2σ²).

  • σ is a planning value: take it from earlier data of the same process (a capability study or a control chart); a σ that is too small gives too few samples.
Power curve for one-way ANOVA. Power from 0 to 1 against maximum difference between means from 0 to 6.07, one line per sample size: n = 5 (solid), n = 10 (dashed), n = 15 (dotted). Table values: 4.046 with n = 5: power 0.9; 2.668 with n = 10: power 0.9; 2.136 with n = 15: power 0.9. Reference line at 0 (no difference, power = α = 0.05).00.20.40.60.810123456Power curve for one-way ANOVAPowerMaximum difference between means
n = 5n = 10n = 15Table valueNo difference (power = α)
Maximum difference for each sample size and power
Sample size per levelPowerMaximum difference
50.94.04637
100.92.66762
150.92.1356

Capability study · input

Interval
Specify any two

Leave empty the one to calculate; several values separated by spaces give a table. The planned index is the value you expect the study to show (from earlier data); the table always adds 30, 50, 100, 125 and 200 values.

Runs in this browser. Data is not uploaded or stored.

Capability study · results

n = 37

Measure 37 parts: if the study then gives Cpk = 1.67, its 95% lower bound is 1.334, so Cpk ≥ 1.33 is shown with 95% confidence.

Cpk (also Ppk), 95% lower confidence bound; Bissell’s approximation Ĉ ± z √(1/(9n) + Ĉ²/(2(n − 1))), as the Cpk tool; n individual values, σ with n − 1 degrees of freedom.

  • Assumes n individual values from a stable, normal process and σ estimated with n − 1 degrees of freedom (overall σ: Ppk, Pp; or Cpk, Cp from one column with the moving-range σ, as the Cpk tool counts it). With subgroups the within σ has fewer degrees of freedom, ν = Σ(nᵢ − 1) (25 subgroups of 5: N = 125, ν = 100), so the Cpk interval is a little wider than this table shows for the same N.
  • The interval is the one the analysis reports when the estimate comes out exactly at the planned Cpk. The estimate itself varies from study to study: about half of the studies of a process with exactly the planned Cpk give a lower estimate (and a lower bound below the requirement). Plan with a margin.
Confidence bound against sample size. 95% lower bound of an estimated Cpk = 1.67 against the number of values from 10 to 230, with the required lower bound 1.33 as a dashed line. n = 30: 1.296; n = 37: 1.334; n = 50: 1.382; n = 100: 1.467; n = 125: 1.489; n = 200: 1.527.11.21.41.650100150200Confidence bound against sample sizeCpkNumber of values n
95% lower boundEstimate Cpk = 1.67Required 1.33Common sample sizesSample size found
Sample size for each planned index
Planned CpkSample sizeRequired lower boundLower boundPlanned − lower
1.67371.331.333960.336041
95% lower bound of Cpk = 1.67 at common sample sizes
Sample sizeLower boundPlanned − lowerRow
301.295680.37432
371.333960.336041found
501.381890.28811
1001.467230.202768
1251.488810.181191
2001.526960.143044

Download offline versionSingle HTML file · v1.3 · 308 KB · works without internet

Method