p robability 1 07. midterm practice condition independence 郭俊利 2009/04/13
Post on 20-Dec-2015
215 views
TRANSCRIPT
1
Probability
07. Midterm Practice
ConditionIndependence
郭俊利 2009/04/13
2
ProbabilityConcept
Homework
p(n) > 1 Discrete
f (x) > 1 Continuous
F(x) > 1
2.1 ~ 4.1
3
ProbabilityBasic Probability
Set P(A∪B∪C) =
P(A) + P(AC∩B) + P(AC∩BC∩C) Condition
P(A∩B∩C) = P(A) P(B|A) P(C|A∩B) Independence
P(A∩B) = P(A) P(B)
Problem 1.31 – error bit
4
ProbabilityExpectation
E[a] = a E[aX + b] = aE[X] + b E[g(X)] = Σx g(x) px(x) E[X] = Σi E[Xi] = np (p is uniform!)
E[X] = Σi P(Ai) E[X | Ai] E[X] = E[E[X|Y]]
var(aX + b) = a2 var(X)
5
ProbabilityGraph
Mean Center (not find f(x))
Variance E[X2] – E[X]2 (need f(x) or formula)
f(x)
x
1/3
2/3
1 2
6
Probability
7
ProbabilityOther E.V.
Independence
E[XY] = E[X] E[Y] var(X + Y) = var(X) + var(Y)
Sum
E[T] = E[X] E[N] var(T) = var(X) E[N] + E2[X] var(N)
T = X1 + … + XN
f(x, y) = f(x) f(y)
8
ProbabilityConditional Sum of Independence 1st
Let X1, X2 and X3 be independent and identical binomial random variables, that is, P(Xi = k) = Cn
k pk (1 − p)n−k, 0 ≤ k ≤ n. Compute the P(Z = X1 + X2 + X3) Compute E[Z], var(Z)
E[] = np ; var() = np(1-p)
9
Probability
10
ProbabilityJoint
fX,Y(x,y) = fY(y) fX|Y(x|y)
X, Y are independent, X and Y are in [0, 2].fXY(x, y) = xy / 4, find E[f(x, y)]
Double integration or…∵ f(x, y) = f(x) f(y)
∴ f(x) = x / 2 f(y) = y / 2 or
f(x) = x f(y) = y / 4
11
Probability
12
ProbabilityImportant Random Variable
Bernoulli pX(k) = p, 1-p
Binomial pX(k) = Cn
k pk (1 – p)n – k
Geometric pX(k) = (1 – p)k-1 p
E[X] = p var(X) = p(1-p)
E[X] = np var(X) = np(1-p)
E[X] = 1/p var(X) = (1-p)/p2
13
ProbabilityGeometric random number
Xiao-Quan plays a game rock-paper-scissors with another. He plays until he loses. Find the expectation of the number of rounds. If Xiao-Quan has won 3 times and drawn 2 times,
how many rounds will he expect to play?
Problem 2.22, 2.23 Non-memoryless
14
ProbabilityConditional Sum of Independence 2nd
Suppose that X and Y are independent and identical geometrical random variables with parameter p, that is,P(X = k) = P(Y = k) = qk−1p, k ≥ 1.
Compute P(X = i | X + Y = n), i = 1, 2, ..., n − 1. Compute E(X | X + Y = n), var(X | X + Y = n).
P(X = i | X + Y = n) = P(X = i ∩ X + Y = n)
P(X + Y = n)
=P(X = i ∩ Y = n – i)
P(X + Y = n)
=P(X = i) P(Y = n – i)
P(X + Y = n)= 1 / n-1
15
ProbabilityExponential random number
f(x) = λe–λx
P(x a) =∫≧ a∞ λe–λx dx
= –e–λx | a∞ = e–λa
F(x) = 1 – e–λx (Geometric F(n) = 1 – (1–p)n)
E[X] = 1 / λ var(X) = 1 / λ2 (E[X2] = 2 / λ2)
16
ProbabilityExponential Examples
The spent time of work is modeled as an exponential random variable. The average time that Xiao-Ming completes the task is 10 hours. What is the probability that Xiao-Ming has done this task early (in advance)?
f(x) = ½ λe–λx, x ≥ 0 ½ λe+λx, x < 0
F(x) = ?
17
Probability
18
ProbabilityCondition
P(A|B) = P(A∩B) / P(B) pX|A(x) = P({X = x}∩A) / P(A) fX|A(x) = f(x) / P(A)
Roll a fair die shown k points, what is the probability p(k) given some roll is even number?
Xiao-Wang arrivals is a uniform random variable from 7:10 to 7:30. The bus comes at 7:15 and 7:30. What is the waiting time f(x) of Xiao-Wang?
Show exponential random number is memoryless.
19
Probability
20
ProbabilityNormal random number
Standard normal distribution N(–a) = P(Y ≦ –a) = P(Y ≧ a) = 1 – P(Y ≦ a)
N(–a) = 1 – N(a) CDF
P(X ≦ a) = P(Y ≦ ) = N( )a – μσ
a – μσ
The grades of the exam is suitable for a normal random variable. The average of grades = 60 and the standard deviation = 20. What is the probability that Xiao-Kuo’s grade will be higher over 70?
21
ProbabilityF() and f()
Derived
Linear Y = aX + b
General y = g(x), x = h(y) y = g(h(y))
fY(y) = fX( h(y) ) |h’(y)|
22
ProbabilityDerived Distribution
Find the PDF of Z = g(X, Y) = Y/X
FZ(z) = 0 ≤ z ≤ 1 FZ(z) = z > 1
fZ(z) =
23
ProbabilityLinear Mapping
X is an exponential random variable,Y = –λX + 2, Find the PDF of Y
f(x) = λe–λx
f(y) = e–λ(y-2 / –λ)
= e y-2
λ
|-λ|
24
ProbabilityTravel Problem
Xiao-Hua is driving from Boston to New York 180 miles. His speed is uniformly distributed between 30 and 60 mph. What is the distribution of the duration of the trip?
fV(v) = 1 / 30 30 ≤ v ≤ 60
T(v) = 180 / v
fT(t) = fV(v) T(t)’ = 6 / t2
25
Probability
26
ProbabilityConvolution
W = X + Y PW(w) = Σ PX(x) PY(w – x)
W = |X| + 2Y
p(x) = 1/3, if x = –1, 0, 1
p(y) = 1/2, y = 0 1/3, y = 1 1/6, y = 2
27
ProbabilityMaximum
W = max {X, Y} (X, Y = [0, 1] uniformly)
W = max {X, Y} (X, Y = 0.1, 0.2, …, 1.0 uniformly)
P(X≦w) = P(Y≦w) = w
FW(w) = P(X≦w) P(Y≦w) = w2
fW(w) = 2w
pW(w) = FW(w) – FW(w – 0.1)
= w2 – (w–0.1)2