Post · 7 min read· pp. 254–259

4.2.6 Solved Problems: Special Continuous Distributions


Problem

Suppose the number of customers arriving at a store obeys a Poisson distribution with an average of λ\lambda customers per unit time. That is, if YY is the number of customers arriving in an interval of length tt, then Y∼Poisson(λt)Y \sim Poisson (\lambda t). Suppose that the store opens at time t=0t=0. Let XX be the arrival time of the first customer. Show that X∼Exponential(λ)X \sim Exponential(\lambda).

  • Solution
    • We first find P(X>t)P(X > t):

      P(X>t)P(X > t)=P(No arrival in [0,t])=P(\textrm{No arrival in }[0,t])
      =e−λt(λt)00!=e^{-\lambda t}\frac{(\lambda t)^0}{0!}
      =e−λt=e^{-\lambda t}.

      Thus, the CDF of XX for x>0x>0 is given by

      FX(x)=1−P(X>x)=1−e−λx,F_X(x)=1-P(X>x)=1-e^{-\lambda x},
      which is the CDF of Exponential(λ)Exponential(\lambda). Note that by the same argument, the time between the first and second customer also has Exponential(λ)Exponential(\lambda) distribution. In general, the time between the kk'th and k+1k+1'th customer is Exponential(λ)Exponential(\lambda).


Problem (Exponential as the limit of Geometric)

Let Y∼Geometric(p)Y \sim Geometric(p), where p=λΔp=\lambda \Delta. Define X=YΔX=Y \Delta, where λ,Δ>0\lambda, \Delta>0. Prove that for any x∈(0,∞)x \in (0,\infty), we have

lim⁡Δ→0FX(x)=1−e−λx.\lim_{\Delta \rightarrow 0} F_X(x)=1-e^{-\lambda x}.

  • Solution
    • If Y∼Geometric(p)Y \sim Geometric(p) and q=1−pq=1-p, then

      P(Y≤n)P(Y \leq n)=∑k=1npqk−1=\sum_{k=1}^{n} pq^{k-1}
      =p.1−qn1−q=1−(1−p)n=p. \frac{1-q^{\large{n}}}{1-q}=1-(1-p)^n.

      Then for any y∈(0,∞)y \in (0,\infty), we can write

      P(Y≤y)=1−(1−p)⌊y⌋,P(Y \leq y) =1-(1-p)^{\lfloor y\rfloor},
      where ⌊y⌋\lfloor y\rfloor is the largest integer less than or equal to yy. Now, since X=YΔX=Y \Delta, we have

      FX(x)F_X(x)=P(X≤x)=P(X \leq x)
      =P(Y≤xΔ)=P\left(Y \leq \frac{x}{\Delta}\right)
      =1−(1−p)⌊xΔ⌋=1−(1−λΔ)⌊xΔ⌋=1-(1-p)^{\lfloor \frac{\Large{x}}{\Delta} \rfloor}=1-(1-\lambda \Delta)^{\lfloor \frac{\Large{x}}{\Delta} \rfloor}.

      Now, we have

      lim⁡Δ→0FX(x)\lim_{\Delta \rightarrow 0} F_X(x)=lim⁡Δ→01−(1−λΔ)⌊xΔ⌋=\lim_{\Delta \rightarrow 0} 1-(1-\lambda \Delta)^{\lfloor \frac{\Large{x}}{\Delta} \rfloor}
      =1−lim⁡Δ→0(1−λΔ)⌊xΔ⌋=1-\lim_{\Delta \rightarrow 0} (1-\lambda \Delta)^{\lfloor \frac{\Large{x}}{\Delta} \rfloor}
      =1−e−λx=1-e^{-\lambda x}.

      The last equality holds because xΔ−1≤⌊xΔ⌋≤xΔ\frac{x}{\Delta}-1 \leq \lfloor \frac{x}{\Delta} \rfloor \leq \frac{x}{\Delta}, and we know

      lim⁡Δ→0+(1−λΔ)1Δ=e−λ.\lim_{\Delta \rightarrow 0^{+}} (1-\lambda \Delta)^{\frac{1}{\Delta}}=e^{-\lambda}.


Problem

