





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
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Sir Tanika Mukopadhyay taught us Probability at Homi Bhabha National Institute. He gave us assignments so that we can practice what we learned in form of problems. Here is solution to those problems. Its main emphasis is on following points: Uniform, Random, Variable, Interval, Probalilities, Random, Textbook, Continuous, PDF, Integers, Segment
Typology: Exercises
1 / 9
This page cannot be seen from the preview
Don't miss anything!
EE 5375/7375 Random Processes September 9, 2003
Homework #2 Solutions
Problem 1. textbook problem 3. Let U be a uniform random variable in the interval [-1,1]. Find the probabilities (a) P (U > 0) (b) P (U < 5) (c) P (|U | < 1 /3) (d) P (1/ 3 < U < 1 /2) (e) P (|U | ≥ 3 /4).
(a) The pdf for U is fU (u) = 1/2 for − 1 ≤ u ≤ 1. P (U > 0) =
0
1 2 du^ =^
1
(b) P (U < 5) =
− 1
1 2 du^ = 1. (c) P (|U | < 1 /3) = P (− 1 / 3 < U < 1 /3) =
− 1 / 3
1 2 du^ =^
1
(d) P (1/ 3 < U < 1 /2) =
1 / 3
1 2 du^ =^
1
(e) P (|U | ≥ 3 /4) =
− 1
1 2 du^ +^
3 / 4
1 2 du^ =^
1 8 +^
1 8 =^
1
Problem 2. textbook problem 3. A random variable Y has the PDF
FY (y) =
0 if y < 1 1 − y−n^ if y ≥ 1
where n is a positive integer. (a) Plot the PDF of Y. (b) Find the probability P (k < Y ≤ k + 1) for a positive integer k.
(a) The PDF is shown in Fig. 1. (b) P (k < Y ≤ k + 1) = FY (k + 1) − FY (k) = 1 − (k + 1)−n^ − (1 − k−n) = k−n^ − (k + 1)−n.
Problem 3. textbook problem 3. A continuous random variable X has the PDF
FX (x) =
0 if x ≤ −π/ 2 c(1 + sin(x)) if −π/ 2 < x ≤ π/ 2 1 if π/ 2 ≤ x
(a) Find c. (b) Plot FX (x).
(a) A continuous random variable must have a smooth PDF without discontinuities. Therefore c must satisfy (i) c(1 + sin(−π/2)) = 0 and (ii) c(1 + sin(π/2)) = 1. Condition (i) is satisfied for every c because 1 + sin(−π/2) = 0. Condition (ii) is c(1 + sin(π/2)) = 2c = 1, so c = 1/2. (b) The PDF is shown in Fig. 2.
Problem 4. textbook problem 3. Let X be an exponential random variable with parameter λ. (a) For d > 0 and a positive integer k, find the probabilities P (X ≤ d), P (kd ≤ X ≤ (k + 1)d), and P (X > kd). (b) Segment the positive real line into 5 equiprobable disjoint intervals.
(a) The exponential pdf is fX (x) = λe−λx^ and PDF is FX (x) = 1 − e−λxfor x ≥ 0. Hence
P (X ≤ d) = FX (d) = 1 − e−λd P (kd ≤ X ≤ (k + 1)d) = FX ((k + 1)d) − FX (kd) = 1 − e−λ(k+1)d^ − (1 − e−λkd) = e−λkd(1 − e−λd) P (X > kd) = 1 − FX (kd) = e−λkd
1
(b) The problem is to find {X 1 , X 2 , X 3 , X 4 } where FX (X 1 ) = 1/5, FX (X 2 ) = 2/5, FX (X 3 ) = 3/5, and FX (X 4 ) = 4/5. In general, FX (Xi) = i/5 for i = 1, 2 , 3 , 4. These points will divide the real line into 5 equiprobable intervals. We have FX (Xi) = 1 − e−λXi^ = i/5, therefore
1 − e−λXi^ =
i 5 1 − i 5
= e−λXi
Xi = −
λ ln
i 5
That is,
X 1 = −
λ
ln
λ
ln
λ
ln
λ
ln
Problem 5. textbook problem 3. A random variable X has the pdf
fX (x) =
cx(1 − x) if 0 ≤ x ≤ 1 0 otherwise
(a) Find c. (b) Find P (1/ 2 ≤ X ≤ 3 /4). (c) Find FX (x).
(a) The pdf must integrate to 1:
∫ (^1)
0
cx(1 − x)dx =
0
cxdx −
0
cx^2 dx =
c 2
c 3
c 6
so c = 6. (b) P (1/ 2 ≤ X ≤ 3 /4) =
1 / 2 6 x(1^ −^ x)dx^ = 3^
4
2
4
2
(c) FX (x) =
∫ (^) x 0 6 y(1^ −^ y)dy^ =^
∫ (^) x 0 6 ydy^ −^
∫ (^) x 0 6 y
(^2) dy = 3x (^2) − 2 x (^3).
Problem 6. textbook problem 3. A random variable X has the pdf shown in Fig. P3.2. (a) Find fX (x). (b) Find the PDF of X. (c) Find b such that P (|X| < b) = 1/2.
(a) The pdf has a symmetric triangular shape:
fX (x) =
c
1 − |x a|
if |x| ≤ a 0 if |x| > a
The area of the triangle is c(2a)/2 but this must equal 1, so c = 1/a. (b) The PDF is found by integration of the pdf. First, FX (x) = 0 for x < −a. Second, for −a ≤ x ≤ 0,
FX (x) =
∫ (^) x
−a
a
y a
dy =
a
x +
x^2 2 a
For 0 ≤ x ≤ a,
FX (x) =
∫ (^) x
0
a
y a
dy =
a
x −
x^2 2 a
Finally, for all x > a, FX (x) = 1. (c) We have
P (|X| < b) =
= FX (b) − FX (−b) =
a
b − b^2 2 a
(d) P (N = k|N ≤ m) = P^ (N^ = Pk (Nand ≤m^ N) ≤m)= (^) PP (^ (NN ≤^ =mk)) = p(1−p)
k 1 −(1−p)m+1^ for 1^ ≤^ k^ ≤^ m.
Problem 9. textbook problem 3. Prove the memoryless property of the geometric random variable:
P (M ≥ k + j|M > j) = P (M ≥ k)
for all j, k > 0. In what sense is M memoryless?
We can show the memoryless property by
P (M ≥ k + j|M > j) =
P (M ≥ k + j and M > j) P (M > j)
=
P (M ≥ k + j) P (M > j) for k ≥ 1
i=k+j p(1^ −^ p) i− 1 ∑∞ i=j+1 p(1^ −^ p) i− 1
(1 − p)k+j−^1 (1 − p)j = (1 − p)k−^1 = P (M ≥ k)
This says that the probability of k additional trials until the first success is independent of how many failures have already occurred (i.e., the future number of trials does not depend on the past).
Problem 10. textbook problem 3. The rth percentile, Pr , of a random variable X is defined by P (X ≤ Pr ) = r/100. (a) Find the 90%, 95%, and 99% percentiles of the exponential random variable with parameter λ. (b) Repeat part (a) for the Gaussian random variable with parameters m = 0 and σ.
(a) The exponential random variable has PDF P (X ≤ Pr ) = 1 − e−λPr^ = 100 r. Solving for the rth percentile, Pr , we have
Pr = −
λ
ln
r 100
For the 90%, 95%, and 99% percentiles,
λ
λ
λ
(b) If X is a normal random variable with mean m = 0 and variance σ^2 , the PDF can be found from the standard normal distribution by P (X ≤ x) = Φ
( (^) x σ
. We can look up the percentiles from any table of Φ(x). The 90% percentile Φ
( (^) x σ
= 0.9 occurs when xσ = 1.28, so P 90 = 1. 28 σ. Similarly, the 95% percentile Φ
( (^) x σ
= 0.95 occurs when xσ = 1.5, so P 95 = 1. 5 σ. The 99% percentile Φ
( (^) x σ
= 0.99 occurs when xσ = 2.33, so P 99 = 2. 33 σ.
Problem 11. textbook problem 3. A communication channel accepts an arbitrary voltage v and outputs a voltage Y = v + N where N is a Gaussian random variable with mean 0 and variance σ^2 = 1. Suppose that the channel is used to transmit binary information in this way: an input of -1 causes a transmission of 0, and an input of +1 causes a transmission of 1. The receiver decides a 0 was sent if the voltage is negative and a 1 otherwise. Find the probability of the receiver making an error if a 0 was sent; and if a 1 was sent.
4
An error is made if the input was -1 but the output is positive (then the receiver will decide the transmission was a 1). The conditional probability is
P (error|v = −1) = P (Y ≥ 0 |v = −1) = P (v + N ≥ 0 |v = −1) = P (N ≥ 1) = 1 − Φ(1) = 0. 159
Similarly, an error is made if the input was 1 but the output is negative (then the receiver will decide the transmission was a 0). The conditional probability is
P (error|v = 1) = P (Y < 0 |v = 1) = P (v + N < 0 |v = 1) = P (N < −1) = Φ(−1) = 1 − Φ(1) = 0. 159
Problem 12. textbook problem 3. Messages arrive at a center at a rate of one message per second. Let X be the time for the arrival of 5 messages. Find the probability that X < 6; and that X > 8. Assume that message interarrival times are exponential random variables.
When interarrival times are exponentially distributed, then the number of arrivals within a certain interval is a Poisson random variable. Suppose the interarrival times are exponential with parameter λ, then the number of arrivals N during an interval (0, t) has the Poisson PMF
P (N = k) = e−λt^ (λt)k k!
The event {X < 6 } means that the 5 arrivals have occurred within the interval (0,6), or there are at least 5 arrivals within (0,6). The probability of this event can also be found as
P (5 or more arrivals in (0,6)) = 1 − P (up to 4 arrivals in (0,6))
k=
e−λ^6
(λ6)k k!
Since the arrival rate λ = 1, this probability becomes
P (5 or more arrivals in (0,6)) = 1 −
k=
e−^6
6 k k!
The event {X > 8 } corresponds to the event that the 5 arrivals took longer than (0,8), or there are 4 or less arrivals within (0,8). The probability of this event is
P (4 or less arrivals in (0,8)) =
k=
e−^8
8 k k!
Problem 13. exponential The PDF of a random variable X is given by FX (x) = 1 − e−x^ for x ≥ 0. The probability of the event {X < 1 or X > 2 } is (a) 0.914 (b) 0.767 (c) 0.632 (d) 0.135 (e) 0.041.
5
the professor will arrive between 8:30 and 8:31, which is one minute. Since the arrival time is uniformly distributed over an hour, the probability of arriving within a one-minute interval is the ratio of 1 minute to 60 minutes, or P (A ∩ B) = 1/60. Now, P (A) is the probability that the professor will arrive between 8:30 and 9:00, which is 30/60 = 1/2. Putting these probabilities together, P (B|A) = 11 //^602 = 1/30. (b)
Similarly, P (A|B) = P^ ( PA (∩BB) ). In this case, P (B) is the probability of arriving between 8:00 and 8:31 which is 31 minutes out of the 60 minutes, so the probability is P (B) = 31/60. Putting the probabilities together,
P (A|B) = 311 //^6060 = 1/31.
Problem 16. Matlab (optional for EE 5375) Start Matlab and use the uniform random number generator rand to generate 300 random samples by typing:
x=rand(300,1); Take a look at the histogram of these numbers by typing: hist(x)
The histogram should look fairly flat. Uniformly random numbers {X 1 , X 2 ,.. .} can be converted to expo- nentially distributed numbers by Yi = − (^) λ^1 ln(Xi). Let us generate exponential numbers by typing:
lambda = 0.5; y = -1 * log(x)/lambda; Take a look at the histogram of these numbers by typing: hist(y) This histogram should appear to decrease exponentially. We can also directly generate exponentially dis- tributed numbers by the command exprnd. The online information about exprnd can be retrieved by typing: help exprnd We can use exprnd to generate 300 exponential numbers by typing: y = exprnd(0.5,300,1) Take a look at the histogram of these numbers by typing: hist(y) Again, this histogram should appear to decrease exponentially. Next, we can generate normally distributed numbers by the command normrnd. Get the online information about normrnd by typing: help normrnd Generate some normal numbers and look at their histogram by typing: z = normrnd(0,1,300,1); hist(z) The shape of the histogram should look like a “bell curve.” What is the mean and variance of the distribution?
The mean and variance are the first 2 parameters of the normrnd command. In this case, the numbers were generated by normrnd(0,1,300,1) so the mean is 0 and variance is 1.
fx(x)
-a 0
x
a
x