Tests of Significance, Power and Sample Size, Regression and Correlation, and Matrix Inversion

Section 1 of the GATE Biomedical Engineering (BM) paper names four things that none of the shared Engineering Mathematics chapters teach, and this chapter is written for this paper alone to cover them. Its Probability and Statistics heading goes past distributions into tests of significance, statistical power analysis and sample size estimation, and then linear regression and correlation analysis — the statistics a clinical study or an instrument validation actually runs on. Its Numerical Methods heading opens with matrix inversion, which the Linear Algebra chapter uses but never computes. So the chapter runs in that order: the logic of a hypothesis test and its two kinds of error; the z, t, chi-square and F tests and when each applies; power and the sample-size formula that follows from it; correlation and least-squares regression; and inverting a matrix by the adjugate and by Gauss–Jordan elimination. The distributions themselves (normal, binomial, Poisson) are in the Probability and Statistics chapter, which you should read first.

1. The logic of a hypothesis test

A test of significance asks whether an observed effect is larger than chance alone would plausibly produce. The null hypothesis H₀ is the no-effect statement (the new electrode has the same mean offset as the old one; the drug does not change blood pressure); the alternative H₁ is what the study hopes to show. A test statistic measures how far the data sit from H₀ in units of their own standard error, and the p-value is the probability, computed assuming H₀ is true, of a statistic at least as extreme as the one observed. H₀ is rejected when p is below the significance level α chosen in advance, usually 0.05.

Two kinds of error, and the probabilities that name them
DecisionH₀ actually trueH₀ actually false
Reject H₀Type I error — probability α (a false alarm)Correct — probability 1 − β, the power
Do not reject H₀Correct — probability 1 − αType II error — probability β (a missed effect)

A test is two-tailed when H₁ allows a difference in either direction (μ ≠ μ₀) and one-tailed when it names a direction (μ > μ₀). For a standard normal statistic the critical values worth knowing cold are 1.96 (two-tailed, α = 0.05), 1.645 (one-tailed, α = 0.05), 2.576 (two-tailed, α = 0.01) and 2.326 (one-tailed, α = 0.01). A 95% confidence interval x̄ ± 1.96σ/√n and a two-tailed test at α = 0.05 are the same decision: H₀ is rejected exactly when μ₀ falls outside the interval.

⚠️ A large p-value does not prove H₀
Failing to reject H₀ means the data are compatible with no effect, not that the effect is zero — a small study can miss a real difference simply because β was large. Equally, p is not the probability that H₀ is true; it is a probability about the data, computed on the assumption that H₀ holds.

2. The z, t, chi-square and F tests

Which test applies is decided by what is known and what is being compared. With the population standard deviation σ known (or n large, say above 30), the z-test for a mean uses z = (x̄ − μ₀)/(σ/√n). With σ estimated from the sample by s, the statistic t = (x̄ − μ₀)/(s/√n) follows Student’s t distribution with n − 1 degrees of freedom, which has heavier tails than the normal and approaches it as n grows: the two-tailed 5% critical value is 2.776 at 4 degrees of freedom, 2.262 at 9 and 2.228 at 10, falling towards 1.96.

Choosing the test
QuestionStatisticDegrees of freedom
One mean, σ knownz = (x̄ − μ₀)/(σ/√n)— (normal)
One mean, σ unknownt = (x̄ − μ₀)/(s/√n)n − 1
Same subjects before and after (paired)t = d̄/(s_d/√n) on the differencesn − 1 (n pairs)
Two independent groups, equal variancest = (x̄₁ − x̄₂)/[s_p√(1/n₁ + 1/n₂)]n₁ + n₂ − 2
Observed counts against expected (fit, or independence in an r × c table)χ² = Σ(O − E)²/Ek − 1 for fit; (r − 1)(c − 1) for a table
Two variancesF = s₁²/s₂² (larger on top)n₁ − 1, n₂ − 1

The pooled variance is s_p² = [(n₁ − 1)s₁² + (n₂ − 1)s₂²]/(n₁ + n₂ − 2). For a contingency table the expected count of a cell is (row total × column total)/grand total, and the 5% critical value of χ² with one degree of freedom is 3.841. The F ratio of variances is also what analysis of variance (ANOVA) uses to compare more than two means at once, by setting the variance between group means against the variance within groups.