Let U∼Uniform(0,1)U \sim Uniform(0,1) and X=−ln⁡(1−U)X=-\ln (1-U). Show that X∼Exponential(1)X \sim Exponential(1).

  • Solution
    • First note that since RU=(0,1)R_U=(0,1), RX=(0,∞)R_X=(0,\infty). We will find the CDF of XX. For x∈(0,∞)x \in(0,\infty), we have

      FX(x)F_X(x)=P(X≤x)=P(X \leq x)
      =P(−ln⁡(1−U)≤x)=P(-\ln (1-U) \leq x)
      =P(11−U≤ex)=P\left(\frac{1}{1-U} \leq e^x\right)
      =P(U≤1−e−x)=1−e−x=P(U \leq 1-e^{-x})=1-e^{-x},

      which is the CDF of an Exponential(1)Exponential(1) random variable.


Problem

Let X∼N(2,4)X \sim N(2,4) and Y=3−2XY=3-2X.

  1. Find P(X>1)P(X > 1).
  2. Find P(−2<Y<1)P(-2 < Y < 1).
  3. Find P(X>2∣Y<1)P(X > 2 |Y < 1).
  • Solution
      1. Find P(X>1)P(X > 1): We have μX=2\mu_X=2 and σX=2\sigma_X=2. Thus,

        P(X>1)P(X > 1)=1−Φ(1−22)=1-\Phi\left(\frac{1-2}{2}\right)
        =1−Φ(−0.5)=Φ(0.5)=0.6915=1-\Phi(-0.5)=\Phi(0.5)=0.6915
      2. Find P(−2<Y<1)P(-2 < Y < 1): Since Y=3−2XY=3-2X, using Theorem 4.3, we have Y∼N(−1,16)Y \sim N(-1,16). Therefore,

        P(−2<Y<1)P(-2 < Y < 1)=Φ(1−(−1)4)−Φ((−2)−(−1)4)=\Phi\left(\frac{1-(-1)}{4}\right)-\Phi\left(\frac{(-2)-(-1)}{4}\right)
        =Φ(0.5)−Φ(−0.25)=0.29=\Phi(0.5)-\Phi(-0.25)=0.29
      3. Find P(X>2∣Y<1)P(X > 2 |Y < 1):

        P(X>2∣Y<1)P(X > 2 |Y < 1)=P(X>2∣3−2X<1)=P(X > 2 |3-2X < 1)
        =P(X>2∣X>1)=P(X > 2 |X > 1)
        =P(X>2,X>1)P(X>1)=\frac{P(X > 2,X > 1)}{P(X > 1)}
        =P(X>2)P(X>1)=\frac{P(X > 2)}{P(X > 1)}
        =1−Φ(2−22)1−Φ(1−22)=\frac{1-\Phi(\frac{2-2}{2})}{1-\Phi(\frac{1-2}{2})}
        =1−Φ(0)1−Φ(−0.5)=\frac{1-\Phi(0)}{1-\Phi(-0.5)}
        ≈0.72\approx 0.72

Problem

Let X∼N(0,σ2)X \sim N(0,\sigma^2). Find E∣X∣E|X|

  • Solution
    • We can write X=σZX=\sigma Z, where Z∼N(0,1)Z \sim N(0,1). Thus, E∣X∣=σE∣Z∣E|X|=\sigma E|Z|. We have

      E∣Z∣E|Z|=12π∫−∞∞∣t∣e−t22dt=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty} |t| e^{-\frac{t^2}{2}}dt
      =22π∫0∞∣t∣e−t22dt(integral of an even function)=\frac{2}{\sqrt{2\pi}}\int_{0}^{\infty} |t| e^{-\frac{t^2}{2}}dt \hspace{20pt}(\textrm{integral of an even function})
      =2π∫0∞te−t22dt=\sqrt{\frac{2}{\pi}}\int_{0}^{\infty} t e^{-\frac{t^2}{2}}dt
      =2π[−e−t22]0∞=2π=\sqrt{\frac{2}{\pi}}\bigg[-e^{-\frac{t^2}{2}} \bigg]_{0}^{\infty}=\sqrt{\frac{2}{\pi}}

      Thus, we conclude E∣X∣=σE∣Z∣=σ2πE|X|=\sigma E|Z|=\sigma\sqrt{\frac{2}{\pi}}.


Problem

