# 概率论与数理统计浙大第五版 第一章 部分习题+R代码

## 习题一

### 5.

(1)

P ( A ) = C 5 2 C 5 3 + C 5 3 C 5 2 + C 5 4 C 5 1 + C 5 5 C 10 5 = 1 − P ( A ‾ ) = 1 − C 5 1 C 5 4 + C 5 5 C 10 5 = 226 252 = 113 126 \large {P(A)=\frac{C_{5}^{2}C_{5}^{3}+C_{5}^{3}C_{5}^{2}+C_{5}^{4}C_{5}^{1}+C_{5}^{5}}{C_{10}^{5}}=1-P(\overline A)}=1-\frac{C_{5}^{1}C_{5}^{4}+C_{5}^{5}}{C_{10}^{5}}=\frac{226}{252}=\frac{113}{126}

t=choose(5,2)*choose(5,3)+choose(5,3)*choose(5,2)+choose(5,4)*choose(5,1)+choose(5,5)
s=choose(10,5)
p=t/s
p


(2)

P ( A B C ) = P ( C ∣ A B ) P ( B ∣ A ) P ( A ) = 1 2 ∗ 4 9 ∗ 3 8 = 1 12 \large{P(ABC)=P(C|AB)P(B|A)P(A)}=\frac{1}{2}*\frac{4}{9}*\frac{3}{8}=\frac{1}{12}

### 6.

(1)

P ( A ) = C 5 2 C 10 3 = 1 12 \large{P(A)=\frac{C_{5}^{2}}{C_{10}^{3}}}=\frac{1}{12}

(2)

P ( A ) = C 4 2 C 10 3 = 1 20 \large{P(A)=\frac{C_{4}^{2}}{C_{10}^{3}}}=\frac{1}{20}

### 7.

P ( A ) = C 10 4 C 4 3 C 3 2 C 17 9 = 252 2431 \large{P(A)=\frac{C_{10}^{4}C_{4}^{3}C_{3}^{2}}{C_{17}^{9}}=\frac{252}{2431}}

### 8.

(1)

P ( A ) = C 400 90 C 1100 110 C 1500 200 \large{P(A)=\frac{C_{400}^{90}C_{1100}^{110}}{C_{1500}^{200}}}

(太大了没算，见R代码及结果)

(2)

P ( A ) = 1 − P ( A ‾ ) = 1 − C 400 1 C 1100 199 + C 1100 200 C 1500 200 \large{P(A)=1-P(\overline A)=1-\frac{C_{400}^{1}C_{1100}^{199}+C_{1100}^{200}}{C_{1500}^{200}}}

### 9.

P ( A ) = 1 − P ( A ‾ ) = 1 − C 5 4 C 2 1 5 C 10 4 = 13 21 \large{P(A)=1-P(\overline A)=1-\frac{C_{5}^{4}{C_{2}^{1}}^5}{C_{10}^{4}}}=\frac{13}{21}

### 10.

P ( A ) = C 1 1 C 2 1 C 2 1 C 1 1 C 1 1 C 1 1 C 1 1 A 11 7 = 1 415800 \large{P(A)=\frac{C_{1}^{1}C_{2}^{1}C_{2}^{1}C_{1}^{1}C_{1}^{1}C_{1}^{1}C_{1}^{1}}{A_{11}^{7}}}=\frac{1}{415800}

### 11.

P ( A ) = C 4 3 3 4 \large{P(A)=\frac{C_{4}^{3}}{3^4}}

P ( B ) = C 4 1 C 3 2 3 4 \large{P(B)=\frac{C_{4}^{1}C_{3}^{2}}{3^4}}

P ( C ) = C 4 1 C 3 1 3 4 \large{P(C)=\frac{C_{4}^{1}C_{3}^{1}}{3^4}}

P ( A ) = A 4 3 4 3 \large{P(A)=\frac{A_{4}^{3}}{4^3}}

（三个球中选两个球捆绑一起，在对应投入杯中，下同理

P ( B ) = C 3 2 A 4 2 4 3 \large{P(B)=\frac{C_{3}^{2}A_{4}^{2}}{4^3}}

P ( C ) = C 3 3 A 4 1 4 3 \large{P(C)=\frac{C_{3}^{3}A_{4}^{1}}{4^3}}

R代码让我偷个懒 在此略过 (～￣▽￣)～

### 12.

P ( A ) = C 10 1 C 47 3 . . . C 26 3 C 23 3 C 50 3 C 47 3 . . . C 26 3 C 23 3 = C 10 1 C 50 3 = 1 1960 \large{P(A)=\frac{C_{10}^{1}C_{47}^{3}...C_{26}^{3}C_{23}^{3}}{C_{50}^{3}C_{47}^{3}...C_{26}^{3}C_{23}^{3}}=\frac{C_{10}^{1}}{C_{50}^{3}}}=\frac{1}{1960}

### 13.

(1)

P ( A ) = C 5 1 C 2 1 C 3 1 C 2 1 C 12 5 = 4 33 \large{P(A)=\frac{C_{5}^{1}C_{2}^{1}C_{3}^{1}C_{2}^{1}}{C_{12}^{5}}=\frac{4}{33}}

(2)

P ( A ) = C 5 2 C 2 1 C 3 1 C 2 1 + C 5 1 C 2 2 C 3 1 C 2 1 + C 5 1 C 2 1 C 3 2 C 2 1 + C 5 1 C 2 1 C 3 1 C 2 2 C 12 5 = 10 33 \large{P(A)=\frac{C_{5}^{2}C_{2}^{1}C_{3}^{1}C_{2}^{1}+C_{5}^{1}C_{2}^{2}C_{3}^{1}C_{2}^{1}+C_{5}^{1}C_{2}^{1}C_{3}^{2}C_{2}^{1}+C_{5}^{1}C_{2}^{1}C_{3}^{1}C_{2}^{2}}{C_{12}^{5}}}=\frac{10}{33}

### R

# 定义一个函数，该函数为所求的积分函数
# 因此在计算上述定积分和计算sqrt(2)同理
# 在此用例为sqrt(2)
f = function(x)
sqrt(2)
# 生成x
x = seq(1.5, 3.5, length=100)
y = rep(0, length(x))
j = 1
# 计算每个x对应的y值
for (i in x) {
y[j] = f(i)
j = j + 1
}
# 根据函数划出积分曲线
plot(x, y, type='o')
# 确定积分边界
abline(v = 2)
abline(v = 3)
# 简单设定随机点 (x,y)|2<=x<=3,0<=y<=100
# 即随机点的分布面积为100
s = 100
a = 0
cnt <- 1
# 有兴趣的朋友可以适当的多循环几次，这样结果更为精确，但是运行时间太长，并没有跑太久
while (cnt <= 100000) {
# 随机点 xx，yy
xx = 2 + runif(1)
yy = 100 * runif(1)
# 点在积分面积内则点为红色
if( f(xx) > yy ) {
a = a + 1
points(x = xx, y = yy, pch = 20, cex = 1, col = "red")
}
# 否则为绿色
else
points(x = xx, y = yy, pch = 20, cex = 1, col = "green")
cnt = cnt + 1
}
# 计算积分
print((a / 10000) * s)

• 2
点赞
• 2
评论
• 0
收藏
• 一键三连
• 扫一扫，分享海报

05-01

06-29
12-09
07-04
03-20

⑨充满智慧与力量⑨

¥2 ¥4 ¥6 ¥10 ¥20