Skip to the content

Topics Covered

Z-Test t-Test (Paired) t-Test (Two-Sample) F-Test ANOVA Chi-Square Interpretation
On this page
  1. 1. Recap of Hypothesis-Testing Framework
  2. 2. Z-Test in Excel
  3. 3. t-Test in Excel
  4. 4. F-Test for Equality of Variances
  5. 5. ANOVA in Excel
  6. 6. Chi-Square Test
  7. 7. Choosing the Right Excel Test
  8. 8. Interpreting Excel Outputs — Best Practices
  9. Real-world Case Studies
  10. Key Take-aways

1. Recap of Hypothesis-Testing Framework

  1. State \(H_0\) (null) and \(H_1\) (alternative).
  2. Choose level of significance α (e.g., 0.05).
  3. Compute the test statistic and its p-value.
  4. Decision rule: reject \(H_0\) if p-value < α; else fail to reject.
  5. Interpret in the problem context.

2. Z-Test in Excel

2.1 Function: Z.TEST

=Z.TEST(array, x, [sigma])

Returns the one-tailed p-value for testing \(H_0: \mu = x\) when σ is known.

If σ is omitted, sample SD is used.

2.2 Two-Sample Z-Test (Data Analysis ToolPak)

  1. Data → Data Analysis → z-Test: Two Sample for Means → OK.
  2. Variable 1 Range, Variable 2 Range (separate columns).
  3. Hypothesised Mean Difference: usually 0.
  4. Variance for Variable 1 / 2: enter known σ².
  5. Output range; α = 0.05 default.

Output Contains

EXAMPLE 1

Sample of 100 students has mean IQ 105, σ = 15. Test \(H_0: \mu = 100\).

In Excel: =Z.TEST(scores_range, 100, 15) → say 0.0004 (one-tailed). Two-tailed p = 0.0008 ⇒ reject \(H_0\).

EXAMPLE 2 (Two-sample Z)

City A scores in A2:A201 (n₁ = 200, σ₁² = 16). City B in B2:B251 (n₂ = 250, σ₂² = 25). Run ToolPak's z-Test Two-Sample → output gives z = 4.71, two-tail p ≈ 0 ⇒ reject; means differ.

3. t-Test in Excel

3.1 Function: T.TEST

=T.TEST(array1, array2, tails, type)

Returns the p-value directly — no test-statistic.

3.2 t-Test via Data Analysis ToolPak (richer output)

Data → Data Analysis → choose one of:

Output Contains

How to Choose the Right t-Test

SituationTest (type)
Same subjects measured twicePaired (type 1)
Two independent samples, σ's roughly equalEqual variances (type 2)
Two independent samples, σ's clearly differWelch's (type 3)
EXAMPLE 1 (Single-mean t, indirect)

Sample of 10: mean 70.7, SD 2.79. Test \(H_0: \mu = 68\) using =T.TEST isn't possible for a single sample directly; instead compute:

=(70.7-68)/(2.79/SQRT(10)) → t = 3.06; p = =T.DIST.2T(3.06, 9) ≈ 0.013 ⇒ reject \(H_0\).

EXAMPLE 2 (Paired t-test)

Before-after readings of 8 patients in A2:A9 and B2:B9.

=T.TEST(A2:A9, B2:B9, 2, 1) → returns the two-tailed paired p-value. Use ToolPak's "t-Test: Paired Two Sample for Means" to also get the t statistic and critical values.

4. F-Test for Equality of Variances

4.1 Function: F.TEST

=F.TEST(array1, array2)

Returns the two-tailed p-value for \(H_0: \sigma_1^2 = \sigma_2^2\).

4.2 F-Test via Data Analysis ToolPak

  1. Data → Data Analysis → F-Test Two-Sample for Variances → OK.
  2. Variable 1 Range, Variable 2 Range; α = 0.05 default.
  3. Output gives F statistic, P(F ≤ f) one-tail, F Critical one-tail.

Tip: ToolPak places the larger variance in numerator if you arrange Variable 1 accordingly. The reported p-value is one-tailed; multiply by 2 for two-tailed.

EXAMPLE 1

Two production lines' diameters in A and B; =F.TEST(A2:A21, B2:B21) → 0.02 (two-tail). p < 0.05 ⇒ reject equal-variances assumption; use Welch's t-test next.

EXAMPLE 2

Two classes' scores in A2:A12 (n=11, s² = 25), B2:B17 (n=16, s² = 16). F = 25/16 = 1.5625. ToolPak gives F-Critical 2.54 ⇒ accept H₀ (variances equal).

5. ANOVA in Excel