Show that the constant in the normal distribution must be 12π\frac{1}{\sqrt{2 \pi}}. That is, show that

I=∫−∞∞e−x22dx=2π.I=\int_{-\infty}^{\infty} e^{-\frac{x^2}{2}}dx=\sqrt{2 \pi}.
Hint: Write I2I^2 as a double integral in polar coordinates.

  • Solution
    • Let I=∫−∞∞e−x22dxI=\int_{-\infty}^{\infty} e^{-\frac{x^2}{2}}dx. We show that I2=2πI^2=2\pi. To see this, note

      I2I^2=∫−∞∞e−x22dx∫−∞∞e−y22dy= \int_{-\infty}^{\infty} e^{-\frac{x^2}{2}}dx \int_{-\infty}^{\infty} e^{-\frac{y^2}{2}}dy
      =∫−∞∞∫−∞∞e−x2+y22dxdy=\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} e^{-\frac{x^2+y^2}{2}}dxdy.

      To evaluate this double integral we can switch to polar coordinates. This can be done by change of variables x=rcos⁡θ,y=rsin⁡θx=r \cos \theta, y=r \sin \theta, and dxdy=rdrdθdx dy=rdrd\theta. In particular, we have

      I2I^2=∫−∞∞∫−∞∞e−x2+y22dxdy=\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} e^{-\frac{x^2+y^2}{2}}dxdy
      =∫0∞∫02πe−r22rdθdr=\int_{0}^{\infty} \int_{0}^{2\pi} e^{-\frac{r^2}{2}}r d\theta dr
      =2π∫0∞re−r22dr=2 \pi \int_{0}^{\infty} r e^{-\frac{r^2}{2}} dr
      =2π[−e−r22]0∞=2π=2 \pi \bigg[-e^{-\frac{r^2}{2}}\bigg]_{0}^{\infty}=2 \pi.

Problem

Let Z∼N(0,1)Z \sim N(0,1). Prove for all x≥0x \geq 0,

12πxx2+1e−x22≤P(Z≥x)≤12π1xe−x22.\frac{1}{\sqrt{2\pi}} \frac{x}{x^2+1} e^{-\frac{x^2}{2}} \leq P(Z \geq x) \leq \frac{1}{\sqrt{2\pi}} \frac{1}{x} e^{-\frac{x^2}{2}}.

  • Solution
    • To show the upper bound, we can write

      P(Z≥x)P(Z \geq x)=12π∫x∞e−u22du= \frac{1}{\sqrt{2 \pi}} \int_{x}^{\infty}e^{-\frac{u^2}{2}} du
      $\leq \frac{1}{\sqrt{2 \pi}} \int_{x}^{\infty} \frac{u}{x} e^{-\frac{u^2}{2}} du \hspace{10pt} (\textrm{since u≥x>0u \geq x > 0})$
      =12π1x[−e−u22]x∞= \frac{1}{\sqrt{2 \pi}}\frac{1}{x} \left[-e^{-\frac{u^2}{2}}\right]^{\infty}_{x}
      =12π1xe−x22=\frac{1}{\sqrt{2\pi}} \frac{1}{x} e^{-\frac{x^2}{2}}.

      To show the lower bound, let Q(x)=P(Z≥x)Q(x)=P(Z \geq x), and

      h(x)=Q(x)−12πxx2+1e−x22, for all x≥0.h(x)=Q(x)-\frac{1}{\sqrt{2\pi}} \frac{x}{x^2+1} e^{-\frac{x^2}{2}}, \hspace{10pt} \textrm{ for all }x \geq 0.
      It suffices to show that
      h(x)≥0, for all x≥0.h(x)\geq 0, \hspace{10pt} \textrm{ for all }x \geq 0.
      To see this, note that the function hh has the following properties

      1. h(0)=12h(0)=\frac{1}{2};
      2. lim⁡x→∞h(x)=0\lim \limits_{x \rightarrow \infty} h(x)=0;
      3. h′(x)=−22π(e−x22(x2+1)2)<0h'(x)=-\frac{2}{\sqrt{2\pi}}\left( \frac{e^{-\frac{x^2}{2}}}{(x^2+1)^2}\right) < 0, for all x≥0x \geq 0.Therefore, h(x)h(x) is a strictly decreasing function that starts at h(0)=12h(0)=\frac{1}{2} and decreases as xx increases. It approaches $0$ as xx goes to infinity. We conclude that h(x)≥0h(x) \geq 0, for all x≥0x \geq 0.

