which is the Discrete Convolution Formula (离散卷积公式).
Central Limit Theorem (CLT, 中心极限定理):
For a sequence of i.i.d. (independent and identically distributed, 独立同分布) r.v. X1,X2,…,Xn with μ≜E(Xi) and σ2≜Var(Xi), let Sn=∑Xi and Xˉn=Sn/n, then
Zn=Var(Sn)Sn−E(Sn)=nσ2Sn−nμ=σn(Xˉn−μ)
As n→∞, Znconverges in distribution (依分布收敛) to a standatd normal r.v., that is ∀z,
FZn(z)=P(Zn≤z)n→∞Φ(z)
If X1,X2,⋯Xn are normal r.v.s, FZn(z)=P(Zn≤z)=Φ(z) even for small n.
The rule of thumb (经验法则): n≥30 should be to apply the CLT.
Approximation of Binomial(n,p):
Poisson Approximation Poisson(np): Works well when n is large and p is small, e.g., n>100 and p<0.05.
Normal Approximation N(np,np(1−p)): Works well when np≥5 and n(1−p)≥5.
Continuity Correction (连续性修正): Expand the interval by 0.5 in each direction.
CDF of max(X,Y) & min(X,Y) - Continuous Case:
Let f(x,y) be the PDF of random vector (X,Y), then the CDFs of max(X,Y) and min(X,Y) are
Fmax(z)=∫−∞z∫−∞zf(x,y)dxdy
Fmin(z)=1−∫z∞∫z∞f(x,y)dxdy
Specifically, if X and Y are independent, then
Fmax(z)=FX(z)FY(z)
Fmin(z)=1−[1−FX(z)][1−FY(z)]
Generally, if X1,X2,...,Xn∼i.i.d.F(x) with PDF f(x), then the CDFs and PDFs of max(X1,X2,...,Xn) and min(X1,X2,...,Xn) are
Fmax(z)=[F(z)]n,fmax(z)=nf(z)[F(z)]n−1
Fmin(z)=1−[1−F(z)]n,fmin(z)=nf(z)[1−F(z)]n−1
Multivariate Normal Distribution
Bivariate Normal Distribution (二元正态分布):
Random vector (𝑋, 𝑌) is said to be bivariate normally distributed with means μX,μY and variances σX2,σY2, and with correlation coefficient ρ, then it can be expressed as
where μ is the Mean Vector (均值向量) and Σ is the Convariance Matrix (协方差矩阵).
Generally, for an n-dim random vector X=(X1,X2,…,Xn)⊤:
The mean vector is E(X)≜(E(X1),E(X2),…,E(Xn))⊤.
The covariance matrix Cov(X)≜E[(X−E(X))(X−E(X))⊤].
Properties:
Marginals: If (X,Y) is jointly normal, then the marginal distributions of X and Y are univariate normal. 二元正态 -> 分别正态
Independence & Non-Correlation: For bivariate normal distribution, “Independent” is equal to “Uncorrelated (ρ=0)”. 服从二元正态分布,则独立和不相关等价
Conditional Distributions: Y∣X=x and X∣Y=y is also normal.
Conditional Mean: E(Y∣X=x)=μY+ρσXσY(x−μX).
Conditional Variance: Var(Y∣X=x)=(1−ρ2)σY2.
Linear Combinations: For any real matrix A=(a11a21a12a22), then
AX=(a11X+a12Ya21X+a22Y)∼N(Aμ,AΣAT)
Application: Gaussian Mixture Model (GMM, ⾼斯混合模型).
Chapter 4. Monte Carlo Methods
Law of Large Numbers (LLN)
For a sequence of i.i.d. r.v.s X1,X2,…,Xn with μ≜E(Xi)<∞, Xˉn=(X1+X2+⋯+Xn)/nconverges in probability (依概率收敛) to μ as n→∞:
XˉnPμ, as n→∞
Simulation of Random Variables
Pseudo-Random Number Generator (PRNG):
Computers generate pseudo-random numbers, not truly random.
They are determined by an initial value called the seed.
Pros: Fast and Reproducible (same seed = same sequence).
The Building Block (U[0,1]):
PRNGs typically provide a sequence of independent uniformly distributed numbers on [0,1].
Goal: Transform U∼U[0,1] into other distributions (Bernoulli, Poisson, Normal, etc.).
Discrete Distributions:
Bernoulli (p): Generate u. If u<p, output 1; else output 0.
Poisson (λ): Divide interval (0,1) into sub-intervals based on the PMF (probability mass function). Check which interval u falls into.
Inverse Transformation Sampling (逆变换采样):
Theory: If F(x) is the CDF, let U∼U[0,1], then X=F−1(U) follows the distribution F.
e.g. Exponential (λ):
F(x)=1−e−λx→F−1(u)=−λln(1−u).
Since 1−u is also uniform, we can use x=−λln(u).
Rejection Sampling (拒绝采样):
Concept:
Target Distribution: f(x) (The difficult one we want).
Proposal Distribution: g(x) (An easy one we can sample from, e.g., Uniform or Normal).
Condition: We need a constant c>1 such that f(x)≤c⋅g(x) for all x. (The curve cg(x) must cover f(x) completely).
Algorithm:
Step 1: Generate a candidate x from g(x).
Step 2: Generate a random u from U[0,1].
Step 3: Acceptx if u≤c⋅g(x)f(x). Otherwise, Reject and repeat.
Rationale (Dartboard Analogy):
Throw darts uniformly at the area under c⋅g(x).
Keep only the darts that fall under the curve f(x).
Efficiency:
Acceptance probability = 1/c.
Ideally, c should be as small as possible (close to 1) to reduce waste (rejected samples).
Chapter 5. Basic Statistics
Basic Concepts
Population (总体): The entire set of individuals, objects, events, or measurements that share a common characteristic and are of interest in a particular study.
Parameter (参数): Any numerical characteristic of a population.
Sample (样本): A subset of the population, which is used to make inferences about the population.
n individuals are selected from the population, their quantitative index are recorded as X1,X2,…,Xn, which is called a sample of size n, n is the sample size (样本容量).
The process of selecting individuals from the population is called sampling (抽样).
The observed values x1,x2,…,xn of X1,X2,⋯,Xn we obtained after sampling are called sample observed values (样本观测值).
Simple Random Sampling (简单随机抽样): To select samples in a completely random manner, ensuring that every individual in the population has an equal probability of being chosen.
Statisic (统计量):
If X1,...,Xn is a sample from population X∼f(x;θ) and g(x1,...,xn) is an n-variate function (n 元函数). then T=g(X1,...,Xn) is called a statistic if g() does not involve any unknown parameter.
e.g. that commonly used:
Sample Mean (样本均值):
Xˉ=n1i=1∑nXi
Sample Variance (样本方差) & Sample Standard Deviation (样本标准差):
S2=n−11i=1∑n(Xi−Xˉ)2,S=S2
Order Statistics (顺序统计量):
(X(1),X(2),…,X(n))
It implys that X(1)=min{X1,…,Xn}, X(n)=max{X1,…,Xn}.
Sample p-Quantile (样本 p 分位数): number that exceeds at most 100p% of the sample and is exceeded by at most 100(1−p)% of the sample.
Qp={X(⌊np+1⌋),2(X(np)+X(np+1)),if np is not an integerif np is an integer
Specifically,
Q0.5 is the Sample Median (样本中位数).
Q0.25 (Q0.75) is the Sample Lower (Upper) Quartile (样本下(上)四分位数) or the Sample First (Third) Quartile (样本第一(三)四分位数) , also written as Q1 (Q3).
Q3−Q1 is the Sample Interquartile Range (Sample IQR, 样本四分位距).
Sampling Distribution: The distribution of a statistic.
Point Estimation
Point Estimation: Estimating an unknown parameter with a statistic.
Estimator (估计量): A statistic θ^l(X1,X2,…,Xn) (an n-variate function), used to estimate θl.
Estimate / Estimated Value (估计值): θ^l(x1,x2,…,xn).
Parameter Space (参数空间) Θ: The set of values that θ=(θ1,...,θk) can take.
Unbiasedness (无偏性):
Unbiased Estimator (无偏估计量): If for ∀θ∈Θ, we have
Eθ(θ^l)=θl
where Eθ(θ^l) is the expected value of the estimator θl, assuming the true population parameter is θ.
Then θ^l is called an unbiased estimator of θl. Otherwise, it is called a biased estimator of θl.
Bias: Eθ(θ^l)−θl.
Asymptotic Unbiased Estimator (渐进无偏估计量): The bias is not 0 but converge to 0 as n→∞.
μ^=Xˉ and σ^2=S2 are unbiased estimators of μ and σ2, if the population mean μ=E(X) and population variance σ2=Var(X) exist.
Note: This is the biased variance (dividing by n, but it’s consistent), not the unbiased sample variance S2.
The moment estimator of a parameter may not be unique.
Method of Maximum Likelihood
Likelihood Function (似然函数) L:
Since the sample variables X1,...,Xn are i.i.d., the joint probability is the product of individual densities/probabilities:
L(θ;x1,...,xn)=i=1∏nf(xi;θ)
If there exists θ^=θ^(x1,…,xn) such that
L(θ^)=θ∈ΘmaxL(θ;x1,…,xn),
then θ^(x1,…,xn) is the Maximum Likelihood Estimate (极大似然估计值) of θ, the corresponding estimator θ^(X1,…,Xn) is the Maximum Likelihood Estimator (MLE, 极大似然估计量) of θ.
Log-Likelihood Function (对数似然函数) ℓ:
Maximizing L(θ;x) is equivalent to maximizing the log-likelihood function:
ℓ(θ;x)=logL(θ;x)=i=1∑nlogf(xi;θ)
Method of Maximum Likelihood:
Write the Likelihood Function:
L(θ)=i=1∏nf(xi;θ)
Take the Logarithm:
ℓ(θ)=lnL(θ)=i=1∑nlnf(xi;θ)
Differentiate: Take the derivative with respect to θ and set it to 0 to find the critical point.
dθdℓ(θ)=0
Solve for θ: The solution is the MLE, denoted as θ^.
(Check second derivative <0 to ensure it is a maximum, though usually assumed in exams.)
Under mild regularity conditions, the moment estimators and maximum likelihood estimators are consistent and asymptotic unbiased estimators.
Asymptotic Normality: Under mild regularity conditions, for large samples, a maximum likelihood estimator has an approximately normal distribution.
Interval Estimation
Confidence Interval (置信区间):
For ∀α∈(0,1), if for ∀θ∈Θ, there exists two statistics θ^l1(X1,...,Xn) and θ^l2(X1,...,Xn) such that
Pθ(θ^l1<θl<θ^l2)≥1−α
then (θ^l1,θ^l2) is called a Confidence Interval of θl with Confidence Level (置信水平) 1−α, or simply a 100(1−α)% confidence interval. θ^l1 and θ^l2 are called the Confidence Lower Limit (置信下限) and Confidence Upper Limit (置信上限), respectively.
General Method: 置信区间=点估计±(系数×标准误差).
For a consistent estimator θ^l(X1,X2,…,Xn) of θl with the Standard Error (标准误) σ(θ^l)=SD(θ^l):
If θ^l exactly follows a normal distribution N(θl,σ2(θ^l)), and σ2(θ^l) is known, then an exact100(1−α)% confidence interval of θl is
If θ^l approximately follows a normal distribution N(θl,σ2(θ^l)) (due to CLT as n→∞), or the true variance is unknown and replaced by a consistent estimator σ^2(θ^l), then a large sample100(1−α)% confidence interval of θl is
Commonly used values: z0.10=1.282, z0.05=1.645, z0.025=1.960, z0.01=2.326, z0.005=2.576.
Chapter 6. Hypothesis Testing
Basic Ideas
Hypothesis:
Null Hypothesis (零假设/原假设) H0: The default assumption, status quo, no effect, or “innocent”. We assume it is true until evidence proves otherwise.
Alternative Hypothesis (备择假设) H1: The claim the researcher wants to prove.
H0 and H1 are simply two mutually exclusive statements.
Proof by Contradiction: We try to find sufficient evidence to rejectH0.
Test Statistic:
A value calculated and standardized from sample data, usually obtained by a suitable transformation of its estimator θ^.
Rejection Region (RR, 拒绝域):
The set of samples X=(X1,X2,…,Xn) such that Xˉ−8>c, denoted by {X:Xˉ−8>c}.
2 Types of Errors:
Type I Error: Reject H0 when it is actually true. 冤枉好人
Type I Error Rate: P(X∈RR∣H0 is true).
Type II Error: Fail to reject H0 when it is not true. 放过坏人
Type II Error Rate: β=P(X∈RR∣H1 is true).
For a given sample size and form of the RR, we cannot reduce the two error rates at the same time.
Significance Test (显著性检验):
Let X=(X1,X2,…,Xn) be a simple random sample from the population X∼f(x;θ1,θ2,…,θk). For testing problem H0:θl∈Θl0↔H1:θ1∈Θl1 and ∀α∈(0,1), if a test has rejection region RR such that
Pθ(X∈RR)≤α,∀θ∈Θ∧θl∈Θl0
then the test is called a Significance Test of θl with Significance Level (显著性水平) α. α is the upper bound of Type I Error Rate.
P-value:
The probability of obtaining results at least as extreme as the observed data, assuming H0 is true.
Given a significance level α, we would reject H0 if p-value<α; otherwise, we fail to reject H0.
Statistical Power (统计功效):
The probability of correctly detecting an effect when it actually exists.
Formulate Hypotheses: Set up H0 and H1 (One-sided or Two-sided).
Test Statistic: Choose formula (usually Z-test for large samples).
Decision Rule: Calculate P-value or check if Statistic falls in Rejection Region based on α.
Conclusion: Reject or Fail to reject.
3 Forms of Parametric Hypothesis Testing:
H0:θ=θ0↔H1:θ<θ0, a one-sided, left-tail alternative hypothesis.
H0:θ=θ0↔H1:θ>θ0, a one-sided, right-tail alternative hypothesis.
H0:θ=θ0↔H1:θ=θ0, a two-sided alternative hypothesis.
Common Test Types:
Mean Test (Z-test): Testing if population mean μ is greater/less/equal to a value.
Z=σ/nXˉ−μ0
Two-Sample Mean Difference: Testing if μ1=μ2.
Z=nσX2+mσY2(Xˉ−Yˉ)−0
Proportion Test (Bernoulli): Testing defect rates or percentages (p).
Z=p0(1−p0)/np^−p0
Summary
Confidence intervals and significance tests are similar in that they both rely on the distribution of an estimator of the parameter of interest.
Limitations:
Statistical Significance: The effect is not due to chance (P-value is small).
Practical Significance: The effect is large enough to matter in the real world.
With a huge sample size, even a tiny, meaningless difference can be “statistically significant.”
Practice Questions
Problem 1
English:
Customers arrive at a coffee shop according to a Poisson process with a rate of λ=10 customers per hour.
(1) What is the probability that the time between two consecutive customer arrivals is more than 15 minutes?
(2) What is the probability that exactly 12 customers arrive in a specific 1-hour interval?
(3) The shop defines an hour as a “Peak Hour” if more than 12 customers arrive during that hour. Suppose the shop is open for 8 hours a day. Let X be the number of “Peak Hours” in a day. Assuming customer arrivals in different hours are independent, find the probability that there are exactly 3 “Peak Hours” in a day. (You may express the probability p of a single hour being a Peak Hour in terms of a summation).
接着,考虑一天营业的 8 个小时。这可以看作是 n=8 次独立的伯努利试验,每次试验成功的概率为 p。
设 X 为一天中“高峰小时”的数量,则 X 服从二项分布 X∼B(8,p)。
我们需要求恰好有 3 个高峰小时的概率 P(X=3):
P(X=3)=(38)p3(1−p)8−3=3!5!8!p3(1−p)5=56p3(1−p)5
其中 p 的值如上式定义。
Problem 2
English:
A stick of unit length [0,1] is broken at a random point X, which is uniformly distributed on [0,1]. Then, a second point Y is chosen uniformly from the remaining segment [X,1].
(1) Write down the conditional probability density function (PDF) fY∣X(y∣x) and compute the conditional expectation E(Y∣X=x).
(2) Using the Law of Total Expectation, compute the expected value of Y, i.e., E(Y).
(3) Compute the expected value of the product XY, i.e., E(XY).
根据题意,给定 X=x,随机变量 Y 服从区间 [x,1] 上的均匀分布。
因此,条件 PDF 为:
fY∣X(y∣x)={1−x1,0,x<y<1otherwise
均匀分布 U[a,b] 的期望是区间的中点 2a+b。对于 U[x,1]:
E(Y∣X=x)=2x+1
(2) 利用全期望公式求 E(Y)
已知 X∼U[0,1],其 PDF 为 fX(x)=1,0≤x≤1。
根据全期望公式(Law of Total Expectation),E(Y)=E[E(Y∣X)]。
我们将 X 视为随机变量代入 (1) 中的结果:
E(Y)=E(2X+1)=21E(X)+21
由于 X∼U[0,1],可知 E(X)=21。因此:
E(Y)=21⋅21+21=41+42=43
(3) 求 E(XY)
我们需要计算 E(XY)。利用全期望公式 conditioning on X:
E(XY)=E[E(XY∣X)]
在条件期望内部,给定 X 时,X 可以看作常数提取出来:
E(XY∣X)=X⋅E(Y∣X)=X⋅2X+1=2X2+X
现在对外层求期望:
E(XY)=E(2X2+X)=21[E(X2)+E(X)]
我们需要计算 E(X2)。对于 U[0,1] 分布:
E(X2)=∫01x2⋅1dx=[3x3]01=31
(或者利用方差公式:E(X2)=Var(X)+[E(X)]2=121+(21)2=31)
代入数值:
E(XY)=21(31+21)=21(62+63)=21⋅65=125
Problem 3
English:
Let the random vector (X,Y) follow a Bivariate Normal distribution with parameters: mean μX=10,μY=5, standard deviation σX=3,σY=4, and the correlation coefficient between X and Y is ρ=21.
Define two new random variables: U=X−Y and V=X+cY, where c is a real constant.
(1) Calculate the covariance Cov(X,Y) and the variance Var(U).
(2) Find the value of the constant c such that U and V are independent. Explain the theoretical basis for your calculation.
(3) Using the value of c found in (2), calculate the correlation coefficient between X and V, i.e., ρXV.
中文:
设随机向量 (X,Y) 服从二元正态分布,参数如下:均值 μX=10,μY=5,标准差 σX=3,σY=4,且 X 与 Y 之间的相关系数为 ρ=21。
定义两个新的随机变量:U=X−Y 和 V=X+cY,其中 c 为实常数。
(1) 计算协方差 Cov(X,Y) 以及方差 Var(U)。
(2) 求常数 c 的值,使得 U 和 V相互独立。请说明你计算的理论依据。
(3) 利用 (2) 中求出的 c 值,计算 X 与 V 之间的相关系数 ρXV。
English:
Let X and Y be the midterm and final exam scores of a student, respectively. Assume that the joint distribution of scores follows a bivariate normal distribution with the following parameters:
Mean of midterm: μX=70, Standard deviation of midterm: σX=10.
Mean of final: μY=75, Standard deviation of final: σY=12.
The correlation coefficient between the two scores is ρ=0.8.
(1) Suppose a student scores 80 on the midterm (i.e., X=80). Determine the conditional probability density function (PDF) of his final score Y. Specifically, calculate the conditional mean E(Y∣X=80) and conditional variance Var(Y∣X=80).
(2) Given that the student scored 80 on the midterm, what is the probability that his final score is greater than 85?
中文:
设 X 和 Y 分别为一个学生的期中考试成绩和期末考试成绩。假设成绩的联合分布服从二元正态分布,参数如下:
期中均值:μX=70,期中标准差:σX=10。
期末均值:μY=75,期末标准差:σY=12。
两次成绩之间的相关系数为 ρ=0.8。
(1) 假设某学生期中考了 80 分(即 X=80)。确定他期末成绩 Y 的条件概率密度函数 (PDF)。具体地,计算条件均值 E(Y∣X=80) 和条件方差 Var(Y∣X=80)。
(2) 在该生期中考了 80 分的条件下,他期末成绩大于 85 分的概率是多少?
English:
Let X1,X2,…,Xn be a simple random sample from a population with mean E(X)=μ and finite variance Var(X)=σ2. Consider the following estimator for μ:
μ^n=n22k=1∑nkXk
(1) Is μ^n an unbiased estimator of μ? If not, calculate the bias B(μ^n)=E(μ^n)−μ.
(2) Prove that μ^n is a consistent estimator of μ.
(Note that ∑k=1nk=2n(n+1) and ∑k=1nk2=6n(n+1)(2n+1).)
English:
Consider a random variable X that follows an Exponential distribution with an unknown scale parameter θ (θ>0). The probability density function (PDF) is given by:
f(x;θ)={θ1e−x/θ,0,x>0otherwise
(Note: In this parameterization, E(X)=θ and Var(X)=θ2).
A random sample of size n=8 is drawn from this population:
2,4,6,8,10,12,16,22
(1) Compute the sample mean xˉ, sample variance S2, sample lower quartile Q1, sample upper quartile Q3, and the sample interquartile range (IQR).
(2) Derive the Method of Moments Estimator (MME)θ^MME for the parameter θ. Calculate its value based on the sample data.
(3) Derive the Maximum Likelihood Estimator (MLE)θ^MLE for the parameter θ using calculus (derivation). Calculate its value based on the sample data.
(4) Calculate the estimated Standard Error (SE) of the estimator θ^ obtained in (3).
English:
A manufacturer claims that the mean lifetime of a specific type of battery is at least 1000 hours. A quality control engineer suspects that the mean lifetime is actually less than 1000 hours. To verify this, a simple random sample of n=36 batteries is selected from the production line. Assume that the battery lifetimes follow a normal distribution with a known standard deviation σ=60 hours. The significance level is set at α=0.05.
The testing problem is: H0:μ=1000 vs. H1:μ<1000.
(1) Construct the rejection region for the sample mean Xˉ at significance level α=0.05. What is the probability of Type I error for this test?
(2) Suppose the observed sample mean is xˉ=982 hours. Calculate the p-value of this observed statistic. Based on the p-value, should we reject the null hypothesis?
(3) Calculate the probability of making a Type II error (β) if the true population mean is actually μ1=975 hours.
(4) Construct a 95% two-sided confidence interval for the population mean μ based on the observed sample mean xˉ=982. Does this interval contain the claimed value 1000? Briefly discuss whether the conclusion derived from the 95% two-sided confidence interval is consistent with the conclusion from the one-sided hypothesis test in (2) at α=0.05.
(5) If the engineer wants to achieve a statistical power of at least 0.90 when the true mean is μ1=975, what is the minimum sample size n required? (Assume α remains 0.05).
English:
An electronic component manufacturer has two production lines, Line A and Line B, producing the same type of chip. The quality control department wants to determine if there is a significant difference in the defective rates between the two lines.
They collected independent random samples from both lines:
From Line A: nA=200 chips were tested, and 24 were found to be defective.
From Line B: nB=300 chips were tested, and 54 were found to be defective.
Let pA and pB denote the true defective rates of Line A and Line B, respectively. Use a significance level of α=0.05.
(1) Construct the testing problem H0:pA=pB vs. H1:pA=pB. Construct a rejection region based on the test statistic at α=0.05. Then, calculate the observed value of the statistic and decide whether to reject the null hypothesis based on whether the value falls into the rejection region.
(2) Alternatively, compute the p-value of the observed test statistic. Comparing the p-value with the significance level α, is the conclusion consistent with (1)?
(3) Construct a 95% confidence interval for the difference in defective rates pB−pA. Based on whether the interval contains 0, can we conclude that the defective rates of the two lines are significantly different? Briefly discuss the consistency of this result with the hypothesis test in (1).
(4) Suppose the manager plans a new study to confirm the difference. If the true defective rates are indeed pA=0.12 and pB=0.18 (as observed in the samples above), what is the minimum sample size n required for each line (assuming equal sample sizes nA=nB=n) to ensure that the Type II error rate (β) does not exceed 0.10 at the α=0.05 significance level?
中文:
一家电子元件制造商有两条生产线(生产线 A 和生产线 B)生产同类型的芯片。质量控制部门希望确定这两条生产线的次品率是否存在显著差异。
他们分别从两条生产线收集了独立的随机样本:
生产线 A:测试了 nA=200 个芯片,发现 24 个次品。
生产线 B:测试了 nB=300 个芯片,发现 54 个次品。
令 pA 和 pB 分别表示生产线 A 和生产线 B 的真实次品率。显著性水平设定为 α=0.05。
(1) 构建检验问题 H0:pA=pB vs. H1:pA=pB。在 α=0.05 水平下构建基于检验统计量的拒绝域。然后,计算统计量的观测值,并根据其是否落入拒绝域来决定是否拒绝原假设。
(2) 或者,计算观测检验统计量的 p 值 (p-value)。将 p 值与显著性水平 α 进行比较,判断结论是否与 (1) 一致?
(3) 构建次品率之差 pB−pA 的 95% 置信区间。基于该区间是否包含 0,我们能否得出两条生产线次品率存在显著差异的结论?简要讨论该结果与 (1) 中假设检验的一致性。
(4) 假设经理计划进行一项新的研究以确认差异。如果真实的次品率确为 pA=0.12 和 pB=0.18(即上述样本观测值),为了确保在 α=0.05 的显著性水平下,第二类错误率 (β) 不超过 0.10,每条生产线所需的最小样本量 n 是多少?(假设两组样本量相等 nA=nB=n)。