Math bank

Water pH

Module B+F · freq 7

xˉ ± tn−1,  1+γ2⏟L⋅sn\bar{x}\ \pm\ \underbrace{t_{n-1,\;\frac{1+\gamma}{2}}}_{\large L}\cdot\frac{s}{\sqrt{n}}

Signals: You are given a string of raw data (10 to 25 numbers) · a) asks for the average / mean · b) asks for the sample standard deviation · c) asks for a confidence interval for the true mean at some confidence level · d) The width is written as 2×L×sn2\times L\times\frac{s}{\sqrt{n}}, asking what LL is and what it is called
Generating question…
Method
  1. a) np.mean(x)
  2. b) np.std(x, ddof=1) — ddof=1 gives the sample version dividing by n−1n-1
  3. c) Variance unknown → t distribution: tc = stats.t.ppf((1+conf)/2, n-1), CI = m ± tc*s/√n
  4. d) LL is just that t quantile; its name = "the (1+γ)/2(1+\gamma)/2 quantile of tn−1t_{n-1} distribution"
Pitfalls where marks are lost
  • Forgetting ddof=1 → dividing by n instead of n−1, all wrong (MATLAB's std/var default to n−1, so they are actually safe)
  • Using norm.ppf instead of t.ppf — with σ unknown you must use t
  • Writing the degrees of freedom as n — it is n−1
  • Writing the quantile as γ — it is (1+γ)/2 (98% → 0.99, not 0.98)
  • b) asks for the standard deviation — this and the variance question are exact opposites, don't answer the wrong one