utdallas 1 Outline Continuous random variables and density Common continuous random variables Moment generating function Page Continuous Random Variables /~metin .edu utdallas Absolutely continuous random variable has absolutely continuous cdf 𝐹 that satifies – for finitely many disjoint intervals (𝑎𝑖 , 𝑏𝑖 ), there exists 𝜖 for every given 𝛿 such that 𝑖 𝑏𝑖 − 𝑎𝑖 ≤ 𝛿 implies 𝑖 𝐹(𝑏𝑖 ) − 𝐹(𝑎𝑖 ) ≤ 𝜖 – Absolutely continuous functions • are continuous. Continuity needs the condition above for a single interval. • are differentiable almost everywhere. • map length-0 intervals length-0 intervals • has a corresponding 𝑓 called density such that 𝒂 𝑭 𝒂 = 𝒇 𝒖 𝒅𝒖. −∞ Singularly continuous function or random variable: – Function: Continuous functions that increase only over sets whose total length is zero. – Random variable: Sample space is uncountable but the range of the rv is a set with zero length. E.g., making a probability mass of 1 from an uncountable range of 0 length is singularity » Cantor function: Cantor set of length 0 → [0,1] of length 1. 2 A continuous random variable has an uncountable sample space Page Seeking a Density /~metin .edu Exclude from Cantor Set Exclude from Cantor Set Exclude from Cantor Set Exclude from Cantor Set Exclude from Cantor Set Exclude from Cantor Set 1.Cantor Set Exclude from Cantor Set utdallas 3 Cantor Set Cantor Function Cantor Random Variable Page Continuous but Not Absolutely Continuous /~metin .edu 3. Cantor function as a cdf yields Cantor random variable that is singularly continuous 2.Cantor Function Cantor function is constant outside Cantor Set increasing inside Cantor Set continuous over all 8/9 2/3 8/9 26/27 1 1 Chalice (1991): Any increasing real-valued function on [0,1] that has a) 𝐹 0 = 0, b) 𝐹 𝑥/3 = 𝐹(𝑥)/2, c) 𝐹 1 − 𝑥 = 1 − 𝐹(𝑥) is Cantor function. utdallas 4 Page Finding Many Densities /~metin .edu In this course, absolutely continuous rv = absolutely continuous rv Pdf 𝑓 is derived from cdf 𝐹 – Recall the sequence of probability construction: (Ω, ℑ, P) and then 𝐹 𝑎 : = P(𝑋 ≤ 𝑎) Does each 𝐹 lead to a unique 𝑓? No! – Ex: Consider 𝑓0 𝑥 = 1 for 0 ≤ 𝑥 ≤ 1 and over the same range of 𝑥 define a family of functions parametrized as 𝑓𝑎 𝑥 = 𝑓0 𝑥 + 𝑎 𝐈𝑥=𝑎 for 0 ≤ 𝑎 ≤ 1. 𝐈𝐴 is a binary variable taking the value of 1 only when 𝐴 is correct. 𝑥 » Note that −∞ 𝑓𝑎 𝑢 𝑑𝑢 = 𝑥 = 𝐹(𝑥) for 0 ≤ 𝑥 ≤ 1, because integral is not affected by the alterations at countably many points or at the single point {𝑎}. » Each function in the family {𝑓𝑎 : 0 ≤ 𝑎 ≤ 1} is a density for 𝐹 𝑥 = 𝐈0≤𝑥≤1 𝑥. – Versions of the last example are the same almost everywhere and differ over a point. – Can we generate examples that have versions differing over an interval rather than a single point? » No, because 𝑓 = 𝑓 almost everywhere 1 2 if and only if 𝑓 𝑥 𝑑𝑥 = 𝐴 𝑓2 𝑥 𝑑𝑥 for every set 𝐴. 𝐴 1 – Can we generate examples that have continuous versions? » No, because continuous versions must differ over an interval. utdallas – 𝑓𝑋 𝑥 = lim (𝐹𝑋 𝑥 − 𝐹𝑋 𝑢 )/(𝑥 − 𝑢) define almost everywhere 𝑢→𝑥 – 0 = P 𝑋 𝜔 = 𝑥 ≠ 𝑓𝑋 𝑥 = arbitrary at countably many points Expected value E(𝑋) – E 𝑋 = k th moment – E 𝑋𝑘 = 𝑥𝑓𝑋 𝑥 𝑑𝑥 𝑥 𝑥 𝑥 𝑘 𝑓𝑋 𝑥 𝑑𝑥 Variance V(𝑋) – V 𝑋 = E 𝑋2 - E 𝑋 2 Ex: For a continuous random variable 𝑋, let f u = 𝐈0≤u≤1 (𝑐𝑢2 + 𝑢).What value of 𝑐 makes 𝑓 a legitimate density so that it integrates to one? Find E 𝑋 . – 1=𝐹 1 = – E 𝑋 = 1 3 0 2 1 2 𝑐𝑢 0 + 𝑢 𝑑𝑢 = 𝑢3 + 𝑢2 𝑑𝑢 = 𝑐 3 3 8 𝑢3 + 𝑢4 + 1 2 1 3 𝑢2 𝑢3 𝑢=1 𝑢=0 𝑢=1 𝑢=0 𝑐 3 3 + 8 1 so 𝑐 2 1 17 = . 3 24 = + = 3 2 = . 5 Continuous random variable Probability density function pdf Page Moments /~metin .edu utdallas 6 Page Independence Random variables 𝑋 and 𝑌 are independent if P 𝑋 ≤ 𝑎, 𝑌 ≤ 𝑏 = P 𝑋 ≤ 𝑎 P 𝑌 ≤ 𝑏 This definition is inherited from the independence of events P 𝑋 ∈ A, 𝑌 ∈ 𝐵 = P 𝑋 ∈ 𝐴 P 𝑌 ∈ 𝐵 where 𝐴 = (−∞, 𝑎] and 𝐵 = −∞, 𝑏 . Ex: For two independent variables 𝑋1 , 𝑋2 , we have E 𝑋1 𝑋2 = E 𝑋1 E 𝑋2 – E 𝑋1 𝑋2 = 𝑥 𝑥 𝑓(𝑥1 )𝑓 𝑥1 ,𝑥2 1 2 𝑥2 𝑑𝑥1 𝑑𝑥2 = 𝑥1 𝑥1 𝑓(𝑥1 )𝑑𝑥1 𝑥2 𝑥2 𝑓(𝑥2 )𝑑𝑥2 = E 𝑋1 E 𝑋2 Ex: A random variable is not independent of itself so E X 2 = E 𝑋𝑋 ≠ E 𝑋 E 𝑋 Ex: For two independent variables 𝑋1 , 𝑋2 , we have V 𝑋1 + 𝑋2 = V 𝑋1 + V 𝑋2 /~metin .edu utdallas 7 Page .edu /~metin Common Continuous Random Variables Uniform Random Variable A uniform random variable 𝑋 takes values between 𝑥𝑢 and 𝑥𝑜 , and the probability of 𝑋 being in any subinterval of [𝑥𝑢 , 𝑥𝑜 ] of a given length 𝛿 is the same: P 𝑎 ≤ 𝑋 ≤ 𝑎 + 𝛿 = P 𝑏 ≤ 𝑋 ≤ 𝑏 + 𝛿 for 𝑥𝑢 ≤ 𝑎, 𝑏 ≤ 𝑎 + 𝛿, 𝑏 + 𝛿 ≤ 𝑥𝑜 . Uniform random variable over [𝑥𝑢 , 𝑥𝑜 ] is denoted by 𝑈(𝑥𝑢 , 𝑥𝑜 ). Ex: What is the pdf of a uniform random variable over [𝑥𝑢 , 𝑥𝑜 ]? – Since P 𝑎 ≤ 𝑋 ≤ 𝑎 + 𝛿 = P 𝑏 ≤ 𝑋 ≤ 𝑏 + 𝛿 , the density 𝑓 𝑢 = 𝑐 must be constant over [𝑥𝑢 , 𝑥𝑜 ]. – We need 1 = 𝐹(𝑥𝑜 ), that is 1 = 𝑓 𝑢 = 𝐈𝑥𝑢 ≤𝑢≤𝑥𝑜 = c xo − xu . Hence, 1 𝑥𝑜 −𝑥𝑢 Find E(𝑈(𝑥𝑢 , 𝑥𝑜 )). E 𝑈 𝑥𝑢 , 𝑥𝑜 𝑥𝑜 𝑐𝑑𝑢 𝑥𝑢 = 𝑥𝑜 1 𝑢 𝑑𝑢 𝑥𝑢 𝑥𝑜 −𝑥𝑢 = 1 𝑢2 𝑢=𝑥𝑜 𝑥𝑜 −𝑥𝑢 2 𝑢=𝑥𝑢 = 𝑥𝑢 +𝑥𝑜 2 . Find P(𝑋1 = 𝑈 0,1 ≥ 𝑋2 = 𝑈(0,1)). Note each Xi = 𝑈 0,1 is independent and identical. 𝑥2 1 𝑥1 ≥ 𝑥2 P 𝑋1 ≥ 𝑋2 = 𝑥1 𝑥1 ≥𝑥2 1 1 𝑑𝑥1 𝑑𝑥2 = 0 𝑥1 0 1 𝑑𝑥2 𝑑𝑥1 = 0 𝑥12 𝑥1 𝑑𝑥1 = 2 𝑥1 =1 𝑥1 =0 = 1 2 8 utdallas Page .edu A uniform random variable 𝑋 takes values between 0 and ∞, and the probability of 𝑋 being in any subinterval of [𝑎, 𝑎 + 𝛿] of a given length 𝛿 exponentially decreases as 𝑎 increases: P 𝑎 ≤ 𝑋 ≤ 𝑎 + 𝛿 = exp −𝜆 𝑎 − 𝑏 P 𝑏 ≤ 𝑋 ≤ 𝑏 + 𝛿 for 0 ≤ 𝑎 ≤ 𝑏 and 𝛿 ≥ 0. Here 𝜆 is the parameter of the distribution. Start with the equality above, and first 𝛿 → ∞ and then 𝑎 = 0: P 𝑋 ≥ 𝑏 = exp(−𝜆𝑏) The cdf and pdf are respectively 𝐹𝑋 𝑥 = 𝐈𝑥≥0 [1 − exp −𝜆𝑥 ] and 𝑓𝑋 𝑥 = 𝐈𝑥≥0 𝜆exp(−𝜆𝑥) Ex: Find moments of Exponential distribution – ∞ 𝑥 𝜆exp −𝜆𝑥 = 0 ∞ 𝑋 2 = 0 𝑥 2 𝜆exp −𝜆𝑥 E 𝑋 = = −𝑥 2 exp ∞ 0 + 0− exp −𝜆𝑥 𝜆 = 1 𝜆 ∞ 𝑥𝜆exp 𝜆 0 2 E – As an induction hypothesis suppose that E 𝑋 – – Hypothesis holds for 𝑘 = 1. It also holds for k = 2, which we consider for getting intuition. The step of k = 2 can be dropped. – E 𝑋 𝑘+1 = ∞ 0 – 𝜆 ∞ 𝑘 𝑥 𝜆exp 0 −𝜆𝑥 𝑑𝑥 = −𝜆𝑥 𝑑𝑥 = 2 𝜆2 = 𝑘!/𝜆 . 𝑥 𝑘+1 𝜆exp −𝜆𝑥 = −𝑥 𝑘+1 exp −𝜆𝑥 𝑘+1 𝑑𝑥 = 0 + ∞ 0 – =0+ ∞ exp −𝜆𝑥 𝑑𝑥 = 0 ∞ −𝜆𝑥 ∞ 0 + 0 2𝑥 exp −𝜆𝑥 𝑘 𝑘 −𝑥exp −𝜆𝑥 𝑘+1 𝜆 ∞ 0 ∞ 𝑘 0 𝑘+1 ! + E(𝑋 𝑘 ) = + 1 𝑥 𝑘 exp −𝜆𝑥 𝑑𝑥 𝜆𝑘+1 The last line establishes the induction hypothesis for 𝑘 + 1. Exponential distribution has memoryless property: P 𝑋 > 𝑎 + 𝑏 = P(𝑋 > 𝑎)P(𝑋 > 𝑏). – If a machine is functioning at time 𝑎 (has not failed over [0, 𝑎]), the probability that it will be functioning at time 𝑎 + 𝑏 (will not fail over [𝑎, 𝑎 + 𝑏]) is the same probability that it functioned for the first 𝑏 time units after its installation. /~metin Common Continuous Random Variables Exponential Random Variable Slower decay Exponential decay utdallas For slower decay in the tail P(𝑋 ≥ 𝑥), note exp 𝜆𝑥 ≥ 𝑥 𝑎 or exp −𝜆𝑥 ≥ 𝑥 −𝑎 for sufficiently large 𝑥. Slower decay yields a heavy tail distribution Seek a random variable with P(𝑋 ≥ 𝑥) proportional to 𝑥 −𝛼 for 𝑥 ≥ 𝑥𝑢 and 𝛼 ≥ 0. Since P 𝑋 ≥ 𝑥𝑢 = 1, set P 𝑋 ≥ 𝑥 = (𝑥𝑢 /𝑥)𝛼 for 𝑥 ≥ 𝑥𝑢 . The cdf and pdf are respectively 𝐹𝑋 𝑥 = 𝐈𝑥≥𝑥𝑢 [1 − (𝑥𝑢 /𝑥)𝛼 ] and 𝑓𝑋 𝑥 = 𝐈𝑥≥𝑥𝑢 9 Two pdfs Page .edu 𝛼 𝛼𝑥𝑢 𝑥 𝛼+1 Ex: Find E 𝑋 and moments – For 𝛼 > 1, E 𝑋 = 𝛼 ∞ 𝛼𝑥𝑢 𝑥 𝑑𝑥 𝑥𝑢 𝑥 𝛼+1 =− – For 𝛼 = 1, E 𝑋 = ∞ 𝑥𝑢 𝑥 𝑑𝑥 𝑥𝑢 𝑥 1+1 = 𝑥𝑢 ln 𝑥 – Since – Heavy tail causes diverging moments. 1 𝑥𝑓 0 𝛼 𝛼 𝑥𝑢 𝛼−1 𝑥 𝛼−1 ∞ 𝑥𝑢 ∞ 𝑥𝑢 = 𝛼 𝑥 𝛼−1 𝑢 → ∞. For 𝛼 < 1, E 𝑋 = 𝛼 𝛼 ∞ 𝑥𝑢 𝑥 𝑑𝑥 𝑥𝑢 𝑥 𝛼+1 >𝛼 ∞ 𝑥𝑢 𝑥 𝑑𝑥 𝑥𝑢 𝑥 1+1 →∞ 𝑥 𝑑𝑥 is finite and 𝑥 𝑘 ≥ 𝑥 for 𝑥 ≥ 1, diverging mean implies diverging moments Heavy tail in practice – – – – /~metin Common Continuous Random Variables Pareto Random Variable Wealth distribution in a population: there are plenty of individuals with very large amount of wealth. Phone conversation duration: there are plenty of phone conversations with a very long duration. Number of tweets sent by an individual: there are plenty of individuals sending a large number of tweets. Number of failures caused by a root cause: there are plenty of root causes leading to a large number of failures. This is known as Pareto rule in Quality Management. utdallas For nonnegative integer 𝑛, 𝑛! = 𝑛 𝑛 − 1 𝑛 − 2 … 2 1 and 0! = 1. This factorial definition does not help for real numbers or negative integers. Let us extend the definition. Let us define Gamma function for any real number 𝑛, ∞ Γ 𝑛 = 0 Then Γ 𝑛+1 = ∞ 𝑛 𝑥 exp −𝑥 𝑑𝑥 0 ∞ = 0 − 0 𝑛𝑥 𝑛−1 −exp −𝑥 𝑑𝑥 ∞ = 𝑛 0 𝑥 𝑛−1 exp −𝑥 𝑑𝑥 = 𝑛Γ 𝑛 ∞ Γ 1 = 0 exp −𝑥 𝑑𝑥 = 1 ∞ 1 Ex: Γ = 0 𝑥 −1/2 exp −𝑥 𝑑𝑥 2 ∞ 2𝑢 = 0 exp −𝑢2 𝑑𝑢 𝑢 ∞ = 2 0 exp −𝑢2 𝑑𝑢 = 𝜋 7 5 5 53 3 Ex: Γ = Γ = Γ 2 2 2 22 2 = 531 1 Γ 222 2 = 15 𝜋 8 Ex: Γ 0 = ∞, by lower bounding the limit with a series diverging to ∞. 10 Page Gamma Function /~metin .edu 𝑥 𝑛−1 exp −𝑥 𝑑𝑥 – 𝑓𝑋 𝑥 = 𝑑 𝑑𝑥 𝑥 𝜆exp 0 −𝜆𝑢 𝑑𝑢 𝑢 𝜆exp −𝜆𝑢 𝑑𝑢 = 𝑥 (1 − 0 exp −𝜆(𝑥 − 𝑢) )𝜆exp −𝜆𝑢 𝑑𝑢 𝑑𝑢 = −exp −𝜆𝑥 + 1 − 𝜆𝑥exp(−𝜆𝑥) P 𝑋 ≤ 𝑥 = 𝜆exp −𝜆𝑥 − 𝜆exp −𝜆𝑥 + 𝜆2 exp −𝜆𝑥 = 𝜆exp −𝜆𝑥 𝜆𝑥 . Add up 𝛼 many independent 𝐸𝑥𝑝𝑜(𝜆) variables and end up with a distribution parameterized by 𝛼, 𝜆 . The pdf of Gamma(𝛼, 𝜆) is 𝑓𝑋 𝑥 = 𝑥 P 𝑋2 ≤ 𝑥 − 0 𝑥 − 0 𝜆exp −𝜆𝑥 P 𝑋 ≤ 𝑥 = P 𝑋1 + 𝑋2 ≤ 𝑥 = = utdallas An Erlang rv is the sum of an integer number of exponential random variables. Ex: Add up two independent 𝑋1 , 𝑋2 ∼ 𝐸𝑥𝑝𝑜(𝜆) , what is the cdf of 𝑋 = 𝑋1 + 𝑋2 ? – 11 Page .edu /~metin Common Continuous Random Variables Erlang and Gamma Random Variables 𝜆exp −𝜆𝑥 𝜆𝑥 𝛼−1 Γ(𝛼) for 𝑥 ≥ 0 and 𝛼 > 0 Ex: UTD's SOM has routers at every floor. Since the service must be provided without an interruption, a failed router is replaced immediately. We are told that the first floor had 7 failed routers and running the 8th now. On the other hand, the second floor had 4 routers and running the 5th now. – Suppose that all these routers are identical with Expo(𝜆) lifetime with parameter 𝜆 measured in 1/year. – P(Gamma(8,𝜆)≥10) represents the unconditional probability that the routers on the first floor will last for 10 years. – If we are told that the SOM building is in operation for 8 years, then this probability can be revised as P(Gamma(8,𝜆)≥10| Gamma(8,𝜆)≥8). – Similar probabilities for the second floor are P(Gamma(5,𝜆)≥10) and P(Gamma(5,𝜆)≥10| Gamma(5,𝜆)≥8). For integer 𝛼, find E(Gamma(𝛼,𝜆)) and V(Gamma(𝛼,𝜆)). We can start with the first two moments of Exponential random variable: E(Expo(𝜆))=1/𝜆 and E(Expo 𝜆 2 )=2/𝜆2 , which imply V(Expo(𝜆))=1/𝜆2 . – Since 𝛼 is integer, we can think of Gamma as sum of 𝛼 independent exponential random variables so that we can apply the formulas for the expected value and variance of sum of independent random variables: E(Gamma(𝛼, 𝜆))=𝛼/𝜆 and V(Gamma(𝛼, 𝜆))=𝛼/ 𝜆2 . 𝑑𝑢 = 1 𝑘−1 𝑢 0 1−𝑢 𝑚−1 utdallas 12 𝑘−1 Beta function 𝐵 𝑚, 𝑘 = Also 𝐵 𝑘, 𝑚 = We consider Bernoulli trials where the success probability 𝑃 is constant but unknown. After 𝑛 trials, suppose that we observe 𝑚 success. Given these 𝑚 successes we can update the distribution of 𝑃, we are seeking P(𝑃 = 𝑝 𝐵𝑖𝑛(𝑛, 𝑃) = 𝑚): Γ 𝑘 Γ(𝑚) . Γ 𝑘+𝑚 1−𝑢 Page 1 𝑚−1 𝑢 0 .edu /~metin Common Continuous Random Variables Beta Random Variable 𝑑𝑢 = 𝐵(𝑘, 𝑚). This function works as a normalization constant. – P 𝑃 = 𝑝 𝐵𝑖𝑛 𝑛, 𝑃 = 𝑚 = P 𝑃=𝑝,𝐵𝑖𝑛 𝑛,𝑃 =𝑚 P Bin n,P =m = P 𝑃=𝑝,𝐵𝑖𝑛 𝑛,𝑃 =𝑚 0<𝑢<1 P 𝑃=𝑢,Bin n,P =m – We approximate P(𝑃 = 𝑝, 𝐵𝑖𝑛(𝑛, 𝑃) = 𝑚) by 𝑓𝑃 (𝑝)P(𝐵𝑖𝑛(𝑛, 𝑃) = 𝑚) which leads to 0<𝑢<1 P 𝑃 = 𝑢, 𝐵𝑖𝑛 𝑛, 𝑃 = 𝑚 ≈ 1 𝑓 0 𝑃 𝑢 P 𝐵𝑖𝑛 𝑛, 𝑢 = 𝑚 𝑑𝑢 where 𝑓𝑃 is the pdf of the success probability 𝑃. – – For 𝑋 ≡ 𝑃 𝐵𝑖𝑛 𝑛, 𝑃 = 𝑚 𝑓𝑃 𝑝 P 𝐵𝑖𝑛 𝑛, 𝑝 = 𝑚 𝑓𝑋 𝑝 = 1 = 𝑓 𝑢 P 𝐵𝑖𝑛 𝑛, 𝑢 = 𝑚 𝑑𝑢 0 𝑃 𝑛 𝑚 𝑓𝑃 𝑝 𝐶𝑚 𝑝 1−𝑝 1 𝑓 0 𝑃 𝑛 𝑚 𝑢 𝐶𝑚 𝑢 1−𝑢 𝑛−𝑚 𝑛−𝑚 𝑑𝑢 = 𝑓𝑃 𝑝 𝑝𝑚 1 − 𝑝 1 𝑓 0 𝑃 𝑢 𝑢𝑚 1 − 𝑢 𝑛 𝑛−𝑚 𝑑𝑢 To simplify further suppose 𝑓𝑃 is uniform, 𝑓𝑋 𝑝 = 𝑝𝑚 1−𝑝 𝑛 1 𝑚 0 𝑢 1−𝑢 𝑛 𝑑𝑢 = 𝑝𝑚 1−𝑝 𝑛−𝑚 , posterior probability of success given 𝑚 successes out of 𝑛 𝐵(𝑚+1,𝑛−𝑚+1) In general, Beta random variable has 𝑓𝑋 𝑥 = Ex: E 𝑋 = 1 𝑥 𝛼−1 1−𝑥 𝜆−1 𝑥 𝑑𝑥 0 𝐵(𝛼,𝜆) = 1 𝐵 𝛼,𝜆 𝑥 𝛼−1 1−𝑥 𝜆−1 B(𝛼,𝜆) 𝐵 𝛼 + 1, 𝜆 = for 0 ≤ 𝑥 ≤ 1 and 𝛼, 𝜆 > 0 Γ 𝛼+𝜆 Γ 𝛼+1 Γ 𝜆 Γ 𝛼 Γ(𝜆) Γ 𝛼+𝜆+1 = 𝛼 𝛼+𝜆 1 𝑥−𝜇 𝑓𝑋 𝑥 = exp − 2𝜎 2 2𝜋 𝜎 utdallas The cdf can be computed only numerically. Ex: The density integrates to 1. First note that ∞ 1 exp −∞ 2𝜋 𝜎 2 On the other hand, 𝑧12 exp − 𝑑𝑧1 2 −∞ − 𝑥−𝜇 2 2𝜎2 𝑑𝑥 = ∞ exp 2𝜋 −∞ 1 𝑧22 exp − 𝑑𝑧2 = 2 −∞ ∞ ∞ ∞ −∞ − 𝑧2 2 𝑑𝑧 with 𝑧 = (𝑥 − 𝜇)/𝜎 𝑧12 + 𝑧22 exp − 𝑑𝑧2 𝑑𝑧1 = 2 −∞ ∞ 2𝜋 0 ∞ 0 𝑟2 𝑟exp − 𝑑𝑟𝑑𝜃 2 The last equality is from transformation to polar coordinates 𝑟 2 = 𝑧12 + 𝑧22 and 𝜃 = arccos Finally, Ex: E 𝑋 = 2𝜋 ∞ 𝑟exp 0 0 ∞ 1 𝑥 exp −∞ 2𝜋 𝜎 − − 𝑟2 2 𝑥−𝜇 2 2𝜎2 =𝜇 ∞ 𝑑𝑟𝑑𝜃 = 𝑑𝑥 = 1 −∞ 2𝜋 2𝜋 ∞ 𝑑𝜃 𝑟exp 0 0 ∞ (𝜇 −∞ exp − =1 𝑧2 2 + 𝑧𝜎) 𝑑𝑥 + 𝜎 1 − 𝑟2 2 𝑑𝑟 = 2𝜋 exp − 2𝜋 ∞ 𝑧 −∞ 2𝜋 𝑧2 2 ∞ exp 0 𝑑𝑥 = 𝜇 exp − =0 𝑧2 2 −𝑢 𝑑𝑢 = 2𝜋. ∞ 1 −∞ 2𝜋 𝑑𝑥 = 𝜇 𝑧1 𝑟 exp − 𝑧2 2 𝑑𝑥 13 Normal density is symmetric around its mean (mode) and has light tails. The range for the normal random variable 𝑁𝑜𝑟𝑚𝑎𝑙(𝜇, 𝜎 2 ) is all real numbers and the density is Page .edu /~metin Common Continuous Random Variables Normal Random Variable P 𝑎𝑋 + 𝑏 ≤ 𝑢 = P 𝑋 ≤ 𝑑 P 𝑑𝑢 𝑋≤ 𝑢−𝑏 𝑎 𝑢−𝑏 𝑎 = and differentiate with respect to 𝑢 𝑢−𝑏 𝑑 𝑎 −∞ 𝑑𝑢 1 exp 2𝜋 𝜎 We obtain the density for 𝑁𝑜𝑟𝑚𝑎𝑙 𝑎𝜇 𝑥−𝜇 2 − 2𝜎2 𝑑𝑥 + 𝑏, 𝑎2 𝜎 2 . = 1 exp 2𝜋 𝑎𝜎 − 𝑢−𝑏−𝑎𝜇 2 2𝑎2 𝜎2 Ex: Partial expected value for 𝑋 ∼ 𝑁𝑜𝑟𝑚𝑎𝑙 𝜇, 𝜎 2 upto 𝑎. 𝑎 𝑎 1 𝑥−𝜇 2 1 𝑧2 E 𝑋I𝑋≤𝑎 = 𝑥 exp − 𝑑𝑥 = (𝜇 + 𝑧𝜎) exp − 𝑑𝑥 2 2𝜎 2 2𝜋 𝜎 2𝜋 −∞ −∞ = 𝜇F𝑁𝑜𝑟𝑚𝑎𝑙 0,1 = 𝜇F𝑁𝑜𝑟𝑚𝑎𝑙 𝜇 1 +𝜎 exp −𝑢 𝑑𝑢 𝜎 2𝜋 ∞ 𝑎−𝜇 𝑎−𝜇 − 𝜎𝑓𝑁𝑜𝑟𝑚𝑎𝑙 0,1 𝜎 𝜎 𝑎− 0,1 𝑎−𝜇 2 /2 𝜎 utdallas 14 Ex: What is the distribution of 𝑎𝑋 + 𝑏 if 𝑋 is 𝑁𝑜𝑟𝑚𝑎𝑙 𝜇, 𝜎 2 . We can consider Page .edu /~metin Common Continuous Random Variables Normal Random Variable Ex: Find the moment E(𝑋 𝑘 ). ∞ 𝑦−𝜇 2 E 𝑋 = E exp 𝑘𝑌 = exp 𝑘𝑦 exp − 𝑑𝑦 2 2𝜎 2𝜋 𝜎 −∞ ∞ 1 𝑢2 = exp 𝑘𝜇 exp 𝑘𝑢 exp − 2 𝑑𝑢 2𝜎 2𝜋 𝜎 −∞ ∞ 2 2 2 2 𝑘 𝜎 1 (𝑢 − 𝑘𝜎 ) 𝑘2𝜎2 = exp 𝑘𝜇 exp exp − 𝑑𝑢 = exp 𝑘𝜇 exp 2 2 2𝜎 2 2𝜋 𝜎 −∞ 𝑘 1 =1 Finally, E 𝑋 𝑘 = exp 𝑘𝜇 + 1 2 𝑘𝜎 2 utdallas 15 𝑋 is lognormal random variable if 𝑋 = exp(𝑌) for 𝑌 ∼ 𝑁𝑜𝑟𝑚𝑎𝑙(𝜇, 𝜎 2 ) The range for lognormal is nonnegative reals. This is an advantage for modelling price, demand. Ex: Find the pdf of 𝑋 ln 𝑥 1 𝑦−𝜇 2 P 𝑋 ≤ 𝑥 = P 𝑌 ≤ ln 𝑥 = exp − 𝑑𝑦 2𝜎 2 2𝜋 𝜎 −∞ 𝑑 1 1 ln 𝑥 − 𝜇 2 𝑓𝑋 𝑥 = P 𝑋≤𝑥 = exp − 𝑑𝑥 𝑥 2𝜋 𝜎 2𝜎 2 Page .edu /~metin Common Continuous Random Variables Lognormal Random Variable utdallas Given rvs 𝑋, 𝑌 , the mixture 𝑍 can be obtained as 𝑋 with probability 𝑝 𝑍= 𝑌 with probability 1 − 𝑝 Then we have 𝐹𝑍 𝑧 = 𝑝𝐹𝑋 𝑧 + 1 − 𝑝 𝐹𝑌 (𝑧). Mixing allows us to create new rvs and obtain richer examples. Ex: Consider the mixture of a mass of 𝑞 at zero with 𝑒𝑥𝑝𝑜 𝜆 random variable whose cdf is 𝑞 if 𝑧 = 0 𝐹𝑍 (𝑧) = 𝑞 + (1 − 𝑞)(1 − 𝑒𝑥𝑝(−𝜆𝑧)) if 𝑧 > 0 Random variables derived from others through max or min operators can have masses at the end of their ranges. – – 16 Page Mixtures of Random variables /~metin .edu Product returns due to unmet expectations to a retailer can be treated as negative demand, then the demand 𝐷 ∈ ℜ . If you want only the new customer demand for products, you should consider max{0, 𝐷} which has a mass at 0. In general, any random variable can be represented as a combination of cdfs of a discrete rv, a singularly continuous rv and an absolutely continuous rv. utdallas Random variable 𝑋 can be described uniquely by all of its moments: E 𝑋 , E 𝑋 2 , … , E 𝑋 𝑘 , … A function that yields all of the moments uniquely identifies the associated random variable A such function is moment generating function 𝑚𝑋 (𝑡) = ∞ −∞ exp Since exp 𝑡𝑥 = 1 + 𝑡𝑥 + 𝑡𝑥 2 2! 𝑚𝑋 𝑡 = ∞ 𝑥=−∞ 𝑡𝑥 2 2! = ∞ 𝑡 𝑖=0 𝑖! 𝑖 1 + 𝑡𝑥 + 𝑡𝑥 𝑝𝑋 (𝑥) and 𝑚𝑋 (𝑡) = + 𝑡𝑥 3 3! + 𝑡𝑥 3 3! E(𝑋 i ) Insert some examples: To be added + ⋯+ 𝑡𝑥 𝑖 𝑖! +⋯ + ⋯+ 𝑡𝑥 𝑖 𝑖! +⋯ ∞ exp −∞ 𝑝𝑋 𝑥 𝑡𝑥 𝑓𝑋 𝑥 𝑑𝑥 17 Page Moment Generating Functions /~metin .edu Continuous random variables and density Common continuous random variables Moment generating function utdallas 18 Page Summary /~metin .edu
© Copyright 2024 Paperzz