{"categories":["Probability Theory"],"contentHtml":"<h4>Lecture Notes</h4><p>Recall for a discrete random variable. The moment formula is</p><p><math><mi>𝔼</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>𝑋</mi><mo form=\"postfix\" stretchy=\"false\">]</mo><mo>=</mo><msub><mo form=\"prefix\" lspace=\"0em\">∑</mo><mrow><mi>𝑥</mi><mo lspace=\"0em\" rspace=\"0em\">∈</mo><mi>𝑋</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi mathvariant=\"normal\">Ω</mi><mo stretchy=\"false\">)</mo></mrow></msub><mi>𝑥</mi><mi>ℙ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑋</mi><mo>=</mo><mi>𝑥</mi><mo stretchy=\"false\">)</mo></math></p><p>The moment for a continuous rv is the integral</p><p><math><mi>𝔼</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>𝑋</mi><mo form=\"postfix\" stretchy=\"false\">]</mo><mo>=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mrow><mo>−</mo><mi>∞</mi></mrow><mi>∞</mi></msubsup><mi>𝑥</mi><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mi>𝑑</mi><mi>𝑥</mi></math></p><p>All the possibilities are the real line here.</p><p>Most of today’s class will deal with integrals. We are going to calculate a lot of these, just like a single variable calculus class. We will also learn multivariable calculus for multiple variables.</p><p>Generalization of expectation for any function is definition 5.9 (skip technical assumptions)</p><p><math><mi>𝔼</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>ℎ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑋</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo form=\"postfix\" stretchy=\"false\">]</mo><mo>=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mrow><mo>−</mo><mi>∞</mi></mrow><mi>∞</mi></msubsup><mi>ℎ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mi>𝑑</mi><mi>𝑥</mi></math></p><p>You would just compute the antiderivative of <math><mi>ℎ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo stretchy=\"false\">)</mo></math> and then evaluate the integral by subtracting the top from bottom. For an indicator variable, it is 0 to 1 not -infinity to infinity.</p><p>Now I want to go further, I want to know the full distribution, not just the expectation, of <math><mi>ℎ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑋</mi><mo stretchy=\"false\">)</mo></math></p><p>This is given by theorem 5.10 which tells us how to determine the probability density function. The PDF of <math><mi>𝑌</mi><mo>=</mo><mi>ℎ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑋</mi><mo stretchy=\"false\">)</mo></math> is given by</p><p><math><msub><mi>𝑓</mi><mi>𝑌</mi></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑦</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mfrac><mn>1</mn><mrow><msup><mi>ℎ</mi><mo>′</mo></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑦</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo stretchy=\"false\">)</mo></mrow></mfrac><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo form=\"postfix\" stretchy=\"false\">)</mo><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑦</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><msub><mi>𝐼</mi><mrow><mo>{</mo><mrow><mi>𝑦</mi><mo lspace=\"0em\" rspace=\"0em\">∈</mo><mi>ℎ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝐷</mi><mo stretchy=\"false\">)</mo></mrow><mo>}</mo></mrow></msub></math></p><p>Here, <math><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo stretchy=\"false\">)</mo></math> denotes the composition of f on inverse h. First I apply the inverse h, then I apply the f.&nbsp;Sometimes you use the notation <math><mi>𝑓</mi><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">∘</mo><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup></math></p><p>How do you prove this? We will sketch. We will make the assumption that <math><mi>ℎ</mi></math> is non-decreasing.</p><p><math><mi>ℙ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑌</mi><mo>≤</mo><mi>𝑦</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mi>ℙ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>ℎ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑋</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>≤</mo><mi>𝑦</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mi>ℙ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑋</mi><mo>≤</mo><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑦</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo stretchy=\"false\">)</mo></math></p><p>We can do the inverse because it’s non-decreasing.</p><p>This is true, so we can write this probability as the integral of the PDF of X</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mrow><mo>−</mo><mi>∞</mi></mrow><mrow><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑦</mi><mo stretchy=\"false\">)</mo></mrow></msubsup><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mi>𝑑</mi><mi>𝑥</mi></math></p><p>If I want to say the PDF of the random variable <math><mi>𝑌</mi></math>, then it gets the <math><mi>𝑌</mi></math> subscript; without the subscript, it’s for <math><mi>𝑋</mi></math>.</p><p>Now we will do a change of variables</p><p><math><mi>𝑥</mi><mo>=</mo><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑧</mi><mo stretchy=\"false\">)</mo></math></p><p>We know that <math><mi>𝑥</mi></math> is inside the integral, so we will write the equivalence that when it is in between those two values, it is equivalent to the event that <math><mi>𝑧</mi></math> is in between <math><mo>−</mo><mi>∞</mi></math> and <math><mi>𝑦</mi></math>.</p><p>This is important because we will change the integration range:</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mrow><mo>−</mo><mi>∞</mi></mrow><mi>𝑦</mi></msubsup><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑧</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo form=\"postfix\" stretchy=\"false\">)</mo><mi>𝑑</mi><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑧</mi><mo stretchy=\"false\">)</mo></math></p><p>You can move this part to the front</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mrow><mo>−</mo><mi>∞</mi></mrow><mi>𝑦</mi></msubsup><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑧</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo form=\"postfix\" stretchy=\"false\">)</mo><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><mo lspace=\"0em\" rspace=\"0em\">|</mo><mo form=\"prefix\" stretchy=\"false\">(</mo><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><msup><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>′</mo></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑧</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo lspace=\"0em\" rspace=\"0em\">|</mo><mi>𝑑</mi><mi>𝑧</mi></math></p><p>We will see that</p><p><math><msub><mi>𝑓</mi><mi>𝑌</mi></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑦</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mfrac><mi>𝑑</mi><mrow><mi>𝑑</mi><mi>𝑦</mi></mrow></mfrac><mi>ℙ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑌</mi><mo>≤</mo><mi>𝑦</mi><mo stretchy=\"false\">)</mo></math></p><p>Now if we take the derivative of this integral, then we get</p><p><math><mfrac><mi>𝑑</mi><mrow><mi>𝑑</mi><mi>𝑦</mi></mrow></mfrac><msubsup><mo form=\"prefix\">∫</mo><mrow><mo>−</mo><mi>∞</mi></mrow><mi>𝑦</mi></msubsup><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑧</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo form=\"postfix\" stretchy=\"false\">)</mo><mo lspace=\"0em\" rspace=\"0em\">|</mo><mo form=\"prefix\" stretchy=\"false\">(</mo><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><msup><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>′</mo></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑧</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo lspace=\"0em\" rspace=\"0em\">|</mo><mi>𝑑</mi><mi>𝑧</mi></math></p><p>We get something like the fundamental theorem of calculus here, or part of it, or Leibniz rule. you have the following result: <math><mfrac><mi>𝑑</mi><mrow><mi>𝑑</mi><mi>𝑥</mi></mrow></mfrac><mrow><mo>(</mo><mrow><msubsup><mo lspace=\"0em\">∫</mo><mrow><mo>−</mo><mi>∞</mi></mrow><mi>𝑥</mi></msubsup><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑢</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mi>𝑑</mi><mi>𝑢</mi></mrow><mo>)</mo></mrow><mo>=</mo><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo stretchy=\"false\">)</mo></math></p><p>This identity is learned in calculus.</p><p>So, we can show that everything inside doesn’t depend on <math><mi>𝑦</mi></math>, so we can just evaluate the integral with it.</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑦</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo form=\"postfix\" stretchy=\"false\">)</mo><mo lspace=\"0em\" rspace=\"0em\">|</mo><mo form=\"prefix\" stretchy=\"false\">(</mo><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><msup><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>′</mo></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑦</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo stretchy=\"false\">|</mo></math></p><p>Then we will use this result, from a second theorem of calculus called the implicit function theorem. This is more real analysis, here’s a simple example.</p><p><math><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>ℎ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑦</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mi>𝑦</mi></math></p><p>Now the idea is we want to do differentiation on both sides.</p><p><math><mfrac><mi>𝑑</mi><mrow><mi>𝑑</mi><mi>𝑦</mi></mrow></mfrac><mo form=\"prefix\" stretchy=\"false\">(</mo><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>ℎ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑦</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mfrac><mi>𝑑</mi><mrow><mi>𝑑</mi><mi>𝑦</mi></mrow></mfrac><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑦</mi><mo stretchy=\"false\">)</mo></math></p><p>Because we have this equality, the derivative preserves the equality (maybe not integration because of range). Applying the chain rule, we get</p><p><math><mo stretchy=\"false\">(</mo><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><msup><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>′</mo></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>ℎ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑦</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mfrac><mn>1</mn><mrow><msup><mi>ℎ</mi><mo>′</mo></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑦</mi><mo stretchy=\"false\">)</mo></mrow></mfrac></math></p><p>And then we do a change of variable.</p><p><math><mi>𝑦</mi><mo>=</mo><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑢</mi><mo stretchy=\"false\">)</mo></math></p><p>y is just a dummy variable, so we can apply this here, to finally show that</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑦</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo form=\"postfix\" stretchy=\"false\">)</mo><mrow><mo>|</mo><mfrac><mn>1</mn><mrow><msup><mi>ℎ</mi><mo>′</mo></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑦</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo stretchy=\"false\">)</mo></mrow></mfrac><mo>|</mo></mrow></math> Interesting corollary 5.11 that if X has pdf f and we have a Y which is aX + b, then pdf of Y is</p><p><math><msub><mi>𝑓</mi><mi>𝑌</mi></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑦</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mfrac><mn>1</mn><mrow><mo stretchy=\"false\">|</mo><mi>𝑎</mi><mo stretchy=\"false\">|</mo></mrow></mfrac><mi>𝑓</mi><mrow><mo>(</mo><mfrac><mrow><mi>𝑦</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mi>𝑏</mi></mrow><mi>𝑎</mi></mfrac><mo>)</mo></mrow></math></p><p>This is a special case when the <math><mi>ℎ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo stretchy=\"false\">)</mo></math> is <math><mi>𝑎</mi><mi>𝑋</mi><mo>+</mo><mi>𝑏</mi></math>, can be shown by differentiation. All you need to find is <math><msup><mi>ℎ</mi><mo>′</mo></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo stretchy=\"false\">)</mo></math> and <math><msup><mi>ℎ</mi><mrow><mo>−</mo><mn>1</mn></mrow></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑦</mi><mo stretchy=\"false\">)</mo></math></p><p>We can essentially think of <math><mi>𝑌</mi></math> as a linear combination of a different random variable whose pdf is known, and then we can derive the pdf from the existing pdf f.</p><h5>5.4.1</h5><p>We are concerned with a uniform random variable defined continuously on <math><mo stretchy=\"false\">[</mo><mi>𝑎</mi><mo>,</mo><mi>𝑏</mi><mo stretchy=\"false\">]</mo></math> on <math><mi>ℝ</mi></math></p><p>Definition 5.13 says that the pdf of this is</p><p><math><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mfrac><mn>1</mn><mrow><mi>𝑏</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mi>𝑎</mi></mrow></mfrac><mo>,</mo><mi>𝑥</mi><mo>∈</mo><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>𝑎</mi><mo>,</mo><mi>𝑏</mi><mo stretchy=\"false\">]</mo></math></p><p>We will use the notation to indicate uniform distribution</p><p><math><mi>𝑥</mi><mo>∼</mo><mi>𝑈</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>𝑎</mi><mo>,</mo><mi>𝑏</mi><mo stretchy=\"false\">]</mo></math></p><p>Let’s do something non-trivial. Proposition 5.15 says that if we have <math><mi>𝑋</mi><mo>∼</mo><mi>𝑈</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>𝑎</mi><mo>,</mo><mi>𝑏</mi><mo stretchy=\"false\">]</mo></math>, then</p><p><math><mi>𝔼</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>𝑋</mi><mo form=\"postfix\" stretchy=\"false\">]</mo><mo>=</mo><mfrac><mrow><mi>𝑎</mi><mo lspace=\"0em\" rspace=\"0em\">+</mo><mi>𝑏</mi></mrow><mn>2</mn></mfrac></math></p><p><math><mi>𝕍</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>𝑋</mi><mo form=\"postfix\" stretchy=\"false\">]</mo><mo>=</mo><mfrac><mrow><mo stretchy=\"false\">(</mo><mi>𝑏</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mi>𝑎</mi><msup><mo stretchy=\"false\">)</mo><mn>2</mn></msup></mrow><mn>12</mn></mfrac></math></p><p>How do we prove? We can create the integral based on the definition</p><p>We have from algebra that</p><p><math><msup><mi>𝑏</mi><mn>3</mn></msup><mo>−</mo><msup><mi>𝑎</mi><mn>3</mn></msup><mo>=</mo><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑏</mi><mo>−</mo><mi>𝑎</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo form=\"prefix\" stretchy=\"false\">(</mo><msup><mi>𝑎</mi><mn>2</mn></msup><mo>+</mo><mi>𝑎</mi><mi>𝑏</mi><mo>+</mo><msup><mi>𝑏</mi><mn>2</mn></msup><mo stretchy=\"false\">)</mo></math></p><p>which we can use to prove the variance.</p><p>We are generally solving for</p><p><math><mfrac><mn>1</mn><mrow><mi>𝑏</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mi>𝑎</mi></mrow></mfrac><msubsup><mo form=\"prefix\">∫</mo><mi>𝑎</mi><mi>𝑏</mi></msubsup><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mi>𝑑</mi><mi>𝑥</mi></math></p><p>and that’s how we solve for expectation, for <math><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo stretchy=\"false\">)</mo></math> being <math><mi>𝑥</mi></math> or <math><msup><mi>𝑥</mi><mn>2</mn></msup></math></p><p>We have to turn these types of problems into a pdf, that will be done on the midterm.</p><p>What is the cdf for a uniform variable?</p><p>By proposition 5.16, it’s</p><p><math><msub><mi>𝐹</mi><mi>𝑋</mi></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mo form=\"prefix\" stretchy=\"false\">{</mo><mn>0</mn><mspace width=\"0.2222em\"></mspace><mtext>if </mtext><mspace width=\"0.2222em\"></mspace><mi>𝑡</mi><mo>&lt;</mo><mi>𝑎</mi><mspace width=\"0.2222em\"></mspace><mfrac><mrow><mi>𝑡</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mi>𝑎</mi></mrow><mrow><mi>𝑏</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mi>𝑎</mi></mrow></mfrac><mspace width=\"0.2222em\"></mspace><mtext>if </mtext><mspace width=\"0.2222em\"></mspace><mi>𝑡</mi><mo>∈</mo><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>𝑎</mi><mo>,</mo><mi>𝑏</mi><mo form=\"postfix\" stretchy=\"false\">]</mo><mspace width=\"0.2222em\"></mspace><mn>1</mn><mspace width=\"0.2222em\"></mspace><mtext>if </mtext><mspace width=\"0.2222em\"></mspace><mi>𝑡</mi><mo>&gt;</mo><mi>𝑏</mi></math></p><p>This is the same as <math><mi>ℙ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑋</mi><mo>≤</mo><mi>𝑡</mi><mo stretchy=\"false\">)</mo></math></p><p>We can accomplish this case conclusion by the integral</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mi>𝑎</mi><mi>𝑡</mi></msubsup><mfrac><mn>1</mn><mrow><mi>𝑏</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mi>𝑎</mi></mrow></mfrac><msub><mi>𝐼</mi><mrow><mo stretchy=\"false\">[</mo><mi>𝑎</mi><mo rspace=\"0em\">,</mo><mi>𝑏</mi><mo stretchy=\"false\">]</mo></mrow></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑢</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mi>𝑑</mi><mi>𝑢</mi></math> Very simple proof for this.</p><p>Now let’s consider a simple example 5.8 where <math><mi>𝑋</mi><mo>∼</mo><mi>𝑈</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><mn>0</mn><mo>,</mo><mn>1</mn><mo stretchy=\"false\">]</mo></math>, we will compute <math><mi>ℙ</mi><mrow><mo>(</mo><mrow><mfrac><mn>1</mn><mn>4</mn></mfrac><mo>≤</mo><mi>𝑥</mi><mo>≤</mo><mfrac><mn>3</mn><mn>4</mn></mfrac></mrow><mo>)</mo></mrow></math></p><p>To solve, this we will solve as an integral</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mfrac><mn>1</mn><mn>4</mn></mfrac><mfrac><mn>3</mn><mn>4</mn></mfrac></msubsup><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mi>𝑑</mi><mi>𝑥</mi><mo>=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mfrac><mn>1</mn><mn>4</mn></mfrac><mfrac><mn>3</mn><mn>4</mn></mfrac></msubsup><mn>1</mn><mi>𝑑</mi><mi>𝑥</mi><mo>=</mo><mfrac><mn>1</mn><mn>2</mn></mfrac></math></p><p>This is one way to solve this, or you could separate it into cdf up to ¾ and ¼.</p><h5>5.4.2</h5><p>The next thing is the exponential distribution, definition 5.17. We introduce the auxiliary parameter <math><mi>𝜆</mi><mo>&gt;</mo><mn>0</mn></math>, then</p><p><math><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mi>𝜆</mi><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><mo rspace=\"0em\">,</mo><mspace width=\"0.2222em\"></mspace><mi>𝑥</mi><mo>&gt;</mo><mn>0</mn><mo rspace=\"0em\">,</mo><mspace width=\"0.2222em\"></mspace><mi>𝑋</mi><mo>∼</mo><mtext>Exp</mtext><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝜆</mi><mo stretchy=\"false\">)</mo></math></p><p>That is what is meant when we are given a distribution. How do we verify that this result is a pdf? Proposition 5.18 says</p><p><math><msubsup><mo lspace=\"0em\">∫</mo><mrow><mo>−</mo><mi>∞</mi></mrow><mi>∞</mi></msubsup><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mi>𝑑</mi><mi>𝑥</mi></math></p><p>The range of integration starts from 0</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mi>𝜆</mi><msubsup><mo form=\"prefix\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><mi>𝑑</mi><mi>𝑥</mi></math></p><p>Now we can do some calculus</p><p><math><mfrac><mi>𝑑</mi><mrow><mi>𝑑</mi><mi>𝑥</mi></mrow></mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><mo>=</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><mo form=\"prefix\" stretchy=\"false\">(</mo><mo form=\"prefix\">−</mo><mi>𝜆</mi><mo stretchy=\"false\">)</mo></math></p><p><math><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><mo>=</mo><mfrac><mrow><mfrac><mi>𝑑</mi><mrow><mi>𝑑</mi><mi>𝑥</mi></mrow></mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup></mrow><mrow><mo>−</mo><mi>𝜆</mi></mrow></mfrac></math></p><p><math><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><mi>𝑑</mi><mi>𝑥</mi><mo>=</mo><mi>𝑑</mi><mrow><mo>(</mo><mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><mrow><mo>−</mo><mi>𝜆</mi></mrow></mfrac><mo>)</mo></mrow></math></p><p>Now we can do integration by parts, which is a very important technique for this chapter that we will do over and over again.</p><p>If we are interested in integrating</p><p><math><mi>𝜆</mi><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mi>𝑑</mi><mi>𝑔</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><mi>𝑔</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>−</mo><mi>𝜆</mi><mi>𝑔</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>−</mo><mo form=\"prefix\" lspace=\"0em\">∫</mo><mi>𝑔</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mi>𝑑</mi><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo stretchy=\"false\">)</mo></math></p><p>And this is the process of integration by parts.</p><p>(We don’t actually need integration by parts here, but we will need to do it for the moments)</p><p>Now we will show the moments by proposition 5.19</p><p><math><mi>𝔼</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>𝑋</mi><mo form=\"postfix\" stretchy=\"false\">]</mo><mo>=</mo><mfrac><mn>1</mn><mi>𝜆</mi></mfrac></math></p><p><math><mi>𝕍</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>𝑋</mi><mo form=\"postfix\" stretchy=\"false\">]</mo><mo>=</mo><mfrac><mn>1</mn><msup><mi>𝜆</mi><mn>2</mn></msup></mfrac></math></p><p>We will now try to evaluate this integral</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mi>𝜆</mi><msubsup><mo form=\"prefix\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><mi>𝑥</mi><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><mi>𝑑</mi><mi>𝑥</mi></math></p><p>And this is where we need integration by parts</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mi>𝜆</mi><msubsup><mo form=\"prefix\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><mi>𝑥</mi><mi>𝑑</mi><mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><mrow><mo>−</mo><mi>𝜆</mi></mrow></mfrac></math> First we take the product</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mi>𝜆</mi><mrow><mo>(</mo><mrow><mi>𝑥</mi><mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><mrow><mo>−</mo><mi>𝜆</mi></mrow></mfrac><msubsup><mo lspace=\"0em\" rspace=\"0em\">|</mo><mrow><mi>𝑥</mi><mo lspace=\"0em\" rspace=\"0em\">=</mo><mn>0</mn></mrow><mrow><mi>𝑥</mi><mo lspace=\"0em\" rspace=\"0em\">=</mo><mi>∞</mi></mrow></msubsup><mo>−</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><mrow><mo>−</mo><mi>𝜆</mi></mrow></mfrac><mi>𝑑</mi><mi>𝑥</mi></mrow><mo>)</mo></mrow></math></p><p>Variance is not easy because you need to integrate twice by parts.</p><p><math><mi>𝔼</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><msup><mi>𝑋</mi><mn>2</mn></msup><mo form=\"postfix\" stretchy=\"false\">]</mo><mo>=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mi>𝑥</mi><mn>2</mn></msup><mi>𝜆</mi><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><mi>𝑑</mi><mi>𝑥</mi><mo>=</mo><mi>𝜆</mi><msubsup><mo form=\"prefix\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mi>𝑥</mi><mn>2</mn></msup><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><mi>𝑑</mi><mi>𝑥</mi><mo>=</mo><mi>𝜆</mi><msubsup><mo form=\"prefix\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mi>𝑥</mi><mn>2</mn></msup><mi>𝑑</mi><mrow><mo>(</mo><mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><mrow><mo>−</mo><mi>𝜆</mi></mrow></mfrac><mo>)</mo></mrow></math></p><p>We will try now to get rid of that denominator to get</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mo form=\"prefix\">−</mo><msubsup><mo form=\"prefix\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mi>𝑥</mi><mn>2</mn></msup><mi>𝑑</mi><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup></math></p><p>Integration by parts:</p><p><math><mo>−</mo><msup><mi>𝑥</mi><mn>2</mn></msup><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><msubsup><mo lspace=\"0em\" rspace=\"0em\">|</mo><mrow><mi>𝑥</mi><mo lspace=\"0em\" rspace=\"0em\">=</mo><mn>0</mn></mrow><mrow><mi>𝑥</mi><mo lspace=\"0em\" rspace=\"0em\">=</mo><mi>∞</mi></mrow></msubsup><mo>−</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><mi>𝑑</mi><msup><mi>𝑥</mi><mn>2</mn></msup></math></p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mo form=\"prefix\">−</mo><mrow><mo>(</mo><mrow><mn>0</mn><mo>−</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><mn>2</mn><mi>𝑥</mi><mi>𝑑</mi><mi>𝑥</mi></mrow><mo>)</mo></mrow></math></p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mn>2</mn><msubsup><mo form=\"prefix\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><mi>𝑥</mi><mi>𝑑</mi><mi>𝑥</mi></math></p><p>And we already have shown this result so it is</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mfrac><mn>2</mn><msup><mi>𝜆</mi><mn>2</mn></msup></mfrac></math></p><p>And then after subtracting by the expectation squared you get</p><p><math><mi>𝕍</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>𝑋</mi><mo form=\"postfix\" stretchy=\"false\">]</mo><mo>=</mo><mfrac><mn>1</mn><msup><mi>𝜆</mi><mn>2</mn></msup></mfrac></math></p><p>What is the cdf of the exponential random variable? Proposition 5.20 will tell us that</p><p><math><msub><mi>𝐹</mi><mi>𝑋</mi></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mn>1</mn><mo>−</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup></math></p><p>Here is the proof, which is just calculation</p><p><math><msub><mi>𝐹</mi><mi>𝑋</mi></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mn>0</mn><mi>𝑥</mi></msubsup><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑢</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mi>𝑑</mi><mi>𝑢</mi><mo>=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mn>0</mn><mi>𝑥</mi></msubsup><mi>𝜆</mi><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑢</mi></mrow></msup><mi>𝑑</mi><mi>𝑢</mi></math></p><p>The difference between a CDF and a statistical measure is that we’re measuring up to (x), not infinity, but the technique is the same.</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mi>𝜆</mi><msubsup><mo form=\"prefix\">∫</mo><mn>0</mn><mi>𝑥</mi></msubsup><mi>𝑑</mi><mrow><mo>(</mo><mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑢</mi></mrow></msup><mrow><mo>−</mo><mi>𝜆</mi></mrow></mfrac><mo>)</mo></mrow><mo>=</mo><mi>𝜆</mi><mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑢</mi></mrow></msup><mrow><mo>−</mo><mi>𝜆</mi></mrow></mfrac><msubsup><mo stretchy=\"false\">|</mo><mrow><mi>𝑢</mi><mo lspace=\"0em\" rspace=\"0em\">=</mo><mn>0</mn></mrow><mrow><mi>𝑢</mi><mo lspace=\"0em\" rspace=\"0em\">=</mo><mi>𝑥</mi></mrow></msubsup></math></p><p>There is a memoryless property of the exponential distribution.</p><p><math><mi>ℙ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑋</mi><mo>&gt;</mo><mi>𝑡</mi><mo>+</mo><mi>𝑠</mi><mo lspace=\"0em\" rspace=\"0em\">|</mo><mi>𝑋</mi><mo>&gt;</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mi>ℙ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑋</mi><mo>&gt;</mo><mi>𝑠</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>,</mo><mi>𝑠</mi><mo>,</mo><mi>𝑡</mi><mo>≥</mo><mn>0</mn></math></p><p>I know that my exponential variable is bigger than t. There is some interval between t and t + s which is length s. I know my random variable <math><mi>𝑋</mi></math> is bigger than t + s, given that it is bigger than t. But actually it doesn’t really matter what the probability is between t and t + s, there is no memory of the starting point. You only care about the probability after s. (We will not prove this)</p><p>Let’s take example 5.9, it will be easy to prove the cdf</p><p><math><msub><mi>𝑓</mi><mi>𝑋</mi></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mfrac><mn>1</mn><mn>100</mn></mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mfrac><mi>𝑡</mi><mn>100</mn></mfrac></mrow></msup><mo>,</mo><mi>𝜆</mi><mo>=</mo><mfrac><mn>1</mn><mn>100</mn></mfrac></math></p><p>Then we get expectation by the formula <math><mfrac><mn>1</mn><mi>𝜆</mi></mfrac></math> How do we solve if we are given probability between an interval like</p><p><math><mi>ℙ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>≤</mo><mi>𝑋</mi><mo>≤</mo><mn>50</mn><mo stretchy=\"false\">)</mo></math></p><p>We take the integral between these two points.</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mn>0</mn><mn>50</mn></msubsup><mfrac><mn>1</mn><mn>100</mn></mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mfrac><mi>𝑡</mi><mn>100</mn></mfrac></mrow></msup><mi>𝑑</mi><mi>𝑡</mi></math></p><p>And we can actually do a change of variable here from</p><p><math><mi>𝑠</mi><mo>=</mo><mfrac><mi>𝑡</mi><mn>100</mn></mfrac></math></p><p>Which will give us</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mn>0</mn><mfrac><mn>1</mn><mn>2</mn></mfrac></msubsup><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑠</mi></mrow></msup><mi>𝑑</mi><mi>𝑠</mi><mo>=</mo><mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑠</mi></mrow></msup><mrow><mo>−</mo><mn>1</mn></mrow></mfrac><msubsup><mo lspace=\"0em\" rspace=\"0em\">|</mo><mrow><mi>𝑠</mi><mo lspace=\"0em\" rspace=\"0em\">=</mo><mn>0</mn></mrow><mrow><mi>𝑠</mi><mo lspace=\"0em\" rspace=\"0em\">=</mo><mfrac><mn>1</mn><mn>2</mn></mfrac></mrow></msubsup><mo>=</mo><mfrac><mrow><msup><mi>𝑒</mi><mrow><mo>−</mo><mfrac><mn>1</mn><mn>2</mn></mfrac></mrow></msup><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow><mrow><mo>−</mo><mn>1</mn></mrow></mfrac><mo>=</mo><mn>1</mn><mo>−</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><mfrac><mn>1</mn><mn>2</mn></mfrac></mrow></msup></math></p><h5>5.4.3</h5><p>The normal distribution by definition 5.22 has the distribution function</p><p><math><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mfrac><mn>1</mn><msqrt><mn>2</mn><mi>𝜋</mi><msup><mi>𝜎</mi><mn>2</mn></msup></msqrt></mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mfrac><mrow><mo stretchy=\"false\">(</mo><mi>𝑥</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mi>𝜇</mi><msup><mo stretchy=\"false\">)</mo><mn>2</mn></msup></mrow><mrow><mn>2</mn><msup><mi>𝜎</mi><mn>2</mn></msup></mrow></mfrac></mrow></msup><mo>,</mo><mi>𝑥</mi><mo>∈</mo><mi>ℝ</mi></math></p><p>denoted by</p><p><math><mi>𝑋</mi><mo>∼</mo><mi>𝑁</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝜇</mi><mo>,</mo><msup><mi>𝜎</mi><mn>2</mn></msup><mo stretchy=\"false\">)</mo></math> We have to show that the normal distribution is a PDF, which is not very straightforward.</p><p>Proposition 5.24</p><p>Proposition 5.25 tells us that the expected value and variance are</p><p><math><mi>𝔼</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>𝑋</mi><mo form=\"postfix\" stretchy=\"false\">]</mo><mo>=</mo><mi>𝜇</mi></math></p><p><math><mi>𝕍</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>𝑋</mi><mo form=\"postfix\" stretchy=\"false\">]</mo><mo>=</mo><msup><mi>𝜎</mi><mn>2</mn></msup></math></p><p>which is very convenient for us. But we will need to formally verify this</p><p>We will copy this pdf into the integral</p><p><math><mi>𝔼</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>𝑋</mi><mo form=\"postfix\" stretchy=\"false\">]</mo><mo>=</mo><mfrac><mn>1</mn><msqrt><mn>2</mn><mi>𝜋</mi><msup><mi>𝜎</mi><mn>2</mn></msup></msqrt></mfrac><msubsup><mo form=\"prefix\">∫</mo><mrow><mo>−</mo><mi>∞</mi></mrow><mi>∞</mi></msubsup><mi>𝑥</mi><msup><mi>𝑒</mi><mrow><mo>−</mo><mfrac><mrow><mo stretchy=\"false\">(</mo><mi>𝑥</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mi>𝜇</mi><msup><mo stretchy=\"false\">)</mo><mn>2</mn></msup></mrow><mrow><mn>2</mn><msup><mi>𝜎</mi><mn>2</mn></msup></mrow></mfrac></mrow></msup><mi>𝑑</mi><mi>𝑥</mi></math></p><p>And we are going to do a change of variable</p><p><math><mi>𝑦</mi><mo>=</mo><mi>𝑥</mi><mo>−</mo><mi>𝜇</mi></math></p><p>We have the same integration region because they are infinite. We can replace x in this whole function.</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mfrac><mn>1</mn><msqrt><mn>2</mn><mi>𝜋</mi><msup><mi>𝜎</mi><mn>2</mn></msup></msqrt></mfrac><msubsup><mo form=\"prefix\" rspace=\"0em\">∫</mo><mrow><mo>−</mo><mi>∞</mi></mrow><mi>∞</mi></msubsup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑦</mi><mo>+</mo><mi>𝜇</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><mfrac><msup><mi>𝑦</mi><mn>2</mn></msup><mrow><mn>2</mn><msup><mi>𝜎</mi><mn>2</mn></msup></mrow></mfrac></mrow></msup><mi>𝑑</mi><mi>𝑦</mi></math></p><p>We will separate the integral into two parts</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mfrac><mn>1</mn><msqrt><mn>2</mn><mi>𝜋</mi><msup><mi>𝜎</mi><mn>2</mn></msup></msqrt></mfrac><msubsup><mo form=\"prefix\">∫</mo><mrow><mo>−</mo><mi>∞</mi></mrow><mi>∞</mi></msubsup><mi>𝑦</mi><msup><mi>𝑒</mi><mrow><mo>−</mo><mfrac><msup><mi>𝑦</mi><mn>2</mn></msup><mrow><mn>2</mn><msup><mi>𝜎</mi><mn>2</mn></msup></mrow></mfrac></mrow></msup><mi>𝑑</mi><mi>𝑦</mi><mo>+</mo><mi>𝜇</mi><msubsup><mo form=\"prefix\">∫</mo><mrow><mo>−</mo><mi>∞</mi></mrow><mi>∞</mi></msubsup><msup><mi>𝑒</mi><mrow><mo>−</mo><mfrac><msup><mi>𝑦</mi><mn>2</mn></msup><mrow><mn>2</mn><msup><mi>𝜎</mi><mn>2</mn></msup></mrow></mfrac></mrow></msup><mi>𝑑</mi><mi>𝑦</mi></math></p><p>The first integrand is an odd function. This means that <math><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mo form=\"prefix\">−</mo><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mo form=\"prefix\">−</mo><mi>𝑥</mi><mo stretchy=\"false\">)</mo></math>. Even functions are <math><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mi>𝑓</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mo form=\"prefix\">−</mo><mi>𝑥</mi><mo stretchy=\"false\">)</mo></math>. For any integral from -infinity to infinity, we can combine all the negatives and all the positives. And if it is symmetric around 0 with the opposite, which is the meaning of odd, then when they’re added it should give you 0.</p><p>Then we can recognize that for the second integrand that it must be equal to <math><mi>𝜇</mi></math> by the fact that the normal distribution area is equal to 1 (assumed).</p><p>Now for the variance. By definition, because we know the expectation already, we get</p><p><math><mi>𝕍</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>𝑋</mi><mo form=\"postfix\" stretchy=\"false\">]</mo><mo>=</mo><mi>𝔼</mi><mrow><mo>[</mo><mrow><mo stretchy=\"false\">(</mo><mi>𝑋</mi><mo>−</mo><mi>𝜇</mi><msup><mo stretchy=\"false\">)</mo><mn>2</mn></msup></mrow><mo>]</mo></mrow></math></p><p>which by the pdf is</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mfrac><mn>1</mn><msqrt><mn>2</mn><mi>𝜋</mi><msup><mi>𝜎</mi><mn>2</mn></msup></msqrt></mfrac><msubsup><mo form=\"prefix\" rspace=\"0em\">∫</mo><mrow><mo>−</mo><mi>∞</mi></mrow><mi>∞</mi></msubsup><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo>−</mo><mi>𝜇</mi><msup><mo form=\"postfix\" stretchy=\"false\">)</mo><mn>2</mn></msup><msup><mi>𝑒</mi><mrow><mo>−</mo><mfrac><mrow><mo stretchy=\"false\">(</mo><mi>𝑥</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mi>𝜇</mi><msup><mo stretchy=\"false\">)</mo><mn>2</mn></msup></mrow><mrow><mn>2</mn><msup><mi>𝜎</mi><mn>2</mn></msup></mrow></mfrac></mrow></msup><mi>𝑑</mi><mi>𝑥</mi></math></p><p>Then we can do a change of variable, and then solve via polar coordinates on page 138</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mfrac><mn>1</mn><msqrt><mn>2</mn><mi>𝜋</mi><msup><mi>𝜎</mi><mn>2</mn></msup></msqrt></mfrac><msubsup><mo form=\"prefix\">∫</mo><mrow><mo>−</mo><mi>∞</mi></mrow><mi>∞</mi></msubsup><msup><mi>𝑦</mi><mn>2</mn></msup><msup><mi>𝑒</mi><mrow><mo>−</mo><mfrac><msup><mi>𝑦</mi><mn>2</mn></msup><mrow><mn>2</mn><msup><mi>𝜎</mi><mn>2</mn></msup></mrow></mfrac></mrow></msup><mi>𝑑</mi><mi>𝑦</mi></math></p><p>Remark 5.2.7 says that if <math><mi>𝑋</mi><mo>∼</mo><mi>𝑁</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>,</mo><mn>1</mn><mo stretchy=\"false\">)</mo></math>, then <math><mi>𝜇</mi><mo>+</mo><mi>𝜎</mi><mi>𝑋</mi><mo>∼</mo><mi>𝑁</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝜇</mi><mo>,</mo><msup><mi>𝜎</mi><mn>2</mn></msup><mo stretchy=\"false\">)</mo></math></p><p>The inverse operation</p><p><math><mi>𝑌</mi><mo>∼</mo><mi>𝑁</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝜇</mi><mo>,</mo><msup><mi>𝜎</mi><mn>2</mn></msup><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>,</mo><mfrac><mrow><mi>𝑌</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mi>𝜇</mi></mrow><mi>𝜎</mi></mfrac><mo>∼</mo><mi>𝑁</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>,</mo><mn>1</mn><mo stretchy=\"false\">)</mo></math></p><p>is known as <strong>standardization</strong>.</p><p>Proof: if you let</p><p><math><mi>𝑌</mi><mo>=</mo><mi>𝜇</mi><mo>+</mo><mi>𝜎</mi><mi>𝑋</mi><mo>=</mo><mi>ℎ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑋</mi><mo stretchy=\"false\">)</mo></math></p><p>Using the corollary 5.11 for linear combination we can prove this.</p><p>Useful property of normal distribution. If we have two normal distributions <math><mi>𝑋</mi></math> and <math><mi>𝑌</mi></math> that are independent, then</p><p><math><mi>𝑋</mi><mo>+</mo><mi>𝑌</mi><mo>∼</mo><mi>𝑁</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msub><mi>𝜇</mi><mn>1</mn></msub><mo>+</mo><msub><mi>𝜇</mi><mn>2</mn></msub><mo>,</mo><msubsup><mi>𝜎</mi><mn>1</mn><mn>2</mn></msubsup><mo>+</mo><msubsup><mi>𝜎</mi><mn>2</mn><mn>2</mn></msubsup><mo stretchy=\"false\">)</mo></math> We have to do a convolution to solve this, involves integration between the two things.</p><h5>5.4.14</h5><p>Last one for today is the gamma distribution.</p><p>We need some preparation, in the gamma function.</p><p><math><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mi>𝑡</mi><mrow><mi>𝑥</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msup><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑡</mi></mrow></msup><mi>𝑑</mi><mi>𝑡</mi></math></p><p>Proposition 5.30 says the properties of the gamma function. We have the property (a) that</p><p><math><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo>+</mo><mn>1</mn><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mi>𝑥</mi><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>,</mo><mi>𝑥</mi><mo>&gt;</mo><mn>0</mn></math></p><p>and (b) that</p><p><math><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑛</mi><mo>+</mo><mn>1</mn><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mi>𝑛</mi><mo>!</mo></math></p><p>and (c), which the source note does not prove,</p><p><math><mi mathvariant=\"normal\">Γ</mi><mrow><mo>(</mo><mfrac><mn>1</mn><mn>2</mn></mfrac><mo>)</mo></mrow><mo>=</mo><msqrt><mi>𝜋</mi></msqrt></math></p><p>Proof of (a) is that</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mi>𝑡</mi><mi>𝑋</mi></msup><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑡</mi></mrow></msup><mi>𝑑</mi><mi>𝑡</mi><mo>=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mi>𝑡</mi><mi>𝑋</mi></msup><mrow><mo>(</mo><mrow><mi>𝑑</mi><mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑡</mi></mrow></msup><mrow><mo>−</mo><mn>1</mn></mrow></mfrac></mrow><mo>)</mo></mrow></math></p><p><math><msup><mi>𝑡</mi><mi>𝑥</mi></msup><mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑡</mi></mrow></msup><mrow><mo>−</mo><mn>1</mn></mrow></mfrac><msubsup><mo lspace=\"0em\" rspace=\"0em\">|</mo><mrow><mi>𝑡</mi><mo lspace=\"0em\" rspace=\"0em\">=</mo><mn>0</mn></mrow><mrow><mi>𝑡</mi><mo lspace=\"0em\" rspace=\"0em\">=</mo><mi>∞</mi></mrow></msubsup><mo>−</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑡</mi></mrow></msup><mrow><mo>−</mo><mn>1</mn></mrow></mfrac><mspace width=\"0.1667em\"></mspace><mi>𝑑</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msup><mi>𝑡</mi><mi>𝑥</mi></msup><mo stretchy=\"false\">)</mo></math></p><p>We can separately calculate <math><mi>𝑑</mi><msup><mi>𝑡</mi><mi>𝑋</mi></msup><mo>=</mo><mi>𝑥</mi><msup><mi>𝑡</mi><mrow><mi>𝑥</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msup><mi>𝑑</mi><mi>𝑡</mi></math> by the power rules.</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑡</mi></mrow></msup><mi>𝑥</mi><msup><mi>𝑡</mi><mrow><mi>𝑥</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msup><mi>𝑑</mi><mi>𝑡</mi></math></p><p><math><mi>𝑥</mi><msubsup><mo form=\"prefix\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mi>𝑡</mi><mrow><mi>𝑥</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msup><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑡</mi></mrow></msup><mi>𝑑</mi><mi>𝑡</mi><mo>=</mo><mi>𝑥</mi><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo stretchy=\"false\">)</mo></math></p><p>The technique is to do the integration by parts and factor out certain quantities.</p><p>If we want to find out (b), then we can do induction once we find <math><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>2</mn><mo stretchy=\"false\">)</mo></math></p><p><math><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>2</mn><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><mi>𝑡</mi><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑡</mi></mrow></msup><mi>𝑑</mi><mi>𝑡</mi><mo>=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><mi>𝑡</mi><mi>𝑑</mi><mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑡</mi></mrow></msup><mrow><mo>−</mo><mn>1</mn></mrow></mfrac><mo>=</mo><mi>𝑡</mi><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑡</mi></mrow></msup><mrow><mo>−</mo><mn>1</mn></mrow></mfrac><msubsup><mo lspace=\"0em\" rspace=\"0em\">|</mo><mrow><mi>𝑡</mi><mo lspace=\"0em\" rspace=\"0em\">=</mo><mn>0</mn></mrow><mrow><mi>𝑡</mi><mo lspace=\"0em\" rspace=\"0em\">=</mo><mi>∞</mi></mrow></msubsup><mo>−</mo><mo form=\"prefix\" lspace=\"0em\">∫</mo><mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑡</mi></mrow></msup><mrow><mo>−</mo><mn>1</mn></mrow></mfrac><mi>𝑑</mi><mi>𝑡</mi></math></p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑡</mi></mrow></msup><mi>𝑑</mi><mi>𝑡</mi></math></p><p>What about the pdf? Given by definition 5.31</p><p><math><msub><mi>𝑓</mi><mrow><mi>𝑎</mi><mo rspace=\"0em\">,</mo><mi>𝜆</mi></mrow></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mfrac><msup><mi>𝜆</mi><mi>𝑎</mi></msup><mrow><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑎</mi><mo stretchy=\"false\">)</mo></mrow></mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><msup><mi>𝑥</mi><mrow><mi>𝑎</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msup></math></p><p><math><mi>𝑋</mi><mo>∼</mo><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑎</mi><mo>,</mo><mi>𝜆</mi><mo stretchy=\"false\">)</mo></math></p><p>It has a lot of weird special cases.</p><p>Proposition 5.32 shows that this is a true density function. We will do integration from 0 to the infinity of this density</p><p><math><msubsup><mo lspace=\"0em\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><mfrac><msup><mi>𝜆</mi><mi>𝑎</mi></msup><mrow><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑎</mi><mo stretchy=\"false\">)</mo></mrow></mfrac><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><msup><mi>𝑥</mi><mrow><mi>𝑎</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msup><mi>𝑑</mi><mi>𝑥</mi></math></p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mfrac><msup><mi>𝜆</mi><mi>𝑎</mi></msup><mrow><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑎</mi><mo stretchy=\"false\">)</mo></mrow></mfrac><msubsup><mo form=\"prefix\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mrow><mo>(</mo><mrow><mfrac><mn>1</mn><mi>𝜆</mi></mfrac><mi>𝑦</mi></mrow><mo>)</mo></mrow><mrow><mi>𝑎</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msup><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑦</mi></mrow></msup><mfrac><mn>1</mn><mi>𝜆</mi></mfrac><mi>𝑑</mi><mi>𝑦</mi></math></p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mfrac><msup><mi>𝜆</mi><mi>𝑎</mi></msup><mrow><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑎</mi><mo stretchy=\"false\">)</mo></mrow></mfrac><msubsup><mo form=\"prefix\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><mfrac><mn>1</mn><msup><mi>𝜆</mi><mrow><mi>𝑎</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msup></mfrac><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><mfrac><mn>1</mn><mi>𝜆</mi></mfrac><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑦</mi></mrow></msup><mfrac><mn>1</mn><mi>𝜆</mi></mfrac><mi>𝑑</mi><mi>𝑦</mi></math></p><p>After we cancel out the <math><mi>𝜆</mi></math></p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mfrac><mn>1</mn><mrow><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑎</mi><mo stretchy=\"false\">)</mo></mrow></mfrac><msubsup><mo form=\"prefix\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mi>𝑦</mi><mrow><mi>𝑎</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msup><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑦</mi></mrow></msup><mi>𝑑</mi><mi>𝑦</mi></math></p><p>which is just the definition of gamma</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mfrac><mrow><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑎</mi><mo stretchy=\"false\">)</mo></mrow><mrow><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑎</mi><mo stretchy=\"false\">)</mo></mrow></mfrac><mo>=</mo><mn>1</mn></math></p><p>Proposition 5.33 says for E and V that</p><p><math><mi>𝔼</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>𝑋</mi><mo form=\"postfix\" stretchy=\"false\">]</mo><mo>=</mo><mfrac><mi>𝑎</mi><mi>𝜆</mi></mfrac></math></p><p><math><mi>𝕍</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>𝑋</mi><mo form=\"postfix\" stretchy=\"false\">]</mo><mo>=</mo><mfrac><mi>𝑎</mi><msup><mi>𝜆</mi><mn>2</mn></msup></mfrac></math></p><p>We know from the definition of expectation and combining similar terms that</p><p><math><mi>𝔼</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>𝑋</mi><mo form=\"postfix\" stretchy=\"false\">]</mo><mo>=</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><mi>𝑥</mi><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><mfrac><msup><mi>𝜆</mi><mi>𝑎</mi></msup><mrow><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑎</mi><mo stretchy=\"false\">)</mo></mrow></mfrac><msup><mi>𝑥</mi><mrow><mi>𝑎</mi><mo lspace=\"0em\" rspace=\"0em\">−</mo><mn>1</mn></mrow></msup><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><mi>𝑑</mi><mi>𝑥</mi><mo>=</mo><mfrac><msup><mi>𝜆</mi><mi>𝑎</mi></msup><mrow><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑎</mi><mo stretchy=\"false\">)</mo></mrow></mfrac><msubsup><mo form=\"prefix\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mi>𝑥</mi><mi>𝑎</mi></msup><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><mi>𝑑</mi><mi>𝑥</mi></math></p><p>Let’s do a change of variable to <math><mi>𝑦</mi><mo>=</mo><mi>𝜆</mi><mi>𝑥</mi></math> <math><mo form=\"infix\" lspace=\"0em\">=</mo><mfrac><msup><mi>𝜆</mi><mi>𝑎</mi></msup><mrow><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑎</mi><mo stretchy=\"false\">)</mo></mrow></mfrac><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mrow><mo>(</mo><mfrac><mi>𝑦</mi><mi>𝜆</mi></mfrac><mo>)</mo></mrow><mi>𝑎</mi></msup><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑦</mi></mrow></msup><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><mfrac><mn>1</mn><mi>𝜆</mi></mfrac><mi>𝑑</mi><mi>𝑦</mi></math></p><p>Taking this out, I get</p><p><math><mfrac><msup><mi>𝜆</mi><mi>𝑎</mi></msup><mrow><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑎</mi><mo stretchy=\"false\">)</mo></mrow></mfrac><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><mfrac><mn>1</mn><msup><mi>𝜆</mi><mi>𝑎</mi></msup></mfrac><mfrac><mn>1</mn><mi>𝜆</mi></mfrac><msubsup><mo form=\"prefix\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mi>𝑦</mi><mi>𝑎</mi></msup><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝑦</mi></mrow></msup><mi>𝑑</mi><mi>𝑦</mi></math></p><p>Here we can use the result from before of the definition of gamma to substitute the integral.</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mfrac><mi>𝑎</mi><mi>𝜆</mi></mfrac></math></p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mfrac><mi>𝑎</mi><mi>𝜆</mi></mfrac></math></p><p>To get variance, we have</p><p><math><mi>𝔼</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><msup><mi>𝑋</mi><mn>2</mn></msup><mo form=\"postfix\" stretchy=\"false\">]</mo><mo>=</mo><mfrac><msup><mi>𝜆</mi><mi>𝑎</mi></msup><mrow><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑎</mi><mo stretchy=\"false\">)</mo></mrow></mfrac><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mi>𝑥</mi><mrow><mi>𝑎</mi><mo lspace=\"0em\" rspace=\"0em\">+</mo><mn>1</mn></mrow></msup><msup><mi>𝑒</mi><mrow><mo>−</mo><mi>𝜆</mi><mi>𝑥</mi></mrow></msup><mi>𝑑</mi><mi>𝑥</mi></math></p><p>Change of variable…</p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mfrac><msup><mi>𝜆</mi><mi>𝑎</mi></msup><mrow><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑎</mi><mo stretchy=\"false\">)</mo></mrow></mfrac><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><msubsup><mo form=\"prefix\" lspace=\"0em\">∫</mo><mn>0</mn><mi>∞</mi></msubsup><msup><mrow><mo>(</mo><mfrac><mi>𝑦</mi><mi>𝜆</mi></mfrac><mo>)</mo></mrow><mrow><mi>𝑎</mi><mo lspace=\"0em\" rspace=\"0em\">+</mo><mn>1</mn></mrow></msup><msup><mi>𝑒</mi><mi>𝑦</mi></msup><mi>𝑑</mi><mi>𝑦</mi></math></p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mfrac><mrow><mi>𝑎</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑎</mi><mo lspace=\"0em\" rspace=\"0em\">+</mo><mn>1</mn><mo stretchy=\"false\">)</mo></mrow><msup><mi>𝜆</mi><mn>2</mn></msup></mfrac></math></p><p><math><mi>𝕍</mi><mo form=\"prefix\" stretchy=\"false\">[</mo><mi>𝑋</mi><mo form=\"postfix\" stretchy=\"false\">]</mo><mo>=</mo><mfrac><mi>𝑎</mi><msup><mi>𝜆</mi><mn>2</mn></msup></mfrac></math></p><p>I can sequentially use the value of a to get this result.</p><p>Finally, proposition 5.35 shows us that for <math><mi>𝑋</mi><mo>∼</mo><mi>𝑁</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mn>0</mn><mo>,</mo><mn>1</mn><mo stretchy=\"false\">)</mo></math>, then <math><msup><mi>𝑋</mi><mn>2</mn></msup><mo>∼</mo><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mfrac><mn>1</mn><mn>2</mn></mfrac><mo>,</mo><mfrac><mn>1</mn><mn>2</mn></mfrac><mo stretchy=\"false\">)</mo></math></p><p>Our proof is that</p><p><math><msub><mi>𝐹</mi><msup><mi>𝑋</mi><mn>2</mn></msup></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mi>ℙ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><msup><mi>𝑋</mi><mn>2</mn></msup><mo>≤</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mi>ℙ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mo form=\"prefix\">−</mo><msqrt><mi>𝑡</mi></msqrt><mo>≤</mo><mi>𝑋</mi><mo>≤</mo><msqrt><mi>𝑡</mi></msqrt><mo stretchy=\"false\">)</mo></math></p><p><math><mo form=\"infix\" lspace=\"0em\">=</mo><mi>ℙ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑋</mi><mo>≤</mo><msqrt><mi>𝑡</mi></msqrt><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>−</mo><mi>ℙ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑋</mi><mo>≤</mo><mo form=\"prefix\">−</mo><msqrt><mi>𝑡</mi></msqrt><mo stretchy=\"false\">)</mo></math></p><p>x is a normal density, so we can write this as</p><p><br></p><p>now we’re going to differentiate on both sides</p><p><math><msub><mi>𝑓</mi><msup><mi>𝑋</mi><mn>2</mn></msup></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mfrac><mi>𝑑</mi><mrow><mi>𝑑</mi><mi>𝑡</mi></mrow></mfrac><msub><mi>𝐹</mi><msup><mi>𝑋</mi><mn>2</mn></msup></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑡</mi><mo stretchy=\"false\">)</mo></math>. The source note starts the derivative calculation here; the remaining algebra is not recorded.</p><p>These two minus signs cancel out and you get both</p><p>And the two will cancel out and you can put this downstairs</p><p>Then you can rewrite this exactly as <math><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mfrac><mn>1</mn><mn>2</mn></mfrac><mo>,</mo><mfrac><mn>1</mn><mn>2</mn></mfrac><mo stretchy=\"false\">)</mo></math></p><p><math><msub><mi>𝑓</mi><mrow><mfrac><mn>1</mn><mn>2</mn></mfrac><mo rspace=\"0em\">,</mo><mfrac><mn>1</mn><mn>2</mn></mfrac></mrow></msub><mo form=\"prefix\" stretchy=\"false\">(</mo><mi>𝑥</mi><mo form=\"postfix\" stretchy=\"false\">)</mo><mo>=</mo><mfrac><mrow><mo stretchy=\"false\">(</mo><mfrac><mn>1</mn><mn>2</mn></mfrac><msup><mo stretchy=\"false\">)</mo><mfrac><mn>1</mn><mn>2</mn></mfrac></msup></mrow><mrow><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mfrac><mn>1</mn><mn>2</mn></mfrac><mo stretchy=\"false\">)</mo></mrow></mfrac><mo lspace=\"0.2222222222222222em\" rspace=\"0.2222222222222222em\">⋅</mo><msup><mi>𝑒</mi><mrow><mo>−</mo><mfrac><mn>1</mn><mn>2</mn></mfrac><mi>𝑥</mi></mrow></msup><msup><mi>𝑥</mi><mrow><mo>−</mo><mfrac><mn>1</mn><mn>2</mn></mfrac></mrow></msup></math></p><p>And then we can know from our definition that</p><p><math><mfrac><mn>1</mn><mrow><msqrt><mn>2</mn></msqrt><mspace width=\"0.1667em\"></mspace><mi mathvariant=\"normal\">Γ</mi><mo form=\"prefix\" stretchy=\"false\">(</mo><mfrac><mn>1</mn><mn>2</mn></mfrac><mo stretchy=\"false\">)</mo></mrow></mfrac><mo>=</mo><mfrac><mn>1</mn><msqrt><mn>2</mn><mi>𝜋</mi></msqrt></mfrac></math></p><p>Using the progressive values of gamma makes it easier to do calculations with them.</p>","contentSourceFormat":"typst","contentTypst":"=== Lecture Notes\n<lecture-notes>\nRecall for a discrete random variable. The moment formula is\n\n$bb(E)\\[X\\]= sum_(x in X\\(Omega\\)) x bb(P)\\(X = x\\)$\n\nThe moment for a continuous rv is the integral\n\n$bb(E)\\[X\\]= integral_(- oo)^oo x f\\(x\\)d x$\n\nAll the possibilities are the real line here.\n\nMost of today's class will deal with integrals. We are going to calculate a lot of these, just like a single variable calculus class. We will also learn multivariable calculus for multiple variables.\n\nGeneralization of expectation for any function is definition 5.9 (skip technical assumptions)\n\n$bb(E)\\[h\\(X\\)\\]= integral_(- oo)^oo h\\(x\\)f\\(x\\)d x$\n\nYou would just compute the antiderivative of $h\\(x\\)$ and then evaluate the integral by subtracting the top from bottom. For an indicator variable, it is 0 to 1 not -infinity to infinity.\n\nNow I want to go further, I want to know the full distribution, not just the expectation, of $h\\(X\\)$\n\nThis is given by theorem 5.10 which tells us how to determine the probability density function. The PDF of $Y = h\\(X\\)$ is given by\n\n$f_Y\\(y\\)= frac(1, h'\\(h^(- 1)\\(y\\)\\)) f\\(h^(- 1)\\)\\(y\\)I_({ y in h\\(D\\)})$\n\nHere, $f\\(h^(- 1)\\)$ denotes the composition of f on inverse h. First I apply the inverse h, then I apply the f.~Sometimes you use the notation $f compose h^(- 1)$\n\nHow do you prove this? We will sketch. We will make the assumption that $h$ is non-decreasing.\n\n$bb(P)\\(Y lt.eq y\\)= bb(P)\\(h\\(X\\)lt.eq y\\)= bb(P)\\(X lt.eq h^(- 1)\\(y\\)\\)$\n\nWe can do the inverse because it's non-decreasing.\n\nThis is true, so we can write this probability as the integral of the PDF of X\n\n$= integral_(- oo)^(h^(- 1)\\(y\\)) f\\(x\\)d x$\n\nIf I want to say the PDF of the random variable $Y$, then it gets the $Y$ subscript; without the subscript, it's for $X$.\n\nNow we will do a change of variables\n\n$x = h^(- 1)\\(z\\)$\n\nWe know that $x$ is inside the integral, so we will write the equivalence that when it is in between those two values, it is equivalent to the event that $z$ is in between $- oo$ and $y$.\n\nThis is important because we will change the integration range:\n\n$= integral_(- oo)^y f\\(h^(- 1)\\(z\\)\\)d h^(- 1)\\(z\\)$\n\nYou can move this part to the front\n\n$= integral_(- oo)^y f\\(h^(- 1)\\(z\\)\\)dot.op\\|\\(h^(- 1)\\)'\\(z\\)\\|d z$\n\nWe will see that\n\n$f_Y\\(y\\)= frac(d, d y) bb(P)\\(Y lt.eq y\\)$\n\nNow if we take the derivative of this integral, then we get\n\n$frac(d, d y) integral_(- oo)^y f\\(h^(- 1)\\(z\\)\\)\\|\\(h^(- 1)\\)'\\(z\\)\\|d z$\n\nWe get something like the fundamental theorem of calculus here, or part of it, or Leibniz rule. you have the following result: $frac(d, d x) (integral_(- oo)^x f \\( u \\) d u) = f\\(x\\)$\n\nThis identity is learned in calculus.\n\nSo, we can show that everything inside doesn't depend on $y$, so we can just evaluate the integral with it.\n\n$= f\\(h^(- 1)\\(y\\)\\)\\|\\(h^(- 1)\\)'\\(y\\)\\|$\n\nThen we will use this result, from a second theorem of calculus called the implicit function theorem. This is more real analysis, here's a simple example.\n\n$h^(- 1)\\(h\\(y\\)\\)= y$\n\nNow the idea is we want to do differentiation on both sides.\n\n$frac(d, d y)\\(h^(- 1)\\(h\\(y\\)\\)= frac(d, d y)\\(y\\)$\n\nBecause we have this equality, the derivative preserves the equality (maybe not integration because of range). Applying the chain rule, we get\n\n$\\(h^(- 1)\\)'\\(h\\(y\\)\\)= frac(1, h'\\(y\\))$\n\nAnd then we do a change of variable.\n\n$y = h^(- 1)\\(u\\)$\n\ny is just a dummy variable, so we can apply this here, to finally show that\n\n$= f\\(h^(- 1)\\(y\\)\\)lr(|frac(1, h'\\(h^(- 1)\\(y\\)\\))|)$ Interesting corollary 5.11 that if X has pdf f and we have a Y which is aX + b, then pdf of Y is\n\n$f_Y\\(y\\)= frac(1, \\|a\\|) f (frac(y - b, a))$\n\nThis is a special case when the $h\\(x\\)$ is $a X + b$, can be shown by differentiation. All you need to find is $h'\\(x\\)$ and $h^(- 1)\\(y\\)$\n\nWe can essentially think of $Y$ as a linear combination of a different random variable whose pdf is known, and then we can derive the pdf from the existing pdf f.\n\n==== 5.4.1\n<section>\nWe are concerned with a uniform random variable defined continuously on $\\[a\\,b\\]$ on $bb(R)$\n\nDefinition 5.13 says that the pdf of this is\n\n$f\\(x\\)= frac(1, b - a)\\,x in\\[a\\,b\\]$\n\nWe will use the notation to indicate uniform distribution\n\n$x tilde.op U\\[a\\,b\\]$\n\nLet's do something non-trivial. Proposition 5.15 says that if we have $X tilde.op U\\[a\\,b\\]$, then\n\n$bb(E)\\[X\\]= frac(a + b, 2)$\n\n$bb(V)\\[X\\]= frac(\\(b - a\\)^2, 12)$\n\nHow do we prove? We can create the integral based on the definition\n\nWe have from algebra that\n\n$b^3 - a^3 =\\(b - a\\)\\(a^2 + a b + b^2\\)$\n\nwhich we can use to prove the variance.\n\nWe are generally solving for\n\n$frac(1, b - a) integral_a^b f\\(x\\)d x$\n\nand that's how we solve for expectation, for $f\\(x\\)$ being $x$ or $x^2$\n\nWe have to turn these types of problems into a pdf, that will be done on the midterm.\n\nWhat is the cdf for a uniform variable?\n\nBy proposition 5.16, it's\n\n$F_X\\(t\\)= {0 & upright(\"if \") t < a med frac(t - a, b - a) & upright(\"if \") t in\\[a\\,b\\]med 1 & upright(\"if \") t > b$\n\nThis is the same as $bb(P)\\(X lt.eq t\\)$\n\nWe can accomplish this case conclusion by the integral\n\n$= integral_a^t frac(1, b - a) I_(\\[a\\,b\\])\\(u\\)d u$ Very simple proof for this.\n\nNow let's consider a simple example 5.8 where $X tilde.op U\\[0\\,1\\]$, we will compute $bb(P) (1 / 4 lt.eq x lt.eq 3 / 4)$\n\nTo solve, this we will solve as an integral\n\n$= integral_(1 / 4)^(3 / 4) f\\(x\\)d x = integral_(1 / 4)^(3 / 4) 1 d x = 1 / 2$\n\nThis is one way to solve this, or you could separate it into cdf up to ¾ and ¼.\n\n==== 5.4.2\n<section-1>\nThe next thing is the exponential distribution, definition 5.17. We introduce the auxiliary parameter $lambda > 0$, then\n\n$f\\(x\\)= lambda e^(- lambda x)\\,med x > 0\\,med X tilde.op \"Exp\"\\(lambda\\)$\n\nThat is what is meant when we are given a distribution. How do we verify that this result is a pdf? Proposition 5.18 says\n\n$integral_(- oo)^oo f\\(x\\)d x$\n\nThe range of integration starts from 0\n\n$= lambda integral_0^oo e^(- lambda x) d x$\n\nNow we can do some calculus\n\n$frac(d, d x) e^(- lambda x) = e^(- lambda x)\\(- lambda\\)$\n\n$e^(- lambda x) = frac(frac(d, d x) e^(- lambda x), - lambda)$\n\n$e^(- lambda x) d x = d (frac(e^(- lambda x), - lambda))$\n\nNow we can do integration by parts, which is a very important technique for this chapter that we will do over and over again.\n\nIf we are interested in integrating\n\n$lambda f\\(x\\)d g\\(x\\)= f\\(x\\)dot.op g\\(x\\)- lambda g\\(x\\)- integral g\\(x\\)d f\\(x\\)$\n\nAnd this is the process of integration by parts.\n\n\\(We don't actually need integration by parts here, but we will need to do it for the moments)\n\nNow we will show the moments by proposition 5.19\n\n$bb(E)\\[X\\]= 1 / lambda$\n\n$bb(V)\\[X\\]= 1 / lambda^2$\n\nWe will now try to evaluate this integral\n\n$= lambda integral_0^oo x e^(- lambda x) d x$\n\nAnd this is where we need integration by parts\n\n$= lambda integral_0^oo x d frac(e^(- lambda x), - lambda)$ First we take the product\n\n$= lambda (x frac(e^(- lambda x), - lambda)\\|_(x = 0)^(x = oo) - integral_0^oo frac(e^(- lambda x), - lambda) d x)$\n\nVariance is not easy because you need to integrate twice by parts.\n\n$bb(E)\\[X^2\\]= integral_0^oo x^2 lambda e^(- lambda x) d x = lambda integral_0^oo x^2 e^(- lambda x) d x = lambda integral_0^oo x^2 d (frac(e^(- lambda x), - lambda))$\n\nWe will try now to get rid of that denominator to get\n\n$= - integral_0^oo x^2 d e^(- lambda x)$\n\nIntegration by parts:\n\n$- x^2 e^(- lambda x)\\|_(x = 0)^(x = oo) - integral_0^oo e^(- lambda x) d x^2$\n\n$= - (0 - integral_0^oo e^(- lambda x) 2 x d x)$\n\n$= 2 integral_0^oo e^(- lambda x) x d x$\n\nAnd we already have shown this result so it is\n\n$= 2 / lambda^2$\n\nAnd then after subtracting by the expectation squared you get\n\n$bb(V)\\[X\\]= 1 / lambda^2$\n\nWhat is the cdf of the exponential random variable? Proposition 5.20 will tell us that\n\n$F_X\\(x\\)= 1 - e^(- lambda x)$\n\nHere is the proof, which is just calculation\n\n$F_X\\(x\\)= integral_0^x f\\(u\\)d u = integral_0^x lambda e^(- lambda u) d u$\n\nThe difference between a CDF and a statistical measure is that we're measuring up to (x), not infinity, but the technique is the same.\n\n$= lambda integral_0^x d (frac(e^(- lambda u), - lambda)) = lambda frac(e^(- lambda u), - lambda)\\|_(u = 0)^(u = x)$\n\nThere is a memoryless property of the exponential distribution.\n\n$bb(P)\\(X > t + s\\|X > t\\)= bb(P)\\(X > s\\)\\,s\\,t gt.eq 0$\n\nI know that my exponential variable is bigger than t. There is some interval between t and t + s which is length s. I know my random variable $X$ is bigger than t + s, given that it is bigger than t. But actually it doesn't really matter what the probability is between t and t + s, there is no memory of the starting point. You only care about the probability after s. (We will not prove this)\n\nLet's take example 5.9, it will be easy to prove the cdf\n\n$f_X\\(t\\)= 1 / 100 e^(- t / 100)\\,lambda = 1 / 100$\n\nThen we get expectation by the formula $1 / lambda$ How do we solve if we are given probability between an interval like\n\n$bb(P)\\(0 lt.eq X lt.eq 50\\)$\n\nWe take the integral between these two points.\n\n$= integral_0^50 1 / 100 e^(- t / 100) d t$\n\nAnd we can actually do a change of variable here from\n\n$s = t / 100$\n\nWhich will give us\n\n$= integral_0^(1 / 2) e^(- s) d s = frac(e^(- s), - 1)\\|_(s = 0)^(s = 1 / 2) = frac(e^(- 1 / 2) - 1, - 1) = 1 - e^(- 1 / 2)$\n\n==== 5.4.3\n<section-2>\nThe normal distribution by definition 5.22 has the distribution function\n\n$f\\(x\\)= 1 / sqrt(2 pi sigma^2) e^(- frac(\\(x - mu\\)^2, 2 sigma^2))\\,x in bb(R)$\n\ndenoted by\n\n$X tilde.op N\\(mu\\,sigma^2\\)$ We have to show that the normal distribution is a PDF, which is not very straightforward.\n\nProposition 5.24\n\nProposition 5.25 tells us that the expected value and variance are\n\n$bb(E)\\[X\\]= mu$\n\n$bb(V)\\[X\\]= sigma^2$\n\nwhich is very convenient for us. But we will need to formally verify this\n\nWe will copy this pdf into the integral\n\n$bb(E)\\[X\\]= 1 / sqrt(2 pi sigma^2) integral_(- oo)^oo x e^(- frac(\\(x - mu\\)^2, 2 sigma^2)) d x$\n\nAnd we are going to do a change of variable\n\n$y = x - mu$\n\nWe have the same integration region because they are infinite. We can replace x in this whole function.\n\n$= 1 / sqrt(2 pi sigma^2) integral_(- oo)^oo\\(y + mu\\)e^(- frac(y^2, 2 sigma^2)) d y$\n\nWe will separate the integral into two parts\n\n$= 1 / sqrt(2 pi sigma^2) integral_(- oo)^oo y e^(- frac(y^2, 2 sigma^2)) d y + mu integral_(- oo)^oo e^(- frac(y^2, 2 sigma^2)) d y$\n\nThe first integrand is an odd function. This means that $f\\(x\\)= - f\\(- x\\)$. Even functions are $f\\(x\\)= f\\(- x\\)$. For any integral from -infinity to infinity, we can combine all the negatives and all the positives. And if it is symmetric around 0 with the opposite, which is the meaning of odd, then when they're added it should give you 0.\n\nThen we can recognize that for the second integrand that it must be equal to $mu$ by the fact that the normal distribution area is equal to 1 (assumed).\n\nNow for the variance. By definition, because we know the expectation already, we get\n\n$bb(V)\\[X\\]= bb(E) [\\( X - mu \\)^2]$\n\nwhich by the pdf is\n\n$= 1 / sqrt(2 pi sigma^2) integral_(- oo)^oo\\(x - mu\\)^2e^(- frac(\\(x - mu\\)^2, 2 sigma^2)) d x$\n\nThen we can do a change of variable, and then solve via polar coordinates on page 138\n\n$= 1 / sqrt(2 pi sigma^2) integral_(- oo)^oo y^2 e^(- frac(y^2, 2 sigma^2)) d y$\n\nRemark 5.2.7 says that if $X tilde.op N\\(0\\,1\\)$, then $mu + sigma X tilde.op N\\(mu\\,sigma^2\\)$\n\nThe inverse operation\n\n$Y tilde.op N\\(mu\\,sigma^2\\)\\,frac(Y - mu, sigma) tilde.op N\\(0\\,1\\)$\n\nis known as #strong[standardization].\n\nProof: if you let\n\n$Y = mu + sigma X = h\\(X\\)$\n\nUsing the corollary 5.11 for linear combination we can prove this.\n\nUseful property of normal distribution. If we have two normal distributions $X$ and $Y$ that are independent, then\n\n$X + Y tilde.op N\\(mu_1 + mu_2\\,sigma_1^2 + sigma_2^2\\)$ We have to do a convolution to solve this, involves integration between the two things.\n\n==== 5.4.14\n<section-3>\nLast one for today is the gamma distribution.\n\nWe need some preparation, in the gamma function.\n\n$Gamma\\(x\\)= integral_0^oo t^(x - 1) e^(- t) d t$\n\nProposition 5.30 says the properties of the gamma function. We have the property (a) that\n\n$Gamma\\(x + 1\\)= x Gamma\\(x\\)\\,x > 0$\n\nand (b) that\n\n$Gamma\\(n + 1\\)= n !$\n\nand (c), which the source note does not prove,\n\n$Gamma (1 / 2) = sqrt(pi)$\n\nProof of (a) is that\n\n$= integral_0^oo t^X e^(- t) d t = integral_0^oo t^X (d frac(e^(- t), - 1))$\n\n$t^x frac(e^(- t), - 1)\\|_(t = 0)^(t = oo) - integral_0^oo frac(e^(- t), - 1) thin d\\(t^x\\)$\n\nWe can separately calculate $d t^X = x t^(x - 1) d t$ by the power rules.\n\n$= integral_0^oo e^(- t) x t^(x - 1) d t$\n\n$x integral_0^oo t^(x - 1) e^(- t) d t = x Gamma\\(x\\)$\n\nThe technique is to do the integration by parts and factor out certain quantities.\n\nIf we want to find out (b), then we can do induction once we find $Gamma\\(2\\)$\n\n$Gamma\\(2\\)= integral_0^oo t e^(- t) d t = integral_0^oo t d frac(e^(- t), - 1) = t dot.op frac(e^(- t), - 1)\\|_(t = 0)^(t = oo) - integral frac(e^(- t), - 1) d t$\n\n$= integral_0^oo e^(- t) d t$\n\nWhat about the pdf? Given by definition 5.31\n\n$f_(a\\,lambda)\\(x\\)= frac(lambda^a, Gamma\\(a\\)) e^(- lambda x) x^(a - 1)$\n\n$X tilde.op Gamma\\(a\\,lambda\\)$\n\nIt has a lot of weird special cases.\n\nProposition 5.32 shows that this is a true density function. We will do integration from 0 to the infinity of this density\n\n$integral_0^oo frac(lambda^a, Gamma\\(a\\)) e^(- lambda x) x^(a - 1) d x$\n\n$= frac(lambda^a, Gamma\\(a\\)) integral_0^oo (1 / lambda y)^(a - 1) dot.op e^(- y) 1 / lambda d y$\n\n$= frac(lambda^a, Gamma\\(a\\)) integral_0^oo 1 / lambda^(a - 1) dot.op 1 / lambda dot.op e^(- y) 1 / lambda d y$\n\nAfter we cancel out the $lambda$\n\n$= frac(1, Gamma\\(a\\)) integral_0^oo y^(a - 1) e^(- y) d y$\n\nwhich is just the definition of gamma\n\n$= frac(Gamma\\(a\\), Gamma\\(a\\)) = 1$\n\nProposition 5.33 says for E and V that\n\n$bb(E)\\[X\\]= a / lambda$\n\n$bb(V)\\[X\\]= a / lambda^2$\n\nWe know from the definition of expectation and combining similar terms that\n\n$bb(E)\\[X\\]= integral_0^oo x dot.op frac(lambda^a, Gamma\\(a\\)) x^(a - 1) e^(- lambda x) d x = frac(lambda^a, Gamma\\(a\\)) integral_0^oo x^a e^(- lambda x) d x$\n\nLet's do a change of variable to $y = lambda x$ $= frac(lambda^a, Gamma\\(a\\)) dot.op integral_0^oo (y / lambda)^a dot.op e^(- y) dot.op 1 / lambda d y$\n\nTaking this out, I get\n\n$frac(lambda^a, Gamma\\(a\\)) dot.op 1 / lambda^a 1 / lambda integral_0^oo y^a e^(- y) d y$\n\nHere we can use the result from before of the definition of gamma to substitute the integral.\n\n$= a / lambda$\n\n$= a / lambda$\n\nTo get variance, we have\n\n$bb(E)\\[X^2\\]= frac(lambda^a, Gamma\\(a\\)) dot.op integral_0^oo x^(a + 1) e^(- lambda x) d x$\n\nChange of variable…\n\n$= frac(lambda^a, Gamma\\(a\\)) dot.op integral_0^oo (y / lambda)^(a + 1) e^y d y$\n\n$= frac(a\\(a + 1\\), lambda^2)$\n\n$bb(V)\\[X\\]= a / lambda^2$\n\nI can sequentially use the value of a to get this result.\n\nFinally, proposition 5.35 shows us that for $X tilde.op N\\(0\\,1\\)$, then $X^2 tilde.op Gamma\\(1 / 2\\,1 / 2\\)$\n\nOur proof is that\n\n$F_(X^2)\\(t\\)= bb(P)\\(X^2 lt.eq t\\)= bb(P)\\(- sqrt(t) lt.eq X lt.eq sqrt(t)\\)$\n\n$= bb(P)\\(X lt.eq sqrt(t)\\)- bb(P)\\(X lt.eq - sqrt(t)\\)$\n\nx is a normal density, so we can write this as\n\n\\\n\nnow we're going to differentiate on both sides\n\n$f_(X^2)\\(t\\)= frac(d, d t) F_(X^2)\\(t\\)$. The source note starts the derivative calculation here; the remaining algebra is not recorded.\n\nThese two minus signs cancel out and you get both\n\nAnd the two will cancel out and you can put this downstairs\n\nThen you can rewrite this exactly as $Gamma\\(1 / 2\\,1 / 2\\)$\n\n$f_(1 / 2\\,1 / 2)\\(x\\)= frac(\\(1 / 2\\)^(1 / 2), Gamma\\(1 / 2\\)) dot.op e^(- 1 / 2 x) x^(- 1 / 2)$\n\nAnd then we can know from our definition that\n\n$frac(1, sqrt(2) thin Gamma\\(1 / 2\\)) = 1 / sqrt(2 pi)$\n\nUsing the progressive values of gamma makes it easier to do calculations with them.","dataUrl":"https://sharifhsn.dev/api/posts/continuous-random-variables-and-transformations.json","date":"2024-10-14","datePublished":"2024-10-14","description":"Recall for a discrete random variable. The moment formula is The moment for a continuous rv is the integral All the possibilities are the real line here.","site":"https://sharifhsn.dev","slug":"continuous-random-variables-and-transformations","source":"FE-540 | Probability Theory","sourceUrl":null,"tags":["Probability Theory","Continuous Distributions","Change of Variables"],"title":"Continuous Random Variables and Transformations","url":"https://sharifhsn.dev/blog/continuous-random-variables-and-transformations/","version":"1","wordCount":3728}