🎯 Why pairing is so powerful
Measuring the same patients before and after removes the large differences between one patient and another, which would otherwise sit in the denominator. The paired test works on the differences alone, so s_d is usually far smaller than either group’s own standard deviation — and the same effect gives a much larger t.

3. Statistical power and sample size estimation

The power of a test, 1 − β, is the probability of rejecting H₀ when a specified true effect δ exists. It grows with the sample size n, with the effect size δ, and with α (a laxer threshold rejects more readily), and it falls as the scatter σ grows. The standardised effect size is Cohen’s d = δ/σ. Studies are conventionally designed for 80% power (z_β = 0.842) or 90% power (z_β = 1.282).

Sample size follows by demanding that the critical value and the power point coincide. For one mean (or paired differences) with a two-tailed test, n = [(zα/2 + z_β)σ/δ]²; for two independent groups of equal size, each group needs n = 2[(zα/2 + z_β)σ/δ]². To estimate a proportion p to within a margin E, n = z²p(1 − p)/E², largest at p = 0.5. The answer is always rounded up to the next whole subject.

  • Halving the detectable difference δ quadruples n, because n goes as 1/δ².
  • Raising power from 80% to 90% raises (zα/2 + z_β) from 2.80 to 3.24, so n grows by about a third.
  • Tightening α from 0.05 to 0.01 also raises n; loosening α lowers it, at the cost of more false alarms.
🧠 Round up, and read which n is asked
n = 31.4 means 32 subjects, never 31 — 31 falls short of the stated power. And a two-group question may ask for the size of each group or for the total; the formula gives each group.

4. Linear regression and correlation analysis

With S_xx = Σ(x − x̄)², S_yy = Σ(y − ȳ)² and S_xy = Σ(x − x̄)(y − ȳ), the Pearson correlation coefficient is r = S_xy/√(S_xx S_yy), bounded by −1 ≤ r ≤ 1 and unchanged by shifting either variable or rescaling it by a positive factor. The least-squares line of y on x, which minimises the sum of squared vertical residuals, has slope b_yx = S_xy/S_xx and passes through the mean point, so its intercept is a = ȳ − b_yx x̄. The line of x on y has slope b_xy = S_xy/S_yy; the two lines are different unless |r| = 1, they cross at (x̄, ȳ), and b_yx · b_xy = r², with both coefficients carrying the sign of r.

r² is the coefficient of determination, the fraction of the variance of y that the line explains. Whether a sample r is significantly different from zero is tested with t = r√(n − 2)/√(1 − r²) on n − 2 degrees of freedom. For ranked data Spearman’s coefficient is ρ = 1 − 6Σd²/[n(n² − 1)], d being the difference in ranks. A calibration of a sensor against a reference is exactly this computation: the slope is the sensitivity, the intercept the offset, and the residual scatter the non-repeatability.

⚠️ r = 0 does not mean independence
r measures only linear association. y = x² over a range symmetric about zero has r = 0 and is completely determined by x. Nor does a large r establish causation: two quantities that both rise with age correlate without one driving the other.

5. Matrix inversion — the adjugate and Gauss–Jordan elimination

A square matrix A has an inverse exactly when det A ≠ 0, and then A⁻¹ = adj(A)/det A, where adj(A) is the transpose of the cofactor matrix. For a 2 × 2 matrix [[a, b], [c, d]] this collapses to (1/(ad − bc))·[[d, −b], [−c, a]]: swap the diagonal, negate the off-diagonal, divide by the determinant. The rules (AB)⁻¹ = B⁻¹A⁻¹, (Aᵀ)⁻¹ = (A⁻¹)ᵀ and det(A⁻¹) = 1/det A follow directly.

Cofactors cost of the order of n! operations and are hopeless beyond 3 × 3, so numerical work uses Gauss–Jordan elimination: write the augmented matrix [A | I], apply elementary row operations until the left block becomes I, and the right block is then A⁻¹. It costs of the order of n³ operations. Partial pivoting — swapping rows so that the largest available entry in the column becomes the pivot — keeps rounding error from being amplified by division by a small number. If a zero row appears on the left, A is singular and has no inverse.

