Example 2:Piecewise Constant C1, if15≤x≤20 fx(x)= C2, if20≤x≤25 (0, otherwise =P(sunny)=fx(x)dx=5c 2 专=P(rain0)=语f()dx=5c 2 Solving this gives c1=s c2= 1 15
Example 2: Piecewise Constant ◼ 𝑓𝑋 𝑥 = ൞ 𝑐1, if 15 ≤ 𝑥 ≤ 20 𝑐2, if 20 ≤ 𝑥 ≤ 25 0, otherwise ◼ 2 3 15 = �𝑛𝑛𝑢𝑠� �� = 20 𝑓𝑋 𝑥 𝑑𝑥 = 5𝑐1 ◼ 1 3 20 = �𝑛𝑖𝑎𝑟� �� = 25 𝑓𝑋 𝑥 𝑑𝑥 = 5𝑐2 ◼ Solving this gives 𝑐1 = 2 15 , 𝑐2 = 1 15
Example 3:large values Consider a random variable X with PDF 1 if0<x≤1 otherwise ■Note that)dx=02dx=v元6=1 So it's a valid PDF. "But四)=g2友=+o 1 X→0+ 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 ∞− ∞ 0 = �𝑑� �� �𝑓� 1 1 2 𝑥 𝑑𝑥 = 𝑥 ቚ 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 00 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[X]=E[(X E[X])2] =o(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𝐕𝐚𝐫 𝑋