期望、方差与样本统计Expectation, Variance & Sample Statistics
怎样用中心和离散程度描述一个分布,并用有限数据估计它们?How can center and spread describe a distribution and be estimated from finite data?
前置知识:Prerequisites: B15:随机变量与离散分布。B15: random variables and discrete distributions.
复习前置:Review prerequisites: B15 · 随机变量与离散分布Random Variables & Discrete Distributions
学完后你能:After this lesson you can: 计算期望与方差,比较分布,并从样本计算描述性统计。Compute expectation and variance, compare distributions, and calculate descriptive sample statistics.
动手观察Explore
改变两端的总概率,观察分布的重心与方差;抽取样本,对照样本统计与总体量。Change total probability at the two ends and observe the center and variance; draw samples and compare sample statistics with population quantities.
从观察到解释From observation to explanation
期望像重心Expectation as a balance point
取值 0、1、2 的概率分别为 1/4、1/2、1/4 时,期望为 0×1/4+1×1/2+2×1/4=1。期望不一定是单次能观察到的值。For values 0, 1, 2 with probabilities 1/4, 1/2, 1/4, the expectation is 0×1/4+1×1/2+2×1/4=1. An expectation need not itself be a possible observation.
偏差平方衡量分散Squared deviations measure spread
本例各值与均值 1 的偏差平方为 1、0、1,加权后方差为 1/2,标准差为 √(1/2)。如果全部概率移到 1,均值仍为 1,方差却变成 0。Here squared deviations from mean 1 are 1, 0, 1; their weighted average is variance 1/2, and the standard deviation is √(1/2). Moving all probability to 1 leaves the mean at 1 but makes variance 0.
样本只是估计A sample is an estimate
样本 0、1、2 的均值为 1,描述性方差为 (1+0+1)/3=2/3。换一批样本,统计量可能改变;总体分布的均值和方差在规则不变时保持固定。The sample 0, 1, 2 has mean 1 and descriptive variance (1+0+1)/3=2/3. Another sample may give different statistics; the population mean and variance stay fixed while the distribution is fixed.
公式与符号Formula and symbols
xₖ 是随机变量的可能取值,pₖ 是相应概率;μ 是期望,σ² 是方差,标准差 σ 是方差的平方根。样本均值为观察值之和除以 n;这里的样本描述性方差也除以 n。xₖ are possible values and pₖ their probabilities; μ is expectation, σ² variance, and standard deviation σ its square root. Sample mean is the sum of observations divided by n; descriptive sample variance also divides by n here.
留意这个区别Watch for this
方差的单位是原单位的平方,标准差才与原数据同单位。这里用 n 描述当前样本;使用 n−1 的无偏估计需要额外条件。Variance has squared units, while standard deviation uses the original units. We divide by n to describe the current sample; the n−1 unbiased estimator requires additional conditions.
继续探索Explore further
课后练习
检验你的理解