数学题库

停电时长

Power outage durations · 模块 B+F · 频次 15

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

识别信号: 给一串原始数据(10~25 个数) · a) 问 average / mean · b) 问 sample standard deviation · c) 问某置信度的 confidence interval for the true mean · d) 宽度写成 2×C×sn2\times C\times\frac{s}{\sqrt{n}},问 CC 是多少、叫什么
生成题目中…
方法步骤
  1. a) np.mean(x)
  2. b) np.std(x, ddof=1) —— ddof=1 是样本量的除 n−1n-1
  3. c) 方差未知 → t 分布:tc = stats.t.ppf((1+conf)/2, n-1),CI = m ± tc*s/√n
  4. d) CC 就是那个 t 分位数;名字 = "the (1+γ)/2(1+\gamma)/2 quantile of tn−1t_{n-1} distribution"
易错点 丢分都丢在这
  • ddof=1 忘了 → 除以 n 而不是 n−1,全错(MATLAB 的 std/var 默认就是 n−1,反而安全)
  • 用了 norm.ppf 而不是 t.ppf —— σ 未知就必须 t
  • 自由度写成 n —— 是 n−1
  • 分位数写成 γ —— 是 (1+γ)/2(98% → 0.99,不是 0.98)
  • b) 问的是 standard deviation(标准差) —— 这两题型正好相反,别答错