Overall distribution
Midterm score histogram for the whole class
Avg: 57.53, Std: 22.10
30
24
25
20
16
15
13
12
9
10
7
7
4
5
3
1
2
0
0
0-10
10-20
20-30
30-40
40-50
50-60
60-70
70-80
80-90
90-100
100-110
110-120
Midterm From Last Year
CSIE vs. Non-CSIE
score histogram for the non-CSIE students
Avg: 62.3, Std: 18.99
7
6
6
5
5
4
3
3
2
2
1
2
1
0
1
0
0
0
20-30
30-40
0
0
0-10
10-20
40-50
50-60
60-70
70-80
80-90
90-100
100-110
110-120
score histogram for CSIE students
Avg: 56.3, Std: 22.78
20
18
14
15
9
10
10
7
6
5
4
5
3
1
1
0
0
0-10
10-20
20-30
30-40
40-50
50-60
60-70
70-80
80-90
90-100
100-110
110-120
Good News
• 陳譽仁 108
• 陳昭宏 105
• Your mid-term score will be consider as
100 “while generating the final grade”.
• If min (midterm, final) >=100, then your
final grade will be 100 (regardless of your
score in homework)
• if your midterm + final >200, I’ll give you a
gift
Bad News
• There are people score <50
• If (midterm+final)<80 definitely fail
Midterm score histogram for the whole class
Avg: 57.53, Std: 22.10
30
24
25
20
16
15
13
12
9
10
7
7
4
5
3
1
2
0
0
0-10
10-20
20-30
30-40
40-50
50-60
60-70
70-80
80-90
90-100
100-110
110-120
Q1: 8pts, avg:4.67, std: 2.04
What are the four essentials to define probability?
Please illustrate them by an example (8pts)
Q2-(a): 5pts, avg:3.99, std: 1.76
• (a) There are three boxes: a box containing
two gold coins, a box with two silver coins,
and a box with one of each. After choosing a
box at random and withdrawing one coin at
random, you find that the chosen coin is a
gold coin. What is the probability that the
remaining coin is also gold [5 pts]
Q2-(a): 5pts, avg:3.99, std: 1.76
Q2-(b): 5pts, avg:3.86, std: 1.99
• (b)For the same three boxes: After choosing a
box at random, a person look at the box and
then intentionally reveal one gold coin. Now
what is the probability that the remaining coin
is also gold [5 pts]
Q2-(b): 5pts, avg:3.86, std: 1.99
Q3-(a): 5pts, avg:3.27, std: 2.18
• (a)Given a group of X people, what is the
probability that at least two of them have the
same birthday (assuming 365 days a year) [5
pts]
Q3-(a): 5pts, avg:3.27, std: 2.18
Q3-(b): 8pts, avg:0.73, std: 2.13
• (b) If you are told the probability in (a) is
roughly 0.5, what is X? (hint: ex ≈ 1+x when x
is small, and e-0.7≈0.5) [8 pts]
Q3-(b): 8pts, avg:0.73, std: 2.13
Q4: 8pts, avg:6.01, std: 3.20
• Show that the variance of an exponential
distribution (with mean θ) is θ2 [8pts]
Q4: 8pts, avg:6.01, std: 3.20
Q4: 8pts, avg:6.01, std: 3.20
Q5: 10pts, avg:6.51, std: 4.74
• Your company must make a sealed bid for a
construction project. Your company will win if
your bid is lower than other companies. If you
win the bid, then you plan to pay another firm
100 thousand dollars to do the work. If you
believe the minimum bid (in thousands of
dollars) of other participating companies can
be modeled as a uniform distribution in
between (70,140), then how much should you
bid to maximize your expected profit (10pt)?
Q5: 10pts, avg:6.51, std: 4.74
Q5: 10pts, avg:6.51, std: 4.74
Q6: 5pts, avg:3.54, std:2.12
Let X be a random variable that represents the number of days that it takes a
high-risk driver to have an accident. Assume that X has an exponential
distribution. If P(X<50)=0.25, compute P(X>100|X>50). (5pt)
Ans:
P(x>100 | x>50)=P(x>100 ∩x>50) /P(x>50)
=P(x>100)/P(x>50)=e -100λ/ e -50λ =0.75
Q7:7pts, avg:4.38, std:2.75
Prof. Chou always finishes his lectures within 2 min when he hears the bell rings. Let
X be a R.V. denotes the time that elapses between the bell-ring and the time he
finish the class, and the pdf of X is kx2, if 0<x<2, and 0 otherwise. This month Prof.
Chou has 4 lectures, find the probability that within this month Prof. Chou finishes
his class within 1 min only one time. (7pts)
Ans:
∫
2
0
→
→
→
Within one minute probability =
kx dx = 1
2
1
∫
3
0 8
x | =1
=1
k =
3 2
k
0
3
8k
3
3
8
x dx = 81
2
Ans = C ⋅ ⋅ ( ) =
4
1
1
8
7 3
8
343
1024
Q8:5pts, avg:2.69, std:2.11
The pdf of X is f(x)=θxθ-1 ,0<x<1, 0<θ<∞, Let Y=-2θlnX, what is the pdf of Y? (5pts)
Ans:
y
−2 θ
P(x ≤ y) = P(-2θ ln ≤ y) = P(x ≤ e )
−y
2θ θ −1
f ( y ) = θ (e )
⋅ | ( )e
−1
2θ
−y
2θ
|= e
1
2
− Y2
Q9:5pts, avg:2.82, std:2.28
Let X have a logistic distribution with p.d.f: f(x)=e-x/(1+e-x)2, -∞< x <∞
Let Y=1/ (1+e-X). What is the distribution of Y? (5 pts)
Ans:
e
−x
=
x = ln
1− Y
Y
Y
1− Y
dx 1−Y 1−Y +Y
= Y ⋅ (1−Y ) 2 =
dy
fY ( y ) =
e− x
(1+ e − x ) 2
×|
(1+ e − x ) 2
e−x
(1+ e − x ) 2
e−x
|= 1 0 < y < 1
Q10:10pts, avg:6.39, std:4.67
Your spaceship is observing the strength of a signal and made 10 observations
as below. Please draw the CDF of this signal (10pts):
0.43, 0.74, 1.16, 3.48, 6.5,
0.68, 0.87, 2.08, 5.75, 13.9
1.20
1.00
13.89642748
6.499250931
0.80
5.747073556
3.476972337
0.60
2.084291842
數列1
1.158539085
0.40
0.872106873
0.740472454
0.20
0.682807508
0.434167688
0.00
0
2
4
6
8
10
12
14
16
Q11: 8pts, avg:4.21, std:3.47
• The mgf of a r.v. X is 1/4et+3/4e3t
The mgf of a r.v. Y is 1/3et+2/3e2t, X and Y are independent.
Q1: What is the mgf of W where W=X-Y? (8 points)
Ans:
From the mgf, PX(X=1) = 1/4, PX(X=3) = 3/4
PY(Y=1) = 1/3, PY(Y=2) = 2/3
Since W=X-Y, W can be {-1, 0, 1, 2}
PW(W=-1) = PX(X=1)*PY(Y=2) = 1/6
PW(W=0) = PX(X=1)*PY(Y=1) = 1/12
PW(W=1) = PX(X=3)*PY(Y=2) = 1/2
PW(W=2) = PX(X=3)*PY(Y=1) = 1/4
Therefore, the mgf of W is
1
1 1
1
M W (t ) = E (etW ) = ∑ etw PW ( w) = e −t + + et + e 2t
6
12 2
4
Q12-(a): 6pts, avg:1.47, std: 1.85
•
Captain Kirk’s (Star Trek) spaceship is under the attack of some aliens from the
“probability planet”. All the space-computer functions are not working except the
“random” function that returns a random number between [0,1]. To avoid crash, a
sequence of data that follows certain distribution needs to be generated. As the
chief scientist of this spaceship, can you try to rescue your crew by finishing the
following task?
(a) It is required to generate a sequence of 10000 data point that follows
binominal distribution b(1000,0.3). Please describe how to achieve this task using
only the random function? (6pts)
Ans:
for i =1:10000
x[i] = 0;
for j=1:1000
y = rand();
z = (y<0.3); // z is a Bernoulli r.v. with p=0.3
x[i] += z;
// x[i] is a sum of Bernoulli r.v.s, thus, x[i] is a Binomial r.v.
end
end
Q12-(b): 10pts, avg:0.48, std:1.64
• (b) It is required to generate a sequence of 1000 data that follows Poisson
distribution of mean 3. How do you propose to do that using only the
random function? (10pts)
Ans:
Poisson(λ) can be approximated by Binomial(n, p), when n is very large and
λ=np.
Let’s assume n=30000, then p = λ/n = 0.0001. Then, similar to part (a), we
have
for i=1:1000
x[i] = 0;
for j=1:30000
y = rand();
if y < 0.0001
x[i]++;
end
end
end
Q13: 15pts, avg:2.51, std:4.97
•
Throwing a needle (of length L) n times on top of a paper containing parallel lines
of spacing D (assuming L<D), assume it is known that the number of times that the
needle crosses a line is m, please prove that [15 pts]
Ans:
RE1: place a needle of length Lv <D vertically in the paper, the probability that it
crosses with the horizontal line is Lv/D
1
D
Lv
RE2: throw a needle of length L and measure its horizontal angle θ. It is a
continuous random variable θ: P(θ)=1/π, θ=[0,π]
The vertical length of RE2 is Lsinθ,
θ
and the probability that it crosses with the horizontal line is Lsinθ/D. The
m
2Ln
expectation value of it is π L sin θ
P
(
θ
)
d
θ
=
,
solve
this
we
will
get
π
=
∫0 D
n
Dm
© Copyright 2026 Paperzz