DISCRETE RANDOM VARIABLES
A Random Variable associates a value to every possible
outcome
Mathematically function from Sample space s to
a
the real numbers a random variable can take
Discrete or continuous Values
We have several random variables defined on the
can
same sample space A function of one or several
random variables is also a random variable
Probability Mass Function Discrete Random Variable X
of
It is the Probability Law or Probability Distributionof
X then X x is an
event If we
fix some x
PED P WE Rst XCW xD
pyo
p a 20 or
Ipx 64 1
n't
X
s a plab7 Ya
s
plot
i a pld t
d
3
Probability
I
Calculating PMF
For two rolls of a tetrahedral die ie H faced die
9
5 6 7 8
3 4 5 6 7
4 SecondRoll
of Die 2
3 4 56
I 2 3 4 5
Rod Die
X First of
Let every possible outcome have a probability of 1 16
Z X Y
to find plz
collect all possible outcomes which 2 3
add their probabilities for
pay
o
g illiii
Bernoulli's Random Variable Parameter
with p Eco
I up p
x
o
up t t
It models a trial that results in either a or
H or T etc
Indicator Random Variable of an event A
L A
Ia iff occurs
Discrete Random Variable params a 2b
Uniform
Parameters integers a b as b
Experiment Pick one
of a at 1 b at random
all equally likely
Sample Space a atl b b att possible values
Random Variable X X w W
Model
of complete ignorance
a a
special case a b
bin pyx
It I
a att b K a 2
Binomial Random Variable
Param positive integer n
PE 0,1
tosses a coin with
Experiment n independent
PCHeads of
p
Random Variable X number of Heads observed
Model
of Number
of successes in a
given number of
independent trials
n
p
I P 3
HHT
p ni
IP P HTH
p go 2
p TH H 1
t t b
pp
THT go
Ip
TTH 700 O
TTT
Px Ck 1 place pink K O I
for
n
Geometric Random Variable
Param O
p pet
Experiment Infinitely many independent tosses of a coin
P Heads
p
Sample space Set of infinite sequences of H T
Random Variables X no
of
tosses until the first Heads
Model
of waiting times no
of trials until a success
Px k P no heads ever
pxlb p lb
I a s n s d e to
8fection Mean a Random Variable
of
gain at
Motivation 1000 times Random
Play a
game
each described
play is
by
I 2 wp 5110
I
Interpretation Average in large number of independent
repetitions of the experiment
Definition EG I xp x
Caution
If we have infinite sum it needs to be
well defined
We assume
I 14pyle a
Expectation of a Bernoulli's Random Variables
to up p
mo p Ip
X is the indicator event A
If of an
Expectation of a Uniform Random Variable
Efx Expxco
Elementary Properties of Ecpectation
Y X20 then EXT 20
as x sb then EEXTeb a constant
Ifthen ECC C
as
if e is
The expected value rule calculating ELg x
for
Let X be a v.v and let y g x
ELY
Averaging our
g Jyp ly
Averaging our x ELY E Eg X
Eg 2 px x
In general Ecg X EX
g
Linearity of Expectation E Lax b a ECxJtb
n
g 5
or 5
0.3 so 4
p
prob
3 3.3
25 o 2
Variance A measure
of the spread of a PMF
Random Variable X with mean M EXT
Distance mean X te
from
Variance var X E CX 1413
Standard Deviation Ox ay
Properties Variance
of
var lax b a'var x
Notation
ME EX
Let Y Xtb where Y ax
var X EXT CENT
of Bernoulli's
Variance
x
to up p
w.p I p
var x EG EET px x
var x E X EXT
Conditional PMF and expectation
Condition on an event A use conditional probability
px x P xx pya CA PIX HA
Ipx x I E pXIA D I
EEx EAX x ELNA Expxia x
EcgCx Eg a PXCD Ecg X AJ Egenpxla x
Total Expectation Theorem
AnB
A PCB PCA PCBA t Plan PCBAn
a
At
AT AzOB
for fox is
Similarly x
Px a PCA
px A x t Plan PX An Ca
EX PRADECXIA It PLANE EX An
Conditioning A Geometric Random Variable
X no
of independent coin tosses until first head PCH
p
Px k I f he 1,2
p
pick Memorylessness No of
remaining
coin tosses conditioned on Tails in
the first toss is geometric
with parameter p
I m
Conditioned on X 1 X 1 is geometric with parameter
p
The mean
of geometric
EX Ekpx Ck ÉkCI pimp
EXT
Ip
Multiple Random Variable and joint PMF's
x px
Y py
Joint PMF x Px x
24 y
px y y
I
Eye PX Y x
y
Y x
foxed Ipx y
pyly Efx 4 x y
The mean
of Binomial
X binomial with parameters n
p
no
of successes in n independent trials
where Xi I ith trial
ifotherwise success
Xi O
X X Xat Xm
EX É k
I p Cy pink
or in simple words EXT np
Conditional PME
PYA HA P X KIA foxy PIX MY y
Hy
such that pyly so
fay Hy [Link]
defined
for y
Ep xx Hy 1
Conditional PME involving more than two R V
pay z k ly
z on
fx y1z x
yz
we can simplify with regards to Multiplication Rule
PCAABAC PCA P BIA P CIANB
Px4,2 x
yz fox x
pyx Cylon fax 212y
Conditional Expectation
EX Exp xGc ECHAT Expxia x EE Y yFExpxiyG4y
The expected Value rule
ECG x E gG4pxGD [Link]
Ecg x y y EgGopxlyGuy
Total Probability and Expectation Theorem
Ai An partition of a
Px 2 PCA
pya a t Plan pxlAnCx
EX EX Y y
Jpy y
it is also valid when Y is a discrete RV that ranges
over an infinite net as long as ECX1 a
Independence
of two events PLANB PLA PCB
of a R V and an event PIX x A P X D PLA Fx
of two R V's PCx x2Y y Px x PLY y it x
y
f x
[Link] pxcopy y y
X Y Z are independent
if
2 A n
fox 4,2 x
yz px x pyly pz yz
Independence 1 Expectation
In general E Eg Xy
g CECI ELY
Exceptions Elaxt b aE x tb
E XtY ZJ EEP ELY EEZ
If X Y are independent ECXYJ ELSECY
also
g x and h ly are independent
Ecg Ahly ECG x ECKCYD
Independence Variances
Always true var ax a'var x var xta var x
In general var xty var X var y
if X Y are independent var City varix var Y
Variance
of the Binomial
X binomial with parameters n f
number of success in n independent trials
Xi I ith trial
Xi 0
if otherwise is a success
X X Xat Xm
Continuous Random Variables
A R.V is continuous
if it can be described
by
a PDF
pain
Plas XE b
Plas X Ib [Link]
bxG pxlnlzoEpxCd
1 fyi20 ffkldx l
Plaexsb dx
fx sc
Probability Density Function PDF
Places at 8 Eff Ca 8 Plas Xsb f fxcudx
P x a O
Jfk 20
1 feudal
Expectation Mean of a continuous random variable
Interpretation Average in large no of independent
repetitions of the experiment
EX Expx x EEN
f xfx Goda
assume
[Link]
Properties Expectations
of
X 20 then EX 20
J
X sb then as EXT Eb
J as
Efected Value Rule
Ecg x
EgGDfoxed I get fx Code
E x'J J X
f Goda
Linearity
ElaXtb a EETtb
Variance and its Properties
Definition var x ECCX 111 T where
H ECX
value rule
Calculation
using the expected
EEg x
Igloofx Code
var x
12 x a f Golda gac x
pet
Standard Deviation ox Tax
var lax tb a'var x
var X EXT CECH
Continuous Uniform Random Variable params a b
find a paid n
bat
I I a att
EXT ALL
b
E x
f xfxGodie
du
fab no Ia att
EXT Joe b
Fa
da
ya g
EXT EXT
var X
Standard Deviation
BEI
big
t
Exponential Random Variable params X'so
fixed fx Go
E
Ci p p
I tr
te azo
fan xc o
O
E x
Tx Xé doc
I
E X
Jail e dx
Ig
var x E X CE XJ
PC x2 do
a
fixe
ea a s t
feudal at
t C e
ng
ta
e [Link] e
lead
Standard Normal Gaussian Random Variable
Standard Normal N O 1
J die ran
fx x e e
EX O
var x 1
x
General Normal Gaussian Random Variable
2 Ck mat
General NCpe 0
fx x
fye
EX he war x o
A A
normal o smaller a
Linear Function normal random variable
of a
Let y ax tb X V N
fu o
ELY qutb
var Y aka
Fact Yu NCalutb att
Conditional PDF an event
given
fox x P xx N S E PCRSX ext g
P
yay SEP KEX 8
f A
EX
Pxia x XIA a
PHEBE EBpx P XE B Goda
Ifx
x
PCXEBIA ZapXIA CD PCXEBIA Gtxlaced
Epxialic 7 ft a codicil
conditional PDF X that XEA
of given
PLEX IN SIX EA Efx YEA CK S
[Link]
PCxspcExtIItXpEy
fxixen is A
yo
FIT if Kea
Conditional Expectation event
of X given an
EX Espy Cio EXT fxfxcudx
E XIA Eapxia Gc ECXIAT xia Gada
Expected Value Rule
E glx I glopx Gc ELglxD
fgGdfxao sEEgCxllAT
EgGopxla [Link] [Link]
Memorylessness
of the coponential PDF
Do prefer a used or a new coponential
you
bulb
light
Bulle lifetime T cofonential X
PCT D é 220
for
we are told that t t
r v X remaining lifetime T t
Now
p x KIT t E for 220
PCT
[Link] PltottEn
t
eF
e
PCEEE
X
Xe 220
fila for
PCOSTS 8 a FCO S XS
PCETEESIT E ITS
Total Probability Expectation Theorem
A AND
PCB Pla PLBApt PLAN PCBAm
A AND
[Link] a Got tPCAmlpxIAC2
at Aonb
p yea P CAPP XENA
fx a
PCA
t
FLA 2 t
PCAR
EXAM
EX PCADEENAJ PLAMIECHAM
PLAN
ECXIAL
PLAN
E XIAO
lg Bill goes to the supermarket shortly with prole
13 at a time uniformly distributed b w 0 2
hours or with probability 2 3 later in the
day at a time uniformly distributed b w 6 0
hours from now
PCA
as
31 fila unit 0,2
P A2 23 fxia V
unit 6,83
EX PCADECHAI PCADEGLAD
x1 t 7
3 n
43
It 116
IT o
Mixed Distributions
X on 0,27 with prob 112
ugiform
with prob 112
Y is discrete wilt prob p
z a continuous I with prob I p
FxGc PCYe Nt CI p PC D
f
pFyGot I p Ecu
ECXJ PECYTT CI P JEEZ
X uniform on
0,27 with prob ya CA
with prob 112 Aa
Fx a [Link] PCAA FIA CD
Fxlan FXAyla
l 112 l
ppg
o I o
FxCu
Slope Yy
y
4a slope
I I
0
I 2 I
Jointly Continuous R V's and joint PDF
Two random variables can be jointly continuous
be described PDF
if they can by a
joint
foxy G g P X x 24 4720 Jx y Cosy 20
PAX y EB Ey É pay Cosy Plex41GB fxyGpd
f
CgEB
I l
EFpx y Cosy [Link]
On Joint PDFs
PAX Y EB G y dxdy
f
GYIEB
fx
PlasXeb Eyed f fx y Cx g dady
Plast sat 8 EYE ct872fx y a C 82
[Link] probability per unit area
Conditional PDF's another v.v
given
pxiycxlylPCX nly 5 [Link] ifpyly
o
fayGuy [Link]
iffylyls A PGcEXE2t8
8 where PLA 0
Zfx1ACK
Plexsutsly SY Sgt E I
[Link] fxyG4y
Definition PCXEA14 91
f fay rly dx
Comments on conditional PDF's
fay Hy friggin ffxly aly 20
Think of value of Y as fixed at some shape of
y
[Link] slice the joint
I fxiycuyldx f [Link] l
g
Multiplication Rule
[Link] fyly fay rly
fyou fyxLyla
Total Probability and Expectation Theorem
Axa Jpy y pxly rly
EEXly y Expxly Hy
EXT JpyLy E XIY y
fxcu f f y ly fay Hy dy
E CHY y Fa fay ily dx
Iffy y E X y y dy
J fyly Ifafmy rly dn dy
fix f fyly fay Ny dyda
f a friend die Efx
Independence
Px y ay px a byCy f x y
fay ay fxGa fyly t my
fx y la y fxly Caly fy y
equivalent to fay Hy f xGc t y with fyly so lax
YX Y are independent
EX YF EEXTENT
var x 4 var X van y
glx 2h14 are also independent
Elgexthly EIGHT ECHLY
Stick Breaking Example
Y d
d le
Break a stick of length l twice
first break at X uniform in Co LJ
second break at Y uniform in O D
fay ay [Link] I
fun n
e n x
y