Probability Distributions and Random Variables, Assignments of Statistics

The probability distributions of continuous and discrete random variables, their cumulative distribution functions, and their relationship with each other. It also covers the concept of expected value and how it can be used to calculate the mean squared error of quantizers. The document further explores the problem of finding the probability mass function of a random variable related to the number of ways distinct colors can be arranged in a sequence.

Typology: Assignments

Pre 2010

Uploaded on 02/24/2010

koofers-user-0c6
koofers-user-0c6 🇺🇸

10 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
University Solutions: Problem Set 10 ECE 313
of Illinois Fall 1998
1. We havea random variable
X
U
(0
;
1)
.
(a) Define the RV
Y
=
,
ln(
X
)
. This is clearly a continuous RV, and hence has a pdf. The graph of
v
=
,
ln(
u
)
is shown below.
00.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
1
2
3
4
5
6
7
u −−>
v −−>
v = −ln(u)
As can be seen from the graph of
,
ln(
u
)
, the ran-
dom variable
Y
takes on all values in
(0
;
1
)
.
The pdf of
Y
can be given as
f
Y
(
v
)=
f
X
(
u
1
)
=
j
g
0
(
u
1
)
j
,where
u
1
is the single root of the equation
v
=
,
ln(
u
)
, and is equal to
exp(
,
v
)
. Accordingly, we have
g
0
(
u
1
)=
,
exp(
v
)
and
f
Y
(
v
)=
e
,
v
; v
0
0
;v<
0
(b) You don’t need to calculatethe pdf of
p
X
for this part! Let
Z
2
be the RV corresponding to the second
decimal digit of the square root of
X
,and
Z
1
be the RV corresponding to its first digit. Both
Z
1
and
Z
2
are discrete RVs, taking on values in
f
0
;
1
;:::;
9
g
.If
Z
1
=
m
, then the probability that
Z
2
=
k
is
given by the probabilitythat
f
10
m
+
k
100
p
X
<
10
m
+
k
+1
g
(why is this true?). Therefore, the
probability that
Z
1
=
m
and
Z
2
=
k
is obtained as
P
f
Z
1
=
m;
Z
2
=
k
g
=
P
f
10
m
+
k
100
p
X
<
10
m
+
k
+1
g
=
P
1
10
4
(10
m
+
k
)
2
X
<
1
10
4
(10
m
+
k
+1)
2
a
=
1
10
4
,
(10
m
+
k
+1)
2
,
(10
m
+
k
)
2
=
20
m
+2
k
+1
10000
Summing over all values that
Z
1
can take, we get the pmf of
Z
2
as
p
Z
2
(
k
)=
9
X
m
=0
20
m
+2
k
+1
10000
=0
:
091 + 0
:
002
k:
(Check and see that this sums to
1
over all values of
k
.)
1
pf3
pf4
pf5

Partial preview of the text

Download Probability Distributions and Random Variables and more Assignments Statistics in PDF only on Docsity!

University Solutions: Problem Set 10 ECE 313

of Illinois Fall 1998

1. We have a random variable X  U (0; 1).

(a) Define the RV Y = ln(X). This is clearly a continuous RV, and hence has a pdf. The graph of

v = ln (u) is shown below.

(^00) 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

1

2

3

4

5

6

7

u −−>

v −−>

v = −ln(u)

As can be seen from the graph of ln (u), the ran-

dom variable Y takes on all values in (0; 1 ).

The pdf of Y can be given as fY (v ) = fX (u 1 )=jg 0 (u 1 )j, where u 1 is the single root of the equation

v = ln (u), and is equal to exp (v ). Accordingly, we have g 0 (u 1 ) = exp(v ) and

fY (v ) =

ev^ ; v  0

0 ; v < 0

(b) You don’t need to calculate the pdf of

p

X for this part! Let Z 2 be the RV corresponding to the second

decimal digit of the square root of X, and Z 1 be the RV corresponding to its first digit. Both Z 1 and

Z 2 are discrete RVs, taking on values in f 0 ; 1 ; : : : ; 9 g. If Z 1 = m, then the probability that Z 2 = k is

given by the probability that f 10 m + k  100

p

X < 10 m + k + 1 g (why is this true?). Therefore, the

probability that Z 1 = m and Z 2 = k is obtained as

P fZ 1 = m; Z 2 = k g = P f 10 m + k  100

p

X < 10 m + k + 1 g

= P

104 (10m^ +^ k^ )

2  X < 1

