北大叉院-849统计学-2017年

一、(15分) XX 以等概率取 1,0,1-1,0,1, YU(0,1),Y \sim U(0,1), 相互独立, 求 X+YX+Y 的概率密度.

Solution:
Z=X+YZ=X+Y, 则由全概率公式以及微分法

P(Z=z)=P(X+Y=z)=x=11P(Y=zx)P(X=x)=13x=11I{0<zx<1}dz=13I{1<z<2}dz\begin{aligned} P(Z=z) &=P(X+Y=z) \\ &=\sum_{x=-1}^{1} P(Y=z-x) P(X=x) \\ &=\frac{1}{3} \sum_{x=-1}^{1} \mathbf{I}_{\{0<z-x<1\}} \mathrm{d} z \\ &=\frac{1}{3} \mathbf{I}_{\{-1<z<2\}} \mathrm{d} z \end{aligned}

于是 fZ(z)=13I{1<z<2}f_{Z}(z)=\frac{1}{3} \mathbf{I}_{\{-1<z<2\}}.

二、(15分) (X,Y)(X, Y) 服从 D={0<x<1,0<y<x}D=\{0<x<1,0<y<x\} 上的均匀分布, 求 ρXY\rho_{X Y}.

Solution:
SD=12S_{D}=\frac{1}{2}, 于是 f(x,y)={2,(x,y)D0, 其他 f(x, y)=\left\{\begin{array}{ll}2, & (x, y) \in D \\ 0, & \text { 其他 }\end{array}\right.. 于是

EX=012x dx0x dy=012x2 dx=23EX2=012x2 dx0x dy=012x3 dx=12Var(X)=1249=118EY=012 dx0xy dy=01x2 dx=13EY2=012 dx0xy2 dy=0123x3 dx=16Var(Y)=1613=118\begin{aligned} E X &=\int_{0}^{1} 2 x \mathrm{~d} x \int_{0}^{x} \mathrm{~d} y=\int_{0}^{1} 2 x^{2} \mathrm{~d} x=\frac{2}{3} \\ E X^{2} &=\int_{0}^{1} 2 x^{2} \mathrm{~d} x \int_{0}^{x} \mathrm{~d} y=\int_{0}^{1} 2 x^{3} \mathrm{~d} x=\frac{1}{2} \\ \operatorname{Var}(X) &=\frac{1}{2}-\frac{4}{9}=\frac{1}{18} \\ E Y &=\int_{0}^{1} 2 \mathrm{~d} x \int_{0}^{x} y \mathrm{~d} y=\int_{0}^{1} x^{2} \mathrm{~d} x=\frac{1}{3} \\ E Y^{2} &=\int_{0}^{1} 2 \mathrm{~d} x \int_{0}^{x} y^{2} \mathrm{~d} y=\int_{0}^{1} \frac{2}{3} x^{3} \mathrm{~d} x=\frac{1}{6} \\ \operatorname{Var}(Y) &=\frac{1}{6}-\frac{1}{3}=\frac{1}{18} \end{aligned}

EXY=012x dx0xy dy=01x3 dx=14E X Y=\int_{0}^{1} 2 x \mathrm{~d} x \int_{0}^{x} y \mathrm{~d} y=\int_{0}^{1} x^{3} \mathrm{~d} x=\frac{1}{4}, 于是

Cov(X,Y)=EXYEXEY=142313=136\operatorname{Cov}(X, Y)=E X Y-E X E Y=\frac{1}{4}-\frac{2}{3} \frac{1}{3}=\frac{1}{36}

ρXY=Cov(X,Y)Var(X)Var(Y)=136118118=12\rho_{X Y}=\frac{\operatorname{Cov}(X, Y)}{\sqrt{\operatorname{Var}(X) \operatorname{Var}(Y)}}=\frac{\frac{1}{36}}{\sqrt{\frac{1}{18} \frac{1}{18}}}=\frac{1}{2}.

三、(15分) 长为 1 的木棒分为 3 段,求能构成三角形的概率.

Solution:
设分段点分别 X1,X2X_{1}, X_{2} i.i.d U(0,1)\sim U(0,1), 则三段的长度分别是

x(1),x(2)x(1),1x(2)x_{(1)}, x_{(2)}-x_{(1)}, 1-x_{(2)}

设事件 AA 表示三段可以构成三角形, 则

A={x(1)+x(2)x(1)>1x(2)}{x(1)+1x(2)>x(2)x(1)}{1x(2)+x(2)x(1)>x(1)}={x(2)>12,x(2)x(1)<12,x(1)<12}\begin{aligned} A &=\left\{x_{(1)}+x_{(2)}-x_{(1)}>1-x_{(2)}\right\} \cap\left\{x_{(1)}+1-x_{(2)}>x_{(2)}-x_{(1)}\right\} \cap\left\{1-x_{(2)}+x_{(2)}-x_{(1)}>x_{(1)}\right\} \\ &=\left\{x_{(2)}>\frac{1}{2}, x_{(2)}-x_{(1)}<\frac{1}{2}, x_{(1)}<\frac{1}{2}\right\} \end{aligned}

于是

P(A)=0122dx112x1+12dx2=2012x1dx1=14P\left( A \right) =\int_0^{\frac{1}{2}}{2}\text{d}x_1\int_{\frac{1}{2}}^{x_1+\frac{1}{2}}{\text{d}}x_2=2\int_0^{\frac{1}{2}}{x_1}\text{d}x_1=\frac{1}{4}

(注: 这里 (x(1),x(2))f(x1,x2)=2I{0<x1<x2<1})\left.\left(x_{(1)}, x_{(2)}\right) \sim f\left(x_{1}, x_{2}\right)=2 \mathbf{I}_{\left\{0<x_{1}<x_{2}<1\right\}}\right)

[注]: 本题出现贝特朗奇论, 答案中的做法是随机切成三段, 三段长度倾向于均匀. 如果认为我们先切一刀 XU(0,1)X\sim U(0,1), 再在剩下的切一刀 YX=xU(0,1x)Y|X=x \sim U(0,1-x), 剩下的是 Z=1XYZ=1-X-Y, 组成三角形的概率则是 ln212\ln 2 -\frac{1}{2}. 这样考虑的话, 三段长度不是同分布的, 第一段明显倾向于比另外两段长.

四、(15分) (Xi,Yi)\left(X_{i}, Y_{i}\right) 满足 Yi=a+bXi+εi,εiY_{i}=a+b X_{i}+\varepsilon_{i}, \quad \varepsilon_{i} i.i.d. N(0,σ2),\sim N\left(0, \sigma^{2}\right), 其中a,b,σa, b, \sigma 未知, 现观测到一组新数据 X0,X_{0},Y0Y_{0} 的 95%置信区间.

Solution:

y^0=β^0+β^1x0N(y0,(1n+(x0xˉ)2lxx)σ2) 这里 {β^0=yˉβ^1xˉβ^1=lxylxx=i=1n(xixˉ)(yiyˉ)i=1n(xixˉ)2.\begin{gathered} \hat{y}_{0}=\hat{\beta}_{0}+\hat{\beta}_{1} x_{0} \sim N\left(y_{0},\left(\frac{1}{n}+\frac{\left(x_{0}-\bar{x}\right)^{2}}{l_{x x}}\right) \sigma^{2}\right) \\ \text { 这里 }\left\{\begin{array}{l} \hat{\beta}_{0}=\bar{y}-\hat{\beta}_{1} \bar{x} \\ \hat{\beta}_{1}=\frac{l_{x y}}{l_{x x}}=\frac{\sum_{i=1}^{n}\left(x_{i}-\bar{x}\right)\left(y_{i}-\bar{y}\right)}{\sum_{i=1}^{n}\left(x_{i}-\bar{x}\right)^{2}} . \end{array}\right. \end{gathered}

用枢轴量 T=y0y^0σ^1+1n+(x0xˉ)2lxxt(n2)T=\frac{y_{0}-\hat{y}_{0}}{\hat{\sigma} \sqrt{1+\frac{1}{n}+\frac{\left(x_{0}-\bar{x}\right)^{2}}{l_{x x}}}} \sim t(n-2), 其中 σ^2=i=1n(yiβ^0β^1xi)2n2\hat{\sigma}^{2}=\frac{\sum_{i=1}^{n}\left(y_{i}-\hat{\beta}_{0}-\hat{\beta}_{1} x_{i}\right)^{2}}{n-2}. 可构造 y0y_{0}0.950.95 置信水平的置信区间

y^0±σ^1+1n+(x0xˉ)2lxxt0.975(n2)\hat{y}_{0} \pm \hat{\sigma} \sqrt{1+\frac{1}{n}+\frac{\left(x_{0}-\bar{x}\right)^{2}}{l_{x x}}} t_{0.975}(n-2)

五、(15分) 总体 XX 的密度函数 f(x)f(x) 光滑, 且任意 x1,x2x_{1}, x_{2}f(x1)f(x2)Lx1x2,L\left|f\left(x_{1}\right)-f\left(x_{2}\right)\right| \leq L\left|x_{1}-x_{2}\right|, L 为已知常数, 定义 f^(x0)=1Nλi=1NK(x0xiλ),\hat{f}\left(x_{0}\right)=\frac{1}{N \lambda} \sum_{i=1}^{N} K\left(\frac{x_{0}-x_{i}}{\lambda}\right), 其中 MK(t)0M \geq K(t) \geq 0, 且在勒贝格积分意义下,

+K(t)dt=1,+tK(t)dt=0,+t2K(t)dt=σk2<,\int_{-\infty}^{+\infty} K(t) d t=1, \int_{-\infty}^{+\infty} t K(t) d t=0, \int_{-\infty}^{+\infty} t^{2} K(t) d t=\sigma_{k}^{2}<\infty,

这里 MMσk2\sigma_{k}^{2} 均为已知常数, 证明:

(1) (5 分) Ef^(x0)f(x0)c1λ\left|E \hat{f}\left(x_{0}\right)-f\left(x_{0}\right)\right| \leq c_{1} \lambda;

(2) (5 分) Var[f^(x0)]c2Nλ2\operatorname{Var}[\hat{f}\left(x_{0}\right)] \leq \frac{c_{2}}{N \lambda^{2}};

(3) (5 分) 选择合适的 λ,\lambda, 使 MSE[f^(x0)]c3N12\operatorname{MSE}[ \hat{f}\left(x_{0}\right)] \leq c_{3} N^{-\frac{1}{2}}.

Solution:
(1)

Ef^(x0)=E[1Nλi=1NK(x0Xiλ)]=1λEK(x0X1λ)=1λ+K(x0xλ)f(x)dx=+K(u)f(x0λu)du\begin{aligned} E \hat{f}\left(x_{0}\right) &=E\left[\frac{1}{N \lambda} \sum_{i=1}^{N} K\left(\frac{x_{0}-X_{i}}{\lambda}\right)\right] \\ &=\frac{1}{\lambda} E K\left(\frac{x_{0}-X_{1}}{\lambda}\right)=\frac{1}{\lambda} \int_{-\infty}^{+\infty} K\left(\frac{x_{0}-x}{\lambda}\right) f(x) \mathrm{d} x=\int_{-\infty}^{+\infty} K(u) f\left(x_{0}-\lambda u\right) \mathrm{d} u \end{aligned}

f(x0)=+K(u)f(x0)duf\left(x_{0}\right)=\int_{-\infty}^{+\infty} K(u) f\left(x_{0}\right) \mathrm{d} u, 所以

Ef^(x0)f(x0)=+K(u)[f(x0λu)f(x0)]du+K(u)Lλudu=λL+uK(u)du\begin{aligned} \left|E \hat{f}\left(x_{0}\right)-f\left(x_{0}\right)\right| &=\left|\int_{-\infty}^{+\infty} K(u)\left[f\left(x_{0}-\lambda u\right)-f\left(x_{0}\right)\right] \mathrm{d} u\right| \\ & \leqslant \int_{-\infty}^{+\infty}|K(u) L \lambda u| \mathrm{d} u=\lambda L \int_{-\infty}^{+\infty}|u| K(u) \mathrm{d} u \end{aligned}

由于 +uK(u)du=0\int_{-\infty}^{+\infty} u K(u) \mathrm{d} u=0, 则 +uK(u)du\int_{-\infty}^{+\infty}|u| K(u) \mathrm{d} u 收敛, 记 c1=L+uK(u)duc_{1}=L \int_{-\infty}^{+\infty}|u| K(u) \mathrm{d} u, 则有

Ef^(x0)f(x0)c1λ\left|E \hat{f}\left(x_{0}\right)-f\left(x_{0}\right)\right| \leqslant c_{1} \lambda

(2)

Var[f^(x0)]=1N2λ2i=1NVar[K(x0Xiλ)]=1Nλ2Var[K(x0X1λ)]1Nλ2EK2(x0X1λ)M2Nλ2=c2Nλ2\begin{aligned} \operatorname{Var}\left[\hat{f}\left(x_{0}\right)\right] &=\frac{1}{N^{2} \lambda^{2}} \sum_{i=1}^{N} \operatorname{Var}\left[K\left(\frac{x_{0}-X_{i}}{\lambda}\right)\right] \\ &=\frac{1}{N \lambda^{2}} \operatorname{Var}\left[K\left(\frac{x_{0}-X_{1}}{\lambda}\right)\right] \\ & \leqslant \frac{1}{N \lambda^{2}} E K^{2}\left(\frac{x_{0}-X_{1}}{\lambda}\right) \leqslant \frac{M^{2}}{N \lambda^{2}}=\frac{c_{2}}{N \lambda^{2}} \end{aligned}

(3)

MSE(f^(x0))=[Ef^(x0)f(x0)]2+Var[f^(x0)]c12λ2+c2Nλ2( 取 λ=N14)=c12N12+c2N12=c3N12\begin{aligned} \operatorname{MSE}\left(\hat{f}\left(x_{0}\right)\right) &=\left[E \hat{f}\left(x_{0}\right)-f\left(x_{0}\right)\right]^{2}+\operatorname{Var}\left[\hat{f}\left(x_{0}\right)\right] \\ & \leqslant c_{1}^{2} \lambda^{2}+\frac{c_{2}}{N \lambda^{2}} \\ \left(\text { 取 } \lambda=N^{-\frac{1}{4}}\right) &=c_{1}^{2} N^{-\frac{1}{2}}+c_{2} N^{-\frac{1}{2}}=c_{3} N^{-\frac{1}{2}} \end{aligned}

六、(20分) 总体 XU(0,θ),X \sim U(0, \theta), 随机样本 x1,x2,,xn,x_{1}, x_{2}, \cdots, x_{n}, 求:

(1)(5分) θ\theta 的矩估计 θ^\hat{\theta};

(2)(5分) θ\thetaMLEθ^1\operatorname{MLE} \hat{\theta}_{1};

(3)(5分) 讨论 θ^\hat{\theta} 的相合性;

(4)(5分) 讨论 θ^1\hat{\theta}_{1} 的无偏性与相合性.

Solution:
(1) EX=θ2E X=\frac{\theta}{2}, 则 θ^M=2xˉ\hat{\theta}_{M}=2 \bar{x}θ\theta 的矩估计.
(2) 似然函数 L(θ)=1θnI{x(n)θ}L(\theta)=\frac{1}{\theta^{n}} \mathbf{I}_{\left\{x_{(n)} \leqslant \theta\right\}}θ\theta[x(n),+)\left[x_{(n)},+\infty\right) 上的减函数, 显然 θ^L=x(n)\hat{\theta}_{L}=x_{(n)}θ\theta 的极大似然估计.
(3) 根据强大数定律, xˉθ2\bar{x} \rightarrow \frac{\theta}{2}, a.s. .于是 2xˉθ2 \bar{x} \rightarrow \theta, a.s., 即 θ^M\hat{\theta}_{M}θ\theta 的强相合估计.
(4) 由于 T=x(n)θBeta(n,1)T=\frac{x_{(n)}}{\theta} \sim \operatorname{Beta}(n, 1), 则 Ex(n)=nn+1θ\operatorname{Ex}(n)=\frac{n}{n+1} \theta, 即 θ^M\hat{\theta}_{M} 不是 θ\theta 的无偏估计. 但 Ex(n)=nn+1θθE x_{(n)}=\frac{n}{n+1} \theta \rightarrow \theta, 同时又有

n=1Var(x(n))=n=1n(n+1)2(n+2)θ<+\sum_{n=1}^{\infty} \operatorname{Var}\left(x_{(n)}\right)=\sum_{n=1}^{\infty} \frac{n}{(n+1)^{2}(n+2)} \theta<+\infty

于是 x(n)θx_{(n)} \rightarrow \theta, a.s., 即 θ^M\hat{\theta}_{M}θ\theta 的强相合估计.

这是因为有如下引理: 若 Eθ^θ,i=1Var(θ^)<+E\hat{\theta}\rightarrow \theta, \sum_{i=1}^{\infty}{Var\left( \hat{\theta} \right)}<+\inftyθ^\hat{\theta}θ\theta 的强相合估计.

证明: 由于

i=1P(θ^nθ>ε)i=1P(θ^nEθ^n>ε2)+i=1P(θEθ^n>ε2)i=14ε2Var(θ^n)+i=1P(θEθ^n>ε2)<+\begin{aligned} \sum_{i=1}^{\infty}{P\left( \left| \hat{\theta}_n-\theta \right|>\varepsilon \right)}&\le \sum_{i=1}^{\infty}{P\left( \left| \hat{\theta}_n-E\hat{\theta}_n \right|>\frac{\varepsilon}{2} \right)}+\sum_{i=1}^{\infty}{P\left( \left| \theta -E\hat{\theta}_n \right|>\frac{\varepsilon}{2} \right)} \\ &\le \sum_{i=1}^{\infty}{\frac{4}{\varepsilon ^2}Var\left( \hat{\theta}_n \right)}+\sum_{i=1}^{\infty}{P\left( \left| \theta -E\hat{\theta}_n \right|>\frac{\varepsilon}{2} \right)}<+\infty \end{aligned}

故又Borel-Cantelli引理知 θ^n\hat{\theta}_nθ\theta 的强相合估计.

七、(15分) 总体 XB(1,p1),YB(1,p2),X \sim B\left(1, p_{1}\right), \quad Y \sim B\left(1, p_{2}\right), 随机样本分别为 nn 个与 mm 个(足够大), 构造假设检验 H0:p1p2H_{0}: p_{1} \geq p_{2} 使拒绝原假设的概率接近 1α1-\alpha.

Solution:
根据中心极限定理, 利用正态分布近似, 有

xˉAN(p1,p1(1p1)n),yˉAN(p2,p2(1p2)m)\bar{x} \sim A N\left(p_{1}, \frac{p_{1}\left(1-p_{1}\right)}{n}\right), \bar{y} \sim A N\left(p_{2}, \frac{p_{2}\left(1-p_{2}\right)}{m}\right)

于是

(xˉyˉ)(p1p2)p1(1p1)n+p2(1p2)mAN(0,1)\frac{(\bar{x}-\bar{y})-\left(p_{1}-p_{2}\right)}{\sqrt{\frac{p_{1}\left(1-p_{1}\right)}{n}+\frac{p_{2}\left(1-p_{2}\right)}{m}}} \sim \operatorname{AN}(0,1)

再利用大数定律可知, xˉPp1,yˉPp2\bar{x} \stackrel{P}{\rightarrow} p_{1}, \bar{y} \stackrel{P}{\rightarrow} p_{2}, 根据 Slutsky 定理有

(xˉyˉ)(p1p2)xˉ(1xˉ)n+yˉ(1yˉ)mAN(0,1)\frac{(\bar{x}-\bar{y})-\left(p_{1}-p_{2}\right)}{\sqrt{\frac{\bar{x}(1-\bar{x})}{n}+\frac{\bar{y}(1-\bar{y})}{m}}} \sim A N(0,1)

于是近似水平 α\alpha 的拒绝域应为 W={(xˉyˉ)xˉ(1xˉ)n+yˉ(1yˉ)m<uα}W=\left\{\frac{(\bar{x}-\bar{y})}{\sqrt{\frac{\bar{x}(1-\bar{x})}{n}+\frac{\bar{y}(1-\bar{y})}{m}}}<u_{\alpha}\right\}

[注]: 分母也可以考虑成: 原假设中的 p1=p2p_1=p_2 成立时, 两组样本应该来自于同一个分布, 故考虑一个联合均值即 p~=nxˉ+myˉm+n\tilde{p}=\frac{n\bar{x}+m\bar{y}}{m+n}, 然后用 {xˉyˉp~(1p~)n+m<uα}\left\{ \frac{\bar{x}-\bar{y}}{\sqrt{\frac{\tilde{p}\left( 1-\tilde{p} \right)}{n+m}}}<u_{\alpha} \right\} 作为拒绝域.

八、(10分) XN(μ,4),X \sim N(\mu, 4), 样本数为 n,n,nn 的取值范围使得 μ\mu 的 95%置信区间长度不大于0.01.

Solution:
μ\mu 的置信区间是 xˉ±σnz1α2\bar{x} \pm \frac{\sigma}{\sqrt{n}} z_{1-\frac{\alpha}{2}}, 此时 σ=2,α=0.05,z0.975=1.96\sigma=2, \alpha=0.05, z_{0.975}=1.96, 则区间
长度为 d=2σnz1a2=4n1.960.01d=2 \frac{\sigma}{\sqrt{n}} z_{1-\frac{a}{2}}=\frac{4}{\sqrt{n}} 1.96 \leqslant 0.01, 则

n4001.96n614656\begin{aligned} \sqrt{n} & \geqslant 400 \cdot 1.96 \\ n & \geqslant 614656 \end{aligned}

所以 nn 至少为 614656.

九、(15分) XiN(μ,σ2),i=1,2,,n,X_{i} \sim N\left(\mu, \sigma^{2}\right), \quad i=1,2, \ldots, n, 服从多元正态, 任意两个样本相关系数皆为 ρ\rho,

(1)(5分) 证明 ρ1n1;\rho \geq-\frac{1}{n-1} ;

(2)(5分) 求 μ\mu 的矩估计 μ^\hat{\mu};

(3)(5分) 讨论 μ^\hat{\mu} 的无偏性、相合性.

Solution:
(1)

Var(i=1nXi)=i=1nVar(Xi)+21i<jnCov(Xi,Xj)=nσ2+2n(n1)2ρσ2=nσ2+n(n1)ρσ20\begin{aligned} \operatorname{Var}\left(\sum_{i=1}^{n} X_{i}\right) &=\sum_{i=1}^{n} \operatorname{Var}\left(X_{i}\right)+2 \sum_{1 \leqslant i<j \leqslant n} \operatorname{Cov}\left(X_{i}, X_{j}\right) \\ &=n \sigma^{2}+2 \cdot \frac{n(n-1)}{2} \rho \sigma^{2} \\ &=n \sigma^{2}+n(n-1) \rho \sigma^{2} \geqslant 0 \end{aligned}

ρ1n1\rho \geqslant-\frac{1}{n-1}.
(2) EX=μE X=\mu, 所以 μ^M=xˉ\hat{\mu}_{M}=\bar{x}μ\mu 的矩估计.
(3) Ex=μE \overline{ x}=\mu, 所以 μ^M\hat{\mu}_{M}μ\mu 的无偏估计.
对于相合性,由于需要考虑样本量趋于无穷即nn\rightarrow \infty的情况, 因此可仅仅考虑 ρ0\rho \geqslant 0.

xˉN(μ,σ2n+n1nρσ2)\bar{x} \sim N\left(\mu, \frac{\sigma^{2}}{n}+\frac{n-1}{n} \rho \sigma^{2}\right), 则
[i] ρ=0\rho=0
根据大数定律, 显然有 xˉμ\bar{x} \rightarrow \mu, a.s.
[ii] ρ>0\rho>0
ε>0\forall \varepsilon>0, 有

P(xˉμεσ)=P(xˉμσ1n+n1nρε1n+n1nρ)=1Φ(ε1n+n1nρ)1Φ(ερ)\begin{aligned} P(\bar{x}-\mu \geqslant \varepsilon \sigma) &=P\left(\frac{\bar{x}-\mu}{\sigma \sqrt{\frac{1}{n}+\frac{n-1}{n} \rho}} \geqslant \frac{\varepsilon}{\sqrt{\frac{1}{n}+\frac{n-1}{n} \rho}}\right) \\ &=1-\Phi\left(\frac{\varepsilon}{\sqrt{\frac{1}{n}+\frac{n-1}{n} \rho}}\right) \rightarrow 1-\Phi\left(\frac{\varepsilon}{\sqrt{\rho}}\right) \end{aligned}

于是 xˉμ\bar{x} \nrightarrow \mu.
综上所述, 当且仅当 ρ=0\rho=0 时, μ^M\hat{\mu}_{M}μ\mu 的强相合估计, 否则 μ^M\hat{\mu}_{M} 不是 μ\mu 的相合估计.

十、(15分) 一个人出生在任意月份的概率为 112\frac{1}{12}, 现抽取 100 人. 先从装有 5 个红球与 3 个黑球的袋中抽球, 若抽中红球, 回答: 出生日是否在 7.1 之前; 若抽中黑球, 回答: 是否是同性恋. 最后统计到回答“是”的人为 35 人, 求人群中的同性恋比例.

Solution:
用事件 AA 表示抽中红球, 用事件 BB 表示回答 “是”, 则同性恋比例为

p=P(BAˉ)p=P(B \mid \bar{A})

则由全概率公式, 有

P(B)=P(BA)P(A)+P(BAˉ)P(Aˉ)35100=1258+p38\begin{aligned} P(B) &=P(B \mid A) P(A)+P(B \mid \bar{A}) P(\bar{A}) \\ \frac{35}{100} &=\frac{1}{2} \cdot \frac{5}{8}+p \cdot \frac{3}{8} \end{aligned}

解得 p=0.1p=0.1.