Class 8
March 20th, 2019
XLDN∈{XLDN∈{ snow, showers, light rain, wet, misty, cloudy, breezy, bright, sunny}
Pr[XLDN=xi]=[116,18,…18,116]Pr[XLDN=xi]=[116,18,…18,116]
XWH∈{XWH∈{ cloudy w. light rain, sunny}
Pr[XWH=yi]=[18,78]Pr[XWH=yi]=[18,78]
H[XWH]=∑Pr[XWH=yi]⋅I[yi]H[XWH]=∑Pr[XWH=yi]⋅I[yi]
H[XWH]=−∑Pr[XWH=yi]⋅log2Pr[XWH=yi]H[XWH]=−∑Pr[XWH=yi]⋅log2Pr[XWH=yi]
H[XWH]=−18⋅log18−78⋅log78H[XWH]=−18⋅log18−78⋅log78
=−18⋅log18−78[log7−log8]=−18⋅log18−78[log7−log8]
=18⋅log8+78[log8−log7]=18⋅log8+78[log8−log7]
=18⋅3+78[3−2.8]=18⋅3+78[3−2.8]
=38+78⋅0.2=38+78⋅0.2
=38+78⋅15=38+78⋅15
=[38⋅5+78]15=[38⋅5+78]15
=228⋅15=228⋅15
=2.75⋅0.2=0.55≈1=2.75⋅0.2=0.55≈1 bit needed.
H[XLDN]=∑Pr[XLDN=xi]⋅I[xi]H[XLDN]=∑Pr[XLDN=xi]⋅I[xi]
H[XLDN]=−∑Pr[XLDN=xi]⋅log2Pr[XLDN=xi]H[XLDN]=−∑Pr[XLDN=xi]⋅log2Pr[XLDN=xi]
H[XLDN]=−116⋅log116−18⋅log18…H[XLDN]=−116⋅log116−18⋅log18…
=−2116⋅log116−718log18=−2116⋅log116−718log18
=2116⋅log16+718log8=2116⋅log16+718log8
=18⋅log16+78log8=18⋅log16+78log8
=18⋅4+78⋅3=18⋅4+78⋅3
=258=3.125≈4=258=3.125≈4 bits needed.