104 (10m^ +^ k^ +^ 1)

2

=^ a 1 104

(10m + k + 1)^2 (10m + k )^2

= 20 m^ +^2 k^ +^1 10000

Summing over all values that Z 1 can take, we get the pmf of Z 2 as

pZ 2 (k ) =

X^9

m=

20 m + 2 k + 1 10000 =^0 :^091 +^0 :^002 k^ :

(Check and see that this sums to 1 over all values of k .)

2. (a) If Y = sign(X + 2), then Y is a discrete random variable taking on 2 values — +1 and 1.

Y = +1 if X  2 and Y = 1 if X < 2. Therefore

pY (1) = P fX  2 g =

Z 2

2 w 2 dw^ =

 w 1

= 14 ; pY (+1) = 1 pY (1) =

(b) Let us find FY (v ), the CDF of Y. If v represents the value for Y and u represents the value for X, then

the figure below (Fig 1) graphs v = g (u), where g (u) = 2 juj, for juj  2 ; and v = u^2 , for juj  2. First

of all, we see that v takes only positive values. Furthermore, v  2 , because P f 1  X  1 g = 0.

(^0) −2 0 2

4

v = g(u)

(^0) −1 0 1

u −−>

f (u): pdf of X

Figure 1: Top plot: v = g (u), where v and u represent typical values of random variables Y and X respectively.

Bottom plot: pdf of X.

i. If v  2 : P fY  v g = 0 , and so FY (v ) = 0.

ii. If 2  v  4 :

P fY  v g = P

n

v

2 ^ X^ ^

v 2

o

= P

n

v