A worked 2 × 2 inversion, both ways
StepAdjugate routeGauss–Jordan route
StartA = [[2, 1], [5, 3]], det A = 6 − 5 = 1[2 1 | 1 0; 5 3 | 0 1]
Middleadj A = [[3, −1], [−5, 2]]R2 → R2 − 2.5R1: [2 1 | 1 0; 0 0.5 | −2.5 1]
FinishA⁻¹ = [[3, −1], [−5, 2]]R2 × 2, then R1 → (R1 − R2)/2: [1 0 | 3 −1; 0 1 | −5 2]
🧠 Check an inverse by multiplying
A·A⁻¹ = I is a ten-second check that catches a sign slip in the cofactors, which is the usual error. For the example, [[2, 1], [5, 3]]·[[3, −1], [−5, 2]] = [[6 − 5, −2 + 2], [15 − 15, −5 + 6]] = I.

Key takeaways

  • α is the false-alarm probability you choose; β the probability of missing a real effect; power is 1 − β.
  • z when σ is known, t on n − 1 degrees of freedom when it is estimated, paired t on the differences, χ² = Σ(O − E)²/E for counts, F for a ratio of variances.
  • n = [(zα/2 + z_β)σ/δ]² for one mean, twice that per group for two; always round up.
  • b_yx = S_xy/S_xx, the line passes through (x̄, ȳ), and b_yx · b_xy = r².
  • A⁻¹ = adj A/det A for small matrices; [A | I] → [I | A⁻¹] by Gauss–Jordan for anything larger.

Practice questions (13)