5.1 ANOVA: Single Factor (One-way)

  1. Arrange data so each group is one column (or one row).
  2. Data → Data Analysis → ANOVA: Single Factor → OK.
  3. Input Range (covers all groups together); Grouped By: Columns; tick Labels.
  4. α = 0.05; output range.

Output Contains

5.2 ANOVA: Two-Factor Without Replication

Used when there is one observation per cell of a row × column design (e.g., RBD).

5.3 ANOVA: Two-Factor With Replication

Used when there are multiple observations per cell — analyses row, column, interaction and error.

Specify "Rows per sample" in the dialog — Excel needs equal rows per cell.

EXAMPLE 1 (One-way ANOVA)

Three fertilizers with 4 replicates each (4 rows × 3 columns).

ToolPak output:

SourceSSdfMSFpF-crit
Between258.672129.3324.250.00034.26
Within48.0095.33
Total306.6711

F = 24.25 > 4.26 ⇒ reject H₀; fertilizers differ.

EXAMPLE 2 (Two-way ANOVA)

Yields of 3 fertilizers × 4 varieties (12 cells, one obs each). Two-Factor Without Replication splits SS into Rows (Fertilizers), Columns (Varieties) and Error, giving two F-tests.

6. Chi-Square Test

6.1 Function: CHISQ.TEST

=CHISQ.TEST(actual_range, expected_range)

Returns the p-value for \(\chi^2 = \sum (O - E)^2 / E\). Works for any \(r \times c\) table.

6.2 Steps for Independence Test

  1. Lay out observed frequencies in a 2-D table.
  2. Compute row totals, column totals, grand total.
  3. Expected = (row total × column total) / grand total — fill a separate table.
  4. Use =CHISQ.TEST(observed_range, expected_range) → p-value.
  5. Also compute the \(\chi^2\) statistic for reporting: =SUMPRODUCT((O - E)^2 / E).

6.3 Goodness-of-Fit

Use observed counts and expected counts from your hypothesised distribution (Binomial, Poisson, Uniform, etc.). Same =CHISQ.TEST formula applies.

EXAMPLE 1 (Independence)

2 × 2 table: Smoker vs Cancer with observed 60, 40, 20, 80.

Row totals 100, 100; Col totals 80, 120; Grand total 200. Expected: 40, 60, 40, 60.

=CHISQ.TEST(O_range, E_range) → p ≈ 7.8E-9 ⇒ reject independence.

EXAMPLE 2 (Goodness of Fit)

Die rolled 60 times, observed faces 8, 11, 9, 12, 10, 10 (expected 10 each). =CHISQ.TEST(O, E) → p = 0.96 ⇒ accept H₀; die is fair.

7. Choosing the Right Excel Test

QuestionExcel Tool
Single mean, σ known, large n=Z.TEST
Single mean, σ unknown, small nManual t (formula) or T.DIST.2T
Paired samples (before-after)=T.TEST(...,2,1) or ToolPak Paired t
Two independent means, σ's equal=T.TEST(...,2,2) or ToolPak Equal Var
Two independent means, σ's differ=T.TEST(...,2,3) or ToolPak Welch
Equality of variances=F.TEST or ToolPak F-Test
3+ group meansToolPak ANOVA Single Factor
Two factorsToolPak ANOVA Two-Factor
Independence / Goodness of Fit=CHISQ.TEST

8. Interpreting Excel Outputs — Best Practices

  1. Look at the p-value first. If p < α (often 0.05), reject H₀.
  2. Compare the test statistic with the critical value as a cross-check.
  3. Report direction (one-tailed) when the alternative is one-sided.
  4. Always frame the conclusion in the original problem language: e.g., "There is significant evidence that the new training increases performance (paired t = 4.8, df = 19, p < 0.001)".
  5. Mention effect size (mean difference, η², r²) — statistical significance ≠ practical significance.
  6. Check assumptions: normality (use Q-Q plots / SKEW/KURT), equal variances (F-test before pooled t), independence (study design).

Real-world Case Studies

Business — A/B test on two web designs

Click-through rate of design A in column A, design B in column B (large samples). Use ToolPak's two-sample z-test on proportions (or chi-square on 2 × 2 table of clicks vs no-clicks). p-value decides which design is preferred.

Health Sciences — Drug effectiveness

Baseline and post-treatment blood pressure of 30 patients. Paired t-test in Excel decides whether the drug significantly reduces BP.

Social Sciences — Education method comparison

Three teaching methods, 20 students each. One-way ANOVA → if significant, follow up with pairwise t-tests with Bonferroni correction.

Key Take-aways