Problem

Let X∼Gamma(α,λ)X \sim Gamma(\alpha,\lambda), where α,λ>0\alpha, \lambda \gt 0. Find EXEX, and Var(X)Var(X).

  • Solution
    • To find EXEX we can write

      EX=∫0∞xfX(x)dx=∫0∞x⋅λαΓαxα−1e−λxdx=λαΓ(α)∫0∞x⋅xα−1e−λxdx=λαΓ(α)∫0∞xαe−λxdx=λαΓ(α)Γ(α+1)λα+1(using Property 2 of the gamma function)=αΓ(α)λΓ(α)(using Property 3 of the gamma function)=αλ.\begin{align*} EX &= \int_0^\infty x f_X(x) dx \\ &= \int_0^\infty x \cdot \frac{\lambda^{\alpha}}{\Gamma{\alpha}} x^{\alpha - 1} e^{-\lambda x} {\rm d}x \\ &= \frac{\lambda^{\alpha}}{\Gamma(\alpha)} \int_0^{\infty} x \cdot x^{\alpha - 1} e^{-\lambda x} {\rm d}x \\ &= \frac{\lambda^{\alpha}}{\Gamma(\alpha)} \int_0^{\infty} x^{\alpha} e^{-\lambda x} {\rm d}x \\ &= \frac{\lambda^{\alpha}}{\Gamma(\alpha)} \frac{\Gamma(\alpha + 1)}{\lambda^{\alpha + 1}} &\textrm{(using Property 2 of the gamma function)} \\ &= \frac{\alpha\Gamma(\alpha)}{\lambda\Gamma(\alpha)} &\textrm{(using Property 3 of the gamma function)} \\ &= \frac{\alpha}{\lambda}. \end{align*}

      Similarly, we can find EX2EX^2:

      EX2=∫0∞x2dx=∫0∞x2⋅λαΓ(α)xα−1e−λxdx=λαΓ(α)∫0∞x2⋅xα−1e−λxdx=λαΓ(α)∫0∞xα+1e−λxdx=λαΓ(α)Γ(α+2)λα+2(using Property 2 of the gamma function)=(α+1)Γ(α+1)λ2Γ(α)(using Property 3 of the gamma function)=(α+1)αΓ(α)λ2Γ(α)(using Property 3 of the gamma function)=α(α+1)λ2.\begin{align*} EX^2 &= \int_0^{\infty} x^2 {\rm d}x \\ &= \int_0^{\infty} x^2 \cdot \frac{\lambda^{\alpha}}{\Gamma(\alpha)} x^{\alpha - 1} e^{-\lambda x} {\rm d}x \\ &= \frac{\lambda^{\alpha}}{\Gamma(\alpha)} \int_0^{\infty} x^2 \cdot x^{\alpha - 1} e^{-\lambda x} {\rm d}x \\ &= \frac{\lambda^{\alpha}}{\Gamma(\alpha)} \int_0^{\infty} x^{\alpha + 1} e^{-\lambda x} {\rm d}x \\ &= \frac{\lambda^{\alpha}}{\Gamma(\alpha)} \frac{\Gamma(\alpha + 2)}{\lambda^{\alpha + 2}} &\textrm{(using Property 2 of the gamma function)} \\ &= \frac{(\alpha + 1)\Gamma(\alpha + 1)}{\lambda^2 \Gamma(\alpha)} &\textrm{(using Property 3 of the gamma function)} \\ &= \frac{(\alpha + 1) \alpha \Gamma(\alpha)}{\lambda^2 \Gamma(\alpha)} &\textrm{(using Property 3 of the gamma function)} \\ &= \frac{\alpha (\alpha + 1)}{\lambda^2}. \end{align*}

      So, we conclude

      Var(X)=EX2−(EX)2=α(α+1)λ2−α2λ2=αλ2.\begin{align*} Var(X) &= EX^2 - (EX)^2 \\ &= \frac{\alpha (\alpha + 1)}{\lambda^2} - \frac{\alpha^2}{\lambda^2} \\ &= \frac{\alpha}{\lambda^2}. \end{align*}