Attempt each one before opening the answer. Every explanation names the tempting wrong option as well as the right one, because that is where marks are lost.

  1. In a hypothesis test, a Type I error is

    1. rejecting H₀ when H₀ is true
    2. failing to reject H₀ when H₀ is false
    3. accepting H₁ when H₁ is true
    4. choosing a one-tailed test instead of a two-tailed one
    Show answer

    Answer: A — rejecting H₀ when H₀ is true

    A Type I error is a false alarm — rejecting a null hypothesis that is actually true — and its probability is the significance level α. Failing to reject a false H₀ is the Type II error, probability β; accepting a true H₁ is a correct decision.
  2. Keeping α and the true effect fixed, which change increases the power of a test?

    1. Increasing the sample size
    2. Increasing the population standard deviation
    3. Switching from a paired design to two independent groups of the same subjects
    4. Reducing the sample size to cut measurement cost
    Show answer

    Answer: A — Increasing the sample size

    A larger n shrinks the standard error σ/√n, so the same true difference sits more standard errors from H₀ and is detected more often. Larger σ does the opposite, and abandoning pairing puts the between-subject scatter back into the denominator, which lowers power.
  3. A pressure sensor’s readings have a known standard deviation σ = 12 mmHg. For n = 36 readings of a reference at nominally 100 mmHg the sample mean is 104 mmHg. The z statistic for H₀: μ = 100 mmHg is ____.

    Numerical answer — type the value.

    Show answer

    Answer: 2

    z = (x̄ − μ₀)/(σ/√n) = (104 − 100)/(12/6) = 4/2 = 2. Forgetting the √n and dividing by σ alone gives 0.33, which would wrongly suggest no evidence against H₀; with |z| = 2 > 1.96 the two-tailed test rejects at 5%.
  4. A paired study of a new cuffless blood-pressure monitor expects the standard deviation of the paired differences to be 10 mmHg and must detect a mean difference of 5 mmHg with a two-tailed α = 0.05 and 80% power (take zα/2 = 1.96 and z_β = 0.84). The minimum number of subjects is ____.

    Numerical answer — type the value.

    Show answer

    Answer: 32

    n = [(zα/2 + z_β)σ/δ]² = [(1.96 + 0.84) × 10/5]² = (5.6)² = 31.36, rounded up to 32. Rounding to the nearest integer gives 31, which falls short of 80% power; using the two-group formula (twice this) gives 63 per group, which is not a paired design.
  5. The two regression coefficients of a data set are b_yx = 0.8 and b_xy = 0.45. The correlation coefficient r is ____.

    Numerical answer — type the value.

    Show answer

    Answer: 0.6

    b_yx · b_xy = r², so r² = 0.8 × 0.45 = 0.36 and r = +0.6, positive because both coefficients are positive. Taking the arithmetic mean of the two coefficients (0.625) is the tempting slip; r is their geometric mean.
  6. Five calibration points (x, y) are (1, 2), (2, 4), (3, 5), (4, 4) and (5, 5). Using the least-squares line of y on x, the predicted y at x = 6 is ____.

    Numerical answer — type the value.

    Show answer

    Answer: 5.8

    x̄ = 3, ȳ = 4. S_xy = (−2)(−2) + (−1)(0) + 0(1) + 1(0) + 2(1) = 6 and S_xx = 4 + 1 + 0 + 1 + 4 = 10, so b = 0.6 and a = 4 − 0.6 × 3 = 2.2. At x = 6, y = 2.2 + 3.6 = 5.8. Extending the last observed step instead gives 6, which is not a least-squares prediction.
  7. Which statements about the Pearson correlation coefficient r are correct?

    1. −1 ≤ r ≤ 1
    2. r = 0 implies that x and y are statistically independent
    3. r is unchanged if x is replaced by 3x + 7
    4. both regression coefficients have the same sign as r
    Show answer

    Answer: A — −1 ≤ r ≤ 1; C — r is unchanged if x is replaced by 3x + 7; D — both regression coefficients have the same sign as r

    r is bounded by ±1, is invariant to a change of origin and a positive change of scale, and shares its sign with S_xy and therefore with both regression slopes. r = 0 rules out only a linear relationship — y = x² on a symmetric range has r = 0 yet y is fixed by x.
  8. A chi-square test of independence is applied to a contingency table with 3 rows and 4 columns. The number of degrees of freedom is

    1. 6
    2. 12
    3. 11
    4. 7
    Show answer

    Answer: A — 6

    For an r × c table the degrees of freedom are (r − 1)(c − 1) = 2 × 3 = 6. Twelve is the number of cells and 11 is cells minus one, the goodness-of-fit count, which does not account for the row and column totals both being fixed.
  9. A paired t-test is the appropriate test when

    1. the same subjects are measured before and after an intervention
    2. two unrelated groups of patients are compared
    3. observed counts are compared with expected counts
    4. two variances are compared
    Show answer

    Answer: A — the same subjects are measured before and after an intervention

    Pairing is for repeated measurements on the same subjects, so each subject acts as its own control and the test runs on the differences. Unrelated groups need the two-sample t-test, counts need chi-square and a ratio of variances needs the F-test.
  10. For A = [[4, 7], [2, 6]], the element in row 1, column 2 of A⁻¹ is ____.

    Numerical answer — type the value.

    Show answer

    Answer: -0.7

    det A = 24 − 14 = 10 and A⁻¹ = (1/10)[[6, −7], [−2, 4]], so the (1, 2) element is −7/10 = −0.7. Forgetting to negate the off-diagonal gives +0.7, and forgetting to divide by the determinant gives −7; multiplying back, A·A⁻¹ = I, confirms −0.7. Type the answer as -0.7.
  11. In Gauss–Jordan inversion the augmented matrix [A | I] is row-reduced until the left block is the identity. The right block is then

    1. A⁻¹
    2. adj A
    3. Aᵀ
    4. det A · I
    Show answer

    Answer: A — A⁻¹

    Every row operation is a left-multiplication by an elementary matrix, and the product E of all of them satisfies EA = I, so E = A⁻¹ — and the same operations applied to I leave E·I = A⁻¹ on the right. The adjugate would appear only if the determinant were never divided out.
  12. For a study comparing two means, which changes increase the required sample size, all else unchanged?

    1. a smaller difference to be detected
    2. a higher required power
    3. raising α from 0.05 to 0.10
    4. a larger standard deviation of the measurement
    Show answer

    Answer: A — a smaller difference to be detected; B — a higher required power; D — a larger standard deviation of the measurement

    n ∝ [(zα/2 + z_β)σ/δ]²: a smaller δ, a larger σ and a larger z_β (higher power) all raise it. Raising α lowers zα/2 from 1.96 to 1.645 and so reduces n — a laxer threshold needs fewer subjects, paid for in false alarms.
  13. Ten patients’ heart rates are recorded before and after a drug. The mean of the ten differences is 3 beats/min and their sample standard deviation is 4 beats/min. The paired t statistic, to two decimal places, is ____.

    Numerical answer — type the value.

    Show answer

    Answer: 2.37

    t = d̄/(s_d/√n) = 3/(4/√10) = 3/1.265 = 2.37 on 9 degrees of freedom. It exceeds the two-tailed 5% value 2.262, so the change is significant. Dividing by s_d without √n gives 0.75; using √9 instead of √10 gives 2.25 and the wrong conclusion.