2 ^ X^ ^ 1)^ [^ (1^ ^ X^ ^

v 2 )

o

= FX (v =2) FX (1) + FX (1) FX (v =2) = FX (v =2) FX (v =2)

since FX (1) = FX (1) (= 1 =2).

iii. If v > 4 :

P fY  v g = P f

p

v  X 

p

v g = FX (

p

v ) FX (

p

v )

by reasoning similar to the above.

Differentiating FY (v ) gives us the pdf of Y. Therefore,

fY (v ) =

0 ; v < 2 1 2

fX (v =2) + fX (v =2)

v 2 ;^2 ^ v^ <^4

p

v

fX (

p

v ) + fX (

p

v )

2 v 3 =^2

; v  4

(c) Quantizers: The trick here is to realize that since the quantizers quantize the received signal about its

mean, you can treat the received signal as a zero mean signal — you don’t have to worry about its

mean, and this makes for easier book-keeping while writing out integrals. Therefore, the quantizers can

be considered to be centered about 0 with X  N (0;  2 ) as the input.

i. Y is a discrete RV in both cases, with 3 and 4 values respectively for Quantizers A and B. The pmf

of Y for both quantizers is given below

Quantizer A Quantizer B

pY (1:5) = P fX > +cg = 1 (c= ) pY (1:5) = P fX > +cg = 1 (c= )

pY (0) = P fc < X  +cg = 2(c= ) 1 pY (0:5) = P f 0 < X  +cg = (c= ) 1 = 2

pY ( 0 :5) = P fc < X  0 g = 1 = 2 (c= )

pY ( 1 :5) = P fX  cg = 1 (c= ) pY ( 1 :5) = P fX  cg = 1 (c= )

ii. To get the value for c we need to carry out the following minimization: min c E [(R Y )^2 ], where

the expectation is with respect to the pdf of R (this is because Y is a function of R, and hence,

(R Y )^2 is a function of R — now we use LOTUS). since the quantizer is centered about E [R],

we can consider a zero-mean version of R^ — call it^ X. Now^ c^ is calculated as the value of^ c^ that

minimizes E [(X Y )^2 ]. For Quantizer A,

E [(X Y )^2 ] = 1

p

 Z c

(u + 1 :5)^2 e^ 2 u^2 du +

Z +c

c

u^2 e^ 2 u^2 du +

Z 1

+c

(u 1 :5)^2 e^

2 u^2 du

Differentiating with respect to c using the fundamental theorem of calculus, and equating to 0 , we

get

(c + 1 :5)^2 e

(c)^2 2  (^2) + c^2 e^

c^2

2  2 (1)  (c)^2 e

(c)^2

2  2 (c 1 :5)^2 e^

c^2 2  (^2) = 0

Since exp ( 2 c^2 2 ) 6 = 0 , we get 2(c 1 :5)^2 + 2 c^2 = 0 , from whence we get c = 1 : 5 = 2 = 0 : 75.

For Quantizer B we can carry out similar a similar integration and obtain c = (1: 5 + 0 :5)= 2 = 1.

(We will have 4 separate areas of integration instead of the 3 for Quantizer A.)

The mean squared errors for the two quantizers (which weren’t asked for) can also be calculated, and

you will observe that the mean squared error for Quantizer B is less than that for Quantizer A.

5. (a) X takes on values from f 2 ; 3 ; : : : ; N + 1 g. X will take on the value k if the previous k 1 colors are

all distinct and the k th^ color is the same as one of the previous k 1. Each pick is an independent trial

with the probability of any color being picked equal to

N (this is because there are an^ equal number

of m&m’s of each color — the number doesn’t matter — and it is sampling with replacement). The

number of ways of arranging k 1 different colors out of N is

N!

(N (k 1))!. Therefore, the pmf of

X is given by

pX (k ) =

N!  (k 1)

(N k + 1)!  N k^

; k 2 f 2 ; 3 ; : : : ; N + 1 g

0 ; elsewhere

(b) The minimum value that the RV Y takes is N , and it takes on values from the set N ; N + 1 ; N + 2 ; : : :

to 1. Let us map the N colors to the numbers 1 ; 2 ; : : : ; N. If Y = k , (k  N ) this means that one

color, say N , occurred for the first time in the k th^ pick, and all the other N 1 colors each occurred at

least once in the previous k 1 picks. Let Ai denote the event that color-i does not occur in the first

(k 1) picks. Another way of looking at the desired event now is

(i) One of the N colors (say N ) occurred in the k th^ pick — call this event B , AND

(ii) None of the events A 1 ; A 2 ; : : : ; AN 1 occurred in the first k 1 trials, i.e., A = (A 1 [ A 2 [    [

AN 1 )c^.

(iii) Get rid of the conditioning on color-N (TTP).

The probability of the event described in (i) and (ii) above is now P^ (AB^ ). This can be written as

P (AB ) = P (B ) P (Ac^ jB ) P (B ) = P (B ) P (A 1 [ A 2 [    [ AN 1 jB ) P (B )

P (B ) = (N^ 1)

k 1

N k^ (this is just the number of ways that^ N^ ^1 colors can be arranged in^ k^ ^1 slots

divided by the size of the sample space, N k^ ), and P (A 1 [    [ AN 1 jB ) can be calculated using Prop 4.

from Chapter 2 of Ross.

P (A 1 [    [ AN 1 jB ) =

NX 1

i=

P (Ai )

X

i 1 ;i 2

P (Ai 1 Ai 2 ) + : : : + (1)N^ ^2

X

i 1 ;::: ;iN 2

P (Ai 1 Ai 2    AiN 2 )

N 1

1

(N 2)k^ ^1

N 1

2

(N 3)k^ ^1 +

N 1

3

(N 4)k^ ^1    + (1)N^ ^2 1 k^ ^1

N k

Therefore

P (AB ) = (N^ ^ 1)

k 1 N k^

NX 1

i=

(1)i^1

N 1

i 1

(N i)k^ ^1

N k^

NX 1

i=

(1)i^1

N 1

i 1

(N i)k^ ^1

N k

The probability of the desired event (= pY (k )) is now obtained by removing the condition on B (i.e.,

that the k th^ color is color-N ). This is done by just multiplying the above probability by N , the number

of possible colors that can go into the k th^ slot. So now, P (A) =

NX 1

i=

(1)i^1

N 1

i 1

 (N i)k 1

N k^ ^1.

We can calculate the above for N = 2 and N = 3 to get an idea of what is going on:

N = 2 : The probability that event A 2 occurs for the first time in the k th^ trial is 1

2 k^ ^1

2 k^

, and

since the k th^ trial could just as well have been A 1 (i.e., two possibilities), P (Y = k ) = 2  1

2 k^

2 k^ ^1

N = 3 : If A 3 is the event occurring for the first time in the k th^ trial, the previous k 1 trials should only

have A 1 and A 2 in them. The total number of possibilities is 2 k^ ^1 2 , where we subtract 2 for the two

outcomes A 1 ; A 1 ; : : : ; A 1 and A 2 ; A 2 ; : : : ; A 2 , both of which are clearly not allowed. Again, the k th

trial could be any of the 3 events. Thus, P (Y = k ) = 3 

2 k^ ^1 2

3 k^ =^

2 k^ ^1 2

3 k^ ^1.