SoftwarePlus.ai

Statistle Help

Confidence intervals and sample size

Confidence interval (Module 7)

Use it when the question is "how big is it?" — the mean of a process, a defect proportion, a variance, or the difference between two groups — and you want the estimate with its uncertainty.

  1. Interval for — what you are estimating: A mean, σ known (z); A mean, σ unknown (t); A proportion (z); A variance and standard deviation (χ²); Difference of two means, equal variances (pooled t); Difference of two means, unequal variances (Welch t); Mean of paired differences (t); Difference of two proportions (z).
  2. Data from — Summary statistics entered here (type x̄, s and n; or successes x and n for a proportion), or Columns of a data table (pick the column or columns; the summaries are computed and shown locked).
  3. Confidence level — 0.95 unless the problem says otherwise. Type it as a decimal: "95%" is refused, with a red note under the box (see Messages).
  4. Read the Point estimate, Standard error, Critical value, Margin of error, and the Lower limit and Upper limit (for a variance, also the limits for σ; for a proportion, the Wilson score limits beside the usual ones).

Reading it: the interval is estimate ± critical value × standard error. Higher confidence or a smaller sample makes it wider. A difference-of-means interval that leaves out zero says the means differ at that confidence — the same conclusion as the two-sided test. For a proportion, prefer the Wilson interval when the successes or failures are few.

Watch out: "95 % confidence" describes the method: 95 % of such intervals cover the true value. Use t, not z, whenever σ is estimated from the sample. A paired interval needs the two columns in the same order and of the same length. When the two standard deviations differ by more than about two to one, use Welch rather than pooled.

Example: 22 measurements with mean 13.71 and standard deviation 3.55 give the 95 % t interval 12.14 to 15.28 (Montgomery and Runger, Example 8-5). Plots draws the estimate as a point with the interval as a bar.

Sample size (Module 7)

Planning: how many observations you need to estimate a mean or a proportion to within a margin of error.

  1. Sample size for: A mean — σ known or estimated; or A proportion.
  2. Enter the Confidence level and the Margin of error (E) you can accept.
  3. For a mean, the Population standard deviation (σ) — from a pilot sample, a similar process, or a guess of range ÷ 4. For a proportion, the Expected proportion (p), or 0.5 if unknown (the largest, safest n).
  4. Read Sample size needed (n), rounded up.

Reading it: n = (zσ/E)² for a mean and n = z²p(1 − p)/E² for a proportion. Halving E multiplies n by four. The result is a minimum — plan for losses.

Example: a mean to within 2 units at 95 % with σ ≈ 8: n = (1.96 × 8 / 2)² = 61.5, so 62.

Where the formulas come from

EGN3443 Module 7; Montgomery and Runger, Applied Statistics and Probability for Engineers, 7th ed., Chapter 8. The Instructions tab and the Report tab name the source of every method in use, and the help panel shows it when you click a field. The Code tab writes the same calculation in Python and R, formula first.

← Probability and distributions Hypothesis tests →