Normalize a probability density function

1.6k Views Asked by At

Suppose you have two independent variables with equal density function

$p(x|\omega_i)\propto e^{(-|x-a_i|/b_i)}$ for $i=1,2$ and $0<b_i$

Normalize each function for parameters $ a_i, b_i $ arbitrary, $ b_i $ positive.

I tried this:

$$p(x|\omega_i) = N_i e^{(-|x-a_i|/b_i)}$$

$N_i$ is known as the normalizing constant and it must verify that

$$N_i \int_{-\infty}^{\infty} e^{(-|x-a_i|/b_i)}dx = 1$$

we substitute $u = \sqrt{|x-a_i|}$, then $\dfrac{d u}{dx} = \dfrac{1}{2}|x-a_i|^{-1/2}$ which implies $dx = \dfrac{2du}{|x-a_i|^{-1/2}} = \dfrac{2du}{(u^2)^{-1/2}} = 2u du$

then the integral is

$$2 N_i \int_{-\infty}^{\infty} e^{-u^2/b_i} u du= 1$$

now we substitute $t=\dfrac{-u^2}{b_i}$ y $dt= \dfrac{-2udu}{b_i}$ $\implies$ $udu = \dfrac{-dt b_i}{2}$

$$-N_i b_i \int_{-\infty}^{\infty} e^{t} dt= 1$$

but that integral does not converge... I don't know what to do or what I'm doing wrong... please help

1

There are 1 best solutions below

0
On

I think I finally found the solution

$$p(x|\omega_i) = N_i e^{(-|x-a_i|/b_i)}$$

$$N_i \int_{-\infty}^{\infty} e^{(-|x-a_i|/b_i)}dx = 1$$

$$N_i ( \int_{-\infty}^{a_i} e^{(x-a_i)/b_i} dx + \int_{a_i}^{\infty} e^{-(x-a_i)/b_i}dx) = 1$$

we substitute $u = \dfrac{x-a_i}{bi}$, then $du = \dfrac{dx}{b_i}$

$$N_i ( \int_{-\infty}^{u(a_i)} e^{u} bi du + \int_{u(a_i)}^{\infty} e^{-u} b_i du) = 1$$

$$N_i b_i ( \int_{-\infty}^{0} e^{u} du + \int_{0}^{\infty} e^{-u} du) = 1$$

$$ N_i b_i (e^{0} - e^{-\infty} + (-e^{-\infty} - (-e^{-0}))) = 1$$

$$ N_i b_i (1 - 0 + (-0 - (-1))) = 1$$

$$ 2 N_i b_i = 1$$

$$ N_i = \dfrac{1}{2 b_i} $$

Therefore:

$$p(x|\omega_i) = \dfrac{1}{2 b_i} e^{(-|x-a_i|/b_i)}$$