




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A final exam in probability by prof. Shou-de lin, including problems related to probability density functions, dice throws, company bids, random variables, correlation coefficient, hypothesis test, chi-square test, mutual information, bayesian network and association rule, tfidf, social network analysis, and n-gram language model.
Typology: Exams
1 / 8
This page cannot be seen from the preview
Don't miss anything!





Instructor: Prof. Shou-De Lin 14:30 ∼ 17:30, Wed., June 19th, 2008
fX (x) =
2 πσ
e−^
(x−μ)^2 2 σ^2.
What is the probability density function of Y = eX^? (5 points) Ans. P (Y ≤ y) = P (eX^ ≤ y) = P (X ≤ ln y), and therefore
fY (y) =
dP (Y ≤ y) dy
dP (X ≤ ln y) d ln y
d ln y dy
=
y
2 πσ
e
−(ln y−μ)^2 2 σ^2 , 0 < y.
P (B has more ‘6’s than A) =
then what is the probability that A and B have equally many ‘6’s after throwing the dice n times? (7 points) Hint: conditioning on which player has more ‘6’s after each has thrown n times Ans. Let A and B respectively throw An and Bn ‘6’s in n times. The probability that B has more ‘6’s than A is 5 12
= P (Bn > An) + P (Bn = An)P (B throws a ‘6’ in the (n + 1)th time)
1 − P (Bn = An) 2
P (Bn = An) 6
so P (An = Bn) = 1/4.
(a) Suppose your bid is x, what is the probability that you win? (4 points) Ans. When x ∈ [0, 70), we will win. When x ∈ [70, 140), we only have to beat the company whose bid is in [70, 250]. Therefore, the probability to win is
250 − x 180
When x ∈ [140, 250], we need to beat both of the competitors, so the winning probability is (^) ( 250 − x 180
300 − x 160
When x > 250, we will lose. (b) Suppose your bid is x, what is the expected profit? (2 points) Ans.
expected profit =
x − 100 if x ∈ [0, 70), (x−100)(250−x) 180 if^ x^ ∈^ [70,^ 140), (x−100)(250−x)(300−x) 180 · 160 if^ x^ ∈^ [140,^ 250], 0 if x > 250.
(c) Determine the x that maximizes your profit. (2 points) Ans. x = (1300 − 100
13)/ 6 ≈ 156 .57, the maximum expected profit is (156. 57 −100)(250− 156 .57)(300− 156 .57)/(180·160) ≈ 26 .32 thousand dollars.
(a) X and Y are independent. (b) X and Y become dependent given Z.
Ans. X: father’s blood type, Y : mother’s blood type, Z: their child’s blood type.
(a) Given α = 0.025, what is the critical region? (5 points) Ans. Let n be the sample size and y be the number of positive votes. The critical region for α = 0.025 is
z =
y/n − 0. 65 √ (0.65)(0.35)/n
(b) Given that 414 out of a sample of 600 favor this proposal, find the p-value. ( points) Ans. z =
and the p-value ≈ P (Z ≥ 2 .054) = 0.0200. (c) Should we reject or accept H 0? (2 points) Ans. Since z > 1 .96 and the p-value < 0 .0250, we reject H 0 at an α = 0. 025 significance level.
I(T ; F ) = H(T ) − H(T |F ) = log 6 − log 4 = log 3 − 1 ,
since T has a uniform distribution on { 1 , 2 ,... , 6 }.
(a) Define the random variables and draw the Bayesian network (with conditional probability table) for this statement. (2 points) Ans.
(b) What is the probability that a randomly chosen student is a Taiwanese who gets high score? (3 points) Ans. P (T, H) = P (T )P (H|T ) = (2/3)(1/2) = 1/3. (c) Given an association rule that says “Japanese = true” → “score = high,” please provide a pair of “reasonable” min-support and min-confidence that make this rule true. (5 points) Ans. The answers have to satisfy the following conditions:
W
H
F
please calculate P (W, F ). Ans. P (W, F ) = P (W, F, H) + P (W, F, ˜H), but P (W, F, H) = 0. Therefore it suffices to compute
P (W, F, ˜H) = P (W, F |˜H)P (˜H) = P (W |˜H)P (F |˜H)P (˜H)
=
(Given S, W is independent of H)
=
Corpus C consists of only three documents:
D 1 : “new york times” D 2 : “new york post” D 3 : “los angeles times”
calls emails calls calls
calls
There are six paths of length 2:
Sue −calls−−→ N 1 −^ calls−−→ Jean
Jean emails −−−−→ Sue emails −−−−→ P 1
Jean emails −−−−→ Sue calls −−−→ N 1
N 1 calls −−−→ Jean calls −−−→ C 1
N 1 calls −−−→ Jean calls −−−→ P 1
N 1 −^ calls−−→ Jean −emails−−−→ Sue
If we perform a random experiment to pick a length-2 path randomly, and define two random variables S and P : S: the starting node of the path (e.g., “Sue”) P : the link-combination of the path (e.g., {calls, emails}, {calls, calls})
(a) What is the size of P ’s outcome space? (2 points) Ans. 4. (b) What is the mutual information I(S; P )? (5 points) Ans. We need to average all possible combinations of PMI(S,P ):
1 6
log
1 6 1 6 ·^
1 2
log
1 6 1 3 ·^
1 6
log
1 6 1 3 ·^
1 6
log
1 3 1 2 ·^
1 2
log
1 6 1 2 ·^
1 6
= log 2.
(c) Assume that min-support is 0.3 and min-confidence is 0.7, can we conclude an association rule N 1 → {calls, calls}? Why? (3 points) Ans. No. Although support = 2/6 = 1/ 3 > min-support, confidence = 2/ 3 < min-confidence. (d) Assume the initial PageRank values for each node is 0.2. Which node(s) have the highest PageRank values after two iterations? (5 points) Ans. Let “∼=” denote normalization.
Sue 15 13 · 15 ∼= 19 13 · 13 ∼= 112 Jean 15 1 · 15 ∼= 13 1 · 16 ∼= 113 N 1 15 12 · 15 ∼= 16 12 · 19 ∼= 111 P 1 15 12 · 15 + 13 · 15 ∼= 185 12 · 19 + 13 · 13 ∼= 113 C 1 15 13 · 15 ∼= 19 13 · 13 ∼= 112 Therefore, Jean and P 1 have the highest PageRank values after two iterations.
Can you carefully describe a way to use n-gram LM to do this job? Hint: You need to determine not only where to put the breaks but also how many breaks there are. Ans. A plausible answer is as the following. First calculate the bi-gram probability for each term (using the poetry corpus), for example The second step is to choose
some break points. Assuming each break is a binary decision, then in this case we will have 2^6 different choices. For each case, we can calculate the corresponding probability. For example, in the following case the probability is (0. 5 × 0. 7 × 0. 3 × 0 .5)/3 (we normalize the values by diving the whole probability by the number of sections).