Let's Get Started: Unit 3 LECTURE 7: Distance Measures Between Distributions
Let's Get Started: Unit 3 LECTURE 7: Distance Measures Between Distributions
Hi there,
Following are my notes for the lecture. These are my handwritten detailed notes. I felt that Prof. R
taught a lot more in the videos than he wrote in the slides. I tried to make them without any
mistakes and cover most of the video material.
I however DO NOT TAKE any responsibilty if you fail your exams following my notes. So please
check the actual lecture slides and videos if you suspect something is wrong.
The notes DO NOT CONTAIN solutions to any homework problems.Only the problems and
exercises solved in the videos are included in these notes.
'I dont give a f about what you think of me, I am not hereto impress you'
~ Posted on a chick's Insta, Had a lot of likes
)tence t haw
X11 Xa rXg Xn K1 Fe* n:here e* ,tb the true pavarnet6c
Now wry statsttco{ goqt hros eirnpte a. wartted {o
}.^d {-lus Fn* tsut 1 on\q
kuq\e nag data /observa*tsna^ Xr, Xr,- --
-X6 and *il+6 *,e hetp {h; i "'""(
wttl rnake an ealtvlratbt 6 6 (Xr1Xr,xg-
---Xn) {
And hx+L *ae varrte
=
t' attoivt q{t" p'"fif^l <n {ne d.tq. , 4 con-t &r- Ty c\tstri.lou\<on p5
tdeattg t want -F5 *o br worrk hopser'
heirt oloi^ dtfla,enr iou,*, "* 4
\^)fid* I cayr expect {s Sr
i"i?Y
+}re
?,]r1*-t';,:j:^that
*r,uo d<-stribldons Fr* ana
,rs ,.eqnE thot nrhen teotculate rhe f5 -{o be ctose.
r-**u3 "{;; orent A, ,ri*t bott&
{he distrlbukoas . tt should ss fr"pp;; *hot *he
each other . 1e -Hnerc, dtlf<rcn6s values qv€ ctose tu
*t,o,rii be smatt . Te ,
r il*?H#'llffi^
r
s* rar -p,(A)
r is"*^fHil1',ff-
P5 is ctose to Fr" if
I (a) -
F6
& (A)
I r.g swtarl
f,c o{r A c E
3o ilt ovder -|o study lhis probterarr , bv aee )rheonrcefl ,4
fofau VaRrartoN DtsTANcE
De{.n : We hqre *too proba}cltitg rrvteoruy\x P, and FU, ^ -tne +oto.t vaxjo}ion
clrstancg betwegr,r, the trrrco yv\ea.suvta ,ts cle(tnect aa
TV(F,,Fu,) = lq,tal - q,(A)l
^ryI
Ac E
" Note that -ttUs is a gznevatL deJ-tn{too *here axe -trroo pararrretevs g qnd e/
wa doit +att< aborrt 1'rrst
re.ol pov'ametp-y or e>*trnl+orc
, Noka t.rat rare aY€ Th"t, -the rn taximurn 4 I Pn (nl - F; (a) I r^vhelrg h
is arq gubset + E , -d{ +he fiaxiwrurna. r^}ttt be sh^atL ttten lPnrel - $,{all
hlrtf be EmdJ fl" ry errcn*, AcE au{oynat*ly.
8.3
> A littte probtenn"
fne def,n g| {ro'totvaxjattort is i't atvrec{Q la evevy dedLot4e tas\c
a\l good burt usivtg
beconAe hle horc {o cr.tautate lp"tn) - F.,(411 t*, all *ubsehs A q e L +ten,
*aKe *tre ntaxinnuvvl' ,ttt
4 it . Ewt.t tf auppose hle had an E te sorraple space
wt.{'14 sqU Io eternenta we h}tll rn-o,e +o
$,n,{ avdcovapqre llutal -ryAt\
t*{ do subseG ie 4oz4 s,ubs€k €vew *,r,* 4* +. con*tn,ou.g ca,s€. r ralc
wtt horre in$r,tite gubse[s A eonfiruroul space E..
"t ^
f,ovturnatol,l r,,,tathenztattclans ho.ne <irmpti-fltedihir. ptolaterrr b1 dertivinl{heoremr
r,nte wttt gLe those -t*t, dtscreke aa a^s ccrnkhuouA dtsbriLuhort
"ieU'
$,tal
leA
i l?'(o) I, pr,(rc)
x:1r(x))zfnrtx)
Nor,,ono,6 *lnat eacln,'telr,rt aJ-theRns
Stal - lP6(n1 U (p*ttl - pe,(*)) Sumvraattor.u nttU be posl*trre, berortseNe
Qtr"l
2t: < Pe,8) x/s {o{ wh(ch p6rxl < pe, (x)
Fot'2()
lB (A) - Fr,(a) I =. Z
x€A
I pucx: - flr,(xl I
a lt2rtar S,te) I
I p" (*) - fe, (x)l
Z (nUAc)
xe
No1n5 AU As : E i{se$
* J lf*txt-{r,t*: la*
{* cor,rltu,urerr,r.s c.qse
$ut t*hat if I-wont lo $^d *he T.V distorLss lee*rareen a bernoutti & a,
ohe rs dtscrek rnrhite the other rye ts c,oyt*thrratr^g .
6au*iavu . le
One *rght ry , ,rrrhy rntould tare wo.ytt, lo do taqt , but nol:e rnshat r".re hanre
been d"inq {or( most ol +Lu pavK iu, *lrte p\"evttruts tectures. Letg -[or exarnpte
Say 'that vue toot< "yt o,bsevvattorrs Xr, Xlr Xg --.-.Xn ru Bey(p) . \ohita
ust19 the ce:rflraL lin^it *reovewv \rue soid th.at at+hour€lu Xi /s arte
bernouttl , savrnjte vweo,t fn hrill a\so lce dtscreG as il is a sun4 o$ bcnnoutti
)tor*er€r :["v tortge ru (o.sywrptofcc lJryfid) ik dtstributtoa cor- bD sr.lw
Q9a' flor,rl.sior,r" dtstrihtticrn,ie acsrnttvtuousdistr0ou+(6y1 ilfp,p(,-B))
fio do+evt't it wta\<e Jewsg 5 as[< +he ques{i,.rn aborat *{.re
{otaL vartialcot dtstawcr, benletn Xn : a dtscrc,['e vv . {"" ftnitz rn,
Y : 2,a.ur,rtan 'tv ie csntfuuror,s
hXn $ttot^s a. Bivtonttat d.Gtrrbutto,t vthevt" Xi n, Bern(p)
r^r€ dyaW ifs pdJ & coT|4 pare it +o Z *, (o,
N 1) tnse tatr*t Y
Ae-e a .!oV 4
ob^v
sinatio.,.{.ikel btc {.nzm-
elousslara- pdJ
vg Birrorn(8, p)
o
o12_ 71.se 1g
{ouratnet 1o colc-l,rlali guc}r, cas€A h5e- h}tt\ {^or"e {o d,o *he catc-r.rtatiorr,
?ruiris a wtod
3o rte c-on $.ip 'r,,?"
wdr,at,s inside
> E2teYctaej
G'prI"
o) TV ( gev (.5) , Ber 6 -1))
b) TV (gev (,s), Bey (.q))
{o sotve *he oborre *raoo -tet 4^d gueroily TV (Ber(Pr) , Bev(pz))
Ue dtstrtbutovtS
{s ,^re o.)^e deo.t^ug w+th dtscre 3o
TV ( B, Fn') =
t E= I Fot{) - he'tx)l
E = to, 13 +*( X a., Ber(p) h(t)=p
Ffo; =l-p
Tv( Bev(pr), Bey(p") ): * I \ _ prJrl\
<- XEE [.txl
-t t.5 - ol + l-5 0l
I
{
lo - .Sl + lo .51 l=
(W, was -the afi,t'"iar" p'ro cectuve i* csgatoli'^t {v
Ne wi[l rnoh) Aee \^rr^dt toe ooutJ llatne dota nx,setl , Al.so tJ"af it
nteor.,a 'f* TV +o bz I
hrt thrg ig o- pvo,btervr {oa T,y. l-e].* see ho u.:
B"u
We \^xtl c\i*ed tlris problenr- ensn- frr*h"r -to
6arn insi8ln1s {vttolPre rooture "l
-r.V
But $vst undevs*and sorne de{rtrdo'rx
) 9upport { Random Vanlabte X : Tt is a set ol vaJare^r jl^-ct X ta.ke.a
Erreg X+Beyn(p) Support -to,tt
Fo/ eg X ,r, Poss (A) Eupport
= t o,1 tz ,? -_ _.I
F. u{ X * Nttror) Supptrrt = R
> Dtsl'aUtt support : Nor,o suPpose rnre horre taro Yondo?), vorciobtes X o.rrd y
If their suppov-[s dorr'* shqye on-y cormmovr element . Jhen rrre sa,y X
and Y harre disjotnt supgart
f"" E X..,Bern(p) suppcrr+ofX = to,tt
X+a tuoa{heSupport =tqr!+a}
pntcrA e = o _tlne _fott owtvlq-/;ral ho.rne ho comrncrn
<,tem e,r* Vettcz
X ond x+ o. J.uo.w disjotr^* "^uUp-t
Il'ow t'ue invoked the corcept o{ dtsl'obtt ..prrr+ bec,o*se by de{,n ol rv
TV (pr,
Fr,) = I g.tar _ Fs(ntl
ffit
lenern: tt''us fv t's bound.ed
'^le a' set !v I (a-l pr,ovtd ec,.rtli<t) ottd { I co^
$nd A such lfrat rv blcornes I , *hat nri,tt be *lner,nc,.xtntuvta
rrolAs cyrd henet that vrrtlt be T-V(pe,
fir)' _ L
FL1h,"ru X rs a vastr'abte **rqt Sttoxss F"
Avppose Y ir o" vqnrabte {hat $"Uo*,
B/
8, A Sorree hov^c L.nor,.) Jhat x ond Y halre cttslov* eupgcrrt
Thevr, a cortu choose A = Sx ie 4 X ((.cotrtd hcrw lo.ken Sy )
suppcrr{
Norar Pr(al = P"(XeSx)= t byd"{,n{sutepartol x
Aitso B, (ol = ts, (Y e sx) = o becauge Y r.v. nev,er( {ukeavo-Lue
f*'* -'t?re se* Sx
*lence 11 a4 "* TV dtslayrce
-TV ( P*, tf
G,) = I x, Y har,e drs.lbtnt s"pprrt
{rrr,ted r^il{n thrs knot.otedle hse cav\ aytue $r. {Jtn pv€viotts 1x'ob\enn,
-U^akX toa su7por+ to,t} avtd X+ a" t"o..a suppm{ to, l+al
Qinevr c\ e (0, 1) .anz av(lPe,.Fe ) - 1 Equrvalevttty
abok A={o,1} tuppor+d X
Suppose
F(xeto,t3)=l I F(x+aefo,l!) = o
lP*(at-8,(A)l =l =TV
8.1L
J7
X^-r ., (d) )i (o,t) 3o h.ne Jfr(X^ -'5) (d)
n->0c , > ico,t)
h-)o
P(r-P) ?= "5
'5(t 5)
ho ltu'*s ,ts es+aHtsh.d q CLf thot os YL increasaa -thu elishibwh'o,t
o{ .
+ 2fi(F" -.f) -took !.ike +iro+ ,Nto,r1
3ru^*siqrrt
Xo ure would z+d titra* oufi d{stq!'\ce c,,.itevio-rt / t vtcasurt be omea srnaltert
and srna[ts]L 0g n tvrcreastu
not-c i^cf 06 2m ([ -.f') {s a dtscvre+e Y,V &
4t*o o Y'v h}e nrilt rue1he cQ'n C TV
Z - N(o,t) [S etvvt{introu*
faZn(&-,5) =
Sn
{akes
8.1ts
TV = rna)L lB*tal-q,(A)l
AcE
LUc choose A cts euppor+ o{ lm ( & - !/z\ dt"at ^* t*nd eotLiex
Btor P ( 2lh (R-'5) e sn) = I by defh 4 *.vPt{ "{ x
B,(o) = P ( a Es,,) = F( E= r(*-T)) +F[z= r(*-*))
+ + P(z ,(, -*))
=
X -,ilt0, f ) tS covtHvtuourr so er^ch tevwt ts zero (o)
Btol = 0
Ao'^re frund 0, subset A-sx c E tho* tr**
-fV (16,8,) I
=
{ence thts {he value d Tv as tK upper loound rs 1
jg
c
?^x ts
P
? o
d I
,
E*U
q)
-tA {t-"-..."d I t,
q ,\>!
ay 0=X .\e{o,oc; - Exp(x)
X* {txed, 80* ^, Exp(t' ) l=r I
-fi. *t*g..t+y reb .\t = t \<t u if ,\>l
TV ( Exht^) , Exp(t) ) e
\
tI x" if \<1
= {. .I
o
A-t
{"" .\ < I h}€ uuitl do
)to @
,h. t
*f j dx- o
AEx dx +
J
)to
,\E TL 6'd, (x ) '-^
l" axir
,tLt
8.15
Ao the poCnt g[atl 'the prevtous dtsorsslorr rras,*he func+toa rV (l?s,tPe* ) wttt attain,
thevalue O rnrhev,r, 9= 0* . As t^)e aaAume.tyt tlrtis ca'urrse .Llaot O is identt$tobte
On(e hle know g rnre r,rritl haW uhrqu e JPg
As v.)e scw lhe $rnc*tora TV (F9, Fg+ ) o{taivrs -lhe vaL.re o at g
tde hltll iust trvrlt'tivnise- Tv..(&,
=g*
Pnn) onj. -{i^a rsn"r* it's 5e.o.fnat h}[l h{, uu{u-
0 ts s* 1 TraereJore hle r^ltrt'ilfnJ..i'
Le+ wE repeott *he orgumznt vvrrrl_ cteavty
;;ffi.:tT
tumfzstrare,1.
-t t hael g*
: a J-txed 'true pararnetex *hat f wanted lo knor^>
-+ f rnqde a' fucdoyr co[ed-Tv (Pe,B,r) +hot tsa vrneo,s"t= ?t drshance bw ihe
ttoo dtstributtsrts
& and Jpe"+
+ 1- hettt urrinimlse *hrs dris-tan ce , becouse os the d*hvtce wt\t xo *o -*ro *he.
g hlttl come ctose -b g{e
-* 9o trnsteort cr! th^e exact TV (B,Pe,*) , T tnrltl vnake on e's+th atou t"*
TV ttsetJ iJ, f;/ (-q,n,"*; . Caral,hic bflaig hroutd took-Like
__t
TV(8, B")
TV (q, Pe*)
g* o
E Fnr*,&(tfi)
2(e E
if E is drso^etd
KL(trs, tro )
(rt) ,Z- ( fet*l .f E t& conkruror,r,l
I tn
f g'(x)
E
# X P;r'r to*l
ht*"tI Fe(xl 1I + xeg
PE t*s
\r bdcxl
Pe (x)
1 L
4,t^^tae quzs{ton wtlt a.tt8e orr horc'lo make KU(Pd,Ee ) wheru we clo.rt'
k;o^D g* beforrehond & +re ons^)crt ls I hlitl a6aln es+irna6, KL a.s ;)L
Eut{#uis 'ttvrae nre will hame a cr,ew.r strakcrXl or,1 our rpi716[6 .
[:b -* ], ** Pexil
-+ -larnintiynX ^- $.rtatto-n
,ts e1,rivate"f,A rnaxintoin6- ihs vue6o.ttrre
$o aborre, otpvr:r*torr t's elutvatent ft Mr.x L *rS prCXi)
t=r u rs' '
960 n 1, .
17ro is jrrst a corts+awt so it wo*i, 4r.+ +r* g ct uytricl,u $cda,n ,,a.",axtr,.rs2
go -rrzte rurinn .s eluivanenr *o
#t Ti ,t
abov^e exp
F, (x;)
4( rt p"tx;;
n
h/t0)t )
9e [=l
-r, Now
hle trarne *he protcle rn- maxtnnisa -|."6 ( {tel) ^rtt V ntheste
fel = ,1 Pr(xi1 .
.ttot
Narrl urraxi rta.rstlp
(-1, -tA (Jrol) {s elutvalenb -lo tnnoxi'raisi ?
vr,axtrv'rr'lel bz"o"s' load (') ia
if nrc j'ust
^or.t
Sda fi-e I -tln-ab
#61lYerxt)
'i;'i
8. 21
L WL
-An ^ f,nzi
Juwc-+t e A'='
x, LyrL - x, l