Example 2:Piecewise Constant C1, if15≤x≤20 ■fx(x)= C2 if20≤x≤25 0, otherwise 专=P(swmy)=Jg)dx=5c P(rainy)=f()dx=ca 2 1 Solving this gives c1= C2 15
Example 2: Piecewise Constant 𝑓𝑋 𝑥 = 𝑐1, if 15 ≤ 𝑥 ≤ 20 𝑐2, if 20 ≤ 𝑥 ≤ 25 0, otherwise 2 3 = 𝑃 𝑠𝑢𝑛𝑛𝑦 = 𝑓𝑋 𝑥 𝑑𝑥 20 15 = 5𝑐1 1 3 = 𝑃 𝑟𝑎𝑖𝑛𝑦 = 𝑓𝑋 𝑥 𝑑𝑥 25 20 = 5𝑐2 Solving this gives 𝑐1 = 2 15 , 𝑐2 = 1 15
Example 3:large values Consider a random variable X with PDF if0<x≤1 0, otherwise Note that(dxdx=1 So it's a valid PDF. 1 ·But lim.fx(x)=lim, =十0∞. X→01 x-0+2Vx There,a PDF can take arbitrarily large values
Example 3: large values Consider a random variable 𝑋 with PDF 𝑓𝑋 𝑥 = 1 2 𝑥 , if 0 < 𝑥 ≤ 1 0, otherwise Note that 𝑓𝑋 𝑥 𝑑𝑥 ∞ −∞ = 1 2 𝑥 𝑑𝑥 1 0 = 𝑥 1 0 = 1 So it’s a valid PDF. But lim 𝑥→0+ 𝑓𝑋(𝑥) = lim 𝑥→0+ 1 2 𝑥 = +∞. There, a PDF can take arbitrarily large values
Expectation The expectation of a continuous random variable x is defined by 00 EX灯= xfx (x)dx As for discrete random variables,the expectation can be interpreted as "center of gravity"of the PDF anticipated average value of X in a large number of independent repetitions of the experiment
Expectation The expectation of a continuous random variable 𝑋 is defined by 𝐄 𝑋 = 𝑥𝑓𝑋 𝑥 𝑑𝑥 ∞ −∞ As for discrete random variables, the expectation can be interpreted as "center of gravity'' of the PDF anticipated average value of 𝑋 in a large number of independent repetitions of the experiment
Function of random variable For any real-valued function g,Y=g(X)is also a random variable. The expectation of g(x)is E[g(X)]=g(x)fx(x)dx
Function of random variable For any real-valued function 𝑔, 𝑌 = 𝑔(𝑋) is also a random variable. The expectation of 𝑔(𝑋) is 𝐄 𝑔 𝑋 = 𝑔(𝑥)𝑓𝑋 𝑥 𝑑𝑥 ∞ −∞
Moments and variance The nth moment of X is defined by E[X"]. The variance of X is defined by Var[]=E[-E[X])] =(x-E[X])2fx(x)dx ■0≤Var[X]=E[X2]-(E[X])2 Please verify the equality. If Y ax +b,then EY]=aE X]+b, Var[Y]=a2Var[X]
Moments and variance The 𝑛th moment of 𝑋 is defined by 𝐄 𝑋 𝑛 . The variance of 𝑋 is defined by 𝐕𝐚𝐫 𝑋 = 𝐄 𝑋 − 𝐄 𝑋 2 = 𝑥 − 𝐄[𝑋] 2𝑓𝑋 𝑥 𝑑𝑥 ∞ −∞ 0 ≤ 𝐕𝐚𝐫 𝑋 = 𝐄 𝑋 2 − 𝐄 𝑋 2 Please verify the equality. If 𝑌 = 𝑎𝑋 + 𝑏, then 𝐄 𝑌 = 𝑎𝐄 𝑋 + 𝑏, 𝐕𝐚𝐫 𝑌 = 𝑎 2𝐕𝐚𝐫 𝑋