Maximize an Integral involving a probability distribution

Calculus Level 5

Let p : [ 0 , ) ( 0 , ) p:[0, \infty)\to (0,\infty) be a continuous function such that 0 p ( x ) d x = 1 \int_{0}^{\infty}p(x) \, dx=1 Over all such functions p ( x ) p(x) , define the integral I p I_p as follows I p = 0 e 4 x ln ( p ( x ) ) d x I_p= \int_{0}^{\infty} e^{-4x}\ln(p(x)) \, dx Find max p I p \max_p I_p

Hint : The inequality e x 1 + x e^x \geq 1+x might come handy.


This problem can be solved by using knowledge of high-school calculus only. Good luck!


The answer is 0.0965736.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Abhishek Sinha
Dec 7, 2015

Using the inequality e z 1 + z e^z \geq 1+z , for any function p ( x ) p(x) satisfying the given properties, we have ln p ( x ) 4 e 4 x p ( x ) 4 e 4 x 1 \ln\frac{p(x)}{4 e^{-4x}} \leq \frac{p(x)}{4e^{-4x}}-1 Multiplying both sides by 4 e 4 x 4e^{-4x} , we have 4 e 4 x ln p ( x ) 4 e 4 x p ( x ) 4 e 4 x 4 e^{-4x} \ln\frac{p(x)}{4 e^{-4x}} \leq p(x)-4e^{-4x} Integrating both sides in the interval [ 0 , ) [0,\infty) , we have 0 4 e 4 x ln p ( x ) 4 e 4 x d x 0 ( p ( x ) 4 e 4 x ) d x = 1 1 = 0 \int_{0}^{\infty} 4 e^{-4x} \ln\frac{p(x)}{4 e^{-4x}} dx \leq \int_{0}^{\infty}\big( p(x)-4e^{-4x}\big) dx=1-1=0 i.e., 4 0 e 4 x ln ( p ( x ) ) d x 0 4 e 4 x ln ( 4 e 4 x ) d x = ln ( 4 ) 1 4\int_{0}^{\infty} e^{-4x} \ln(p(x)) dx \leq \int_{0}^{\infty} 4 e^{-4x} \ln (4 e^{-4x})dx= \ln(4)-1 Thus, we have the following upper-bound on I p I_p I p 1 4 ( ln ( 4 ) 1 ) ( ) I_p \leq \frac{1}{4} (\ln(4)-1) \hspace{15pt} (*) By tracing the above series of inequalities backwards, we see that the upper-bound is achievable iff we have equality in the inequality we started with, i.e., p ( x ) 4 e 4 x = 1 , x [ 0 , ) \frac{p(x)}{4 e^{-4x}}=1, \forall x \in [0,\infty) . i.e., the Exponential Distribution p ( x ) = 4 e 4 x , x 0 p(x)=4e^{-4x}, x\geq 0 achieves the upper-bound (*) on I p I_p .

Nice solution! Yours is one of those proofs where you need to know what the answer is before you can construct the proof. You could guess p ( x ) = 4 e 4 x p(x) = 4e^{-4x} by maximizing I p I_p over all negative exponentials p k ( x ) = k e k x p_k(x) = ke^{-kx} , I suppose.

Alternatively, the Calculus of Variations could be used to extremize I p I_p over all positive continuous functions p p whose integral is 1 1 , and this approach would construct the fact that the maximum occurs for p ( x ) = 4 e 4 x p(x) = 4e^{-4x} .

Suppose that p ( x ) p(x) is the function that minimizes I I . Let q q be any continuous function of compact support with integral equal to 0 0 . Then there exists k > 0 k > 0 such that p + λ q p + \lambda q is a positive function for all λ < k |\lambda| < k , and we deduce that F q ( λ ) = I p + λ q F_q(\lambda) \,=\, I_{p +\lambda q} must have a turning point at λ = 0 \lambda = 0 , and hence F q ( 0 ) = 0 e 4 x p ( x ) q ( x ) d x = 0 . F_q'(0) \; = \; \int_0^\infty \frac{e^{-4x}}{p(x)} q(x)\,dx \; = \; 0 \;. Since F q ( 0 ) = 0 F_q'(0) = 0 for all continuous functions q q of compact support that integrate to 0 0 , we deduce that e 4 x p ( x ) \frac{e^{-4x}}{p(x)} must be constant (if not, it is fiddly but possible to construct a function q ( x ) q(x) of compact support with integral 0 0 for which F q ( 0 ) F_q'(0) is nonzero). Thus p ( x ) p(x) must be a multiple of e 4 x e^{-4x} , and we are done.

Not High School calculus, of course, but useful. The Calculus of Variations can be used to solve all sorts of extremal problems of this sort.

Mark Hennings - 5 years, 6 months ago

Log in to reply

Yes, this is inspired. The ``black-magic" that I actually used in constructing this proof is the non-negativity of KL divergence . I usually reserve the sledge-hammer method of calculus of variations for more difficult problems where the integral involves derivatives of unknown variables.

Abhishek Sinha - 5 years, 6 months ago
Plinio Sd
Dec 15, 2015

I did a discrete approach. Let us define the function p L ( x ) p_L(x) as p n p_n , if n L x < ( n + 1 ) L nL \leq x < (n+1)L .

Then, we must maximize I p L = n = 0 + n L ( n + 1 ) L e 4 x ln ( p n ) = 1 4 ( 1 e 4 L ) n = 0 + e 4 n L ln ( p n ) , \begin{aligned} I_{p_{L}} &= \sum_{n=0}^{+\infty} \int_{nL}^{(n+1)L} e^{-4x} \ln(p_n) \\ &= \dfrac{1}{4}(1-e^{4L}) \sum_{n=0}^{+\infty} e^{-4nL}\ln(p_n) \end{aligned},

with the constraint, n = 0 + p n L = 1. \sum_{n=0}^{+\infty} p_n L = 1.

We can solve this problem using Lagrange multipliers. Writing the Lagrangian,

L = 1 4 ( 1 e 4 L ) n = 0 + e 4 n L ln ( p n ) + λ ( n = 0 + p n L 1 ) , \mathcal{L} = \dfrac{1}{4}(1-e^{4L}) \sum_{n=0}^{+\infty} e^{-4nL}\ln(p_n) + \lambda \left( \sum_{n=0}^{+\infty} p_n L - 1 \right),

we know that L p n = 0 \dfrac{\partial \mathcal{L}}{\partial p_n} = 0 , i.e,

1 4 ( 1 e 4 L ) e 4 n L 1 p n + λ L = 0 p n = 1 e 4 L 4 λ L e 4 n L . \begin{aligned} & \dfrac{1}{4} (1-e^{-4L}) e^{-4nL}\dfrac{1}{p_n} + \lambda L = 0\\ \Rightarrow & p_n = -\dfrac{1-e^{-4L}}{4\lambda L} e^{-4nL}. \end{aligned}

Now we use the constraint to determine λ \lambda ,

n = 0 + 1 e 4 L e 4 n L 4 λ L L = 1 λ = 1 e 4 L 4 n = 0 + e 4 n L = 1 4 . \begin{aligned} & \sum_{n=0}^{+\infty} -\dfrac{1-e^{-4L}e^{-4nL}}{4\lambda L}L = 1 \\ \Rightarrow & \lambda = - \dfrac{1-e^{-4L}}{4}\sum_{n=0}^{+\infty} e^{-4nL} = -\dfrac{1}{4}. \\ \end{aligned}

Therefore, p n = 1 e 4 L L e 4 n L p_n = \dfrac{1-e^{-4L}}{L} e^{-4nL} .

Now we use the function p L ( x ) p_L(x) as we defined and make L 0 L \to 0 . This way, we find that p ( x ) = 4 e 4 x , p(x) = 4 e^{-4x}, which is continuous. Note that p L ( x ) p_L(x) is not continuous, so when we take the lim L 0 p L ( x ) = p ( x ) \lim_{L \to 0} p_L(x) = p(x) , we may not necessarily find a continuous function p ( x ) p(x) .

Finally, it is easy to calculate I p I_p and we find 1 4 ( ln ( 4 ) 1 ) \dfrac{1}{4}(\ln(4) - 1) .

That's a really interesting approach, working from first principles. However, to be completely rigorous, we need to justify why I p n I p I_{p_n}\to I_p . Which convergence theorem can help us establish this ?

Abhishek Sinha - 5 years, 6 months ago

Log in to reply

Well, that's a good question. I would try to use the dominated convergence theorem to exchange the limit of L L with the integral. We can use the theorem, because there is a function g ( x ) g(x) , which is integrable, such that e 4 x ln ( p L ( x ) ) g ( x ) , x [ 0 , ) , L ( 0 , L 0 ) |e^{-4x}\ln(p_L(x))| \leq g(x), \forall x \in [0, \infty), \forall L \in (0,L_0) . For example, g ( x ) = 16 ( x + 1 ) e x g(x) = 16 (x+1) e^{-x} .

Plinio SD - 5 years, 6 months ago
Jeremi Litarowicz
Dec 15, 2015

If p ( x ) p(x) maximises I p I_p then any change to p ( x ) p(x) will either decrease or not change I p I_p .

So, we define a function: p 2 ( x ) = { p ( x ) d y , if x = σ p ( x ) + d y , if x = d p ( x ) , otherwise p_2(x)=\begin{cases}p(x)-dy, & \text{if } x=\sigma \\ p(x)+dy, & \text{if } x=d \\ p(x), & \text{otherwise}\end{cases}

Note that 0 p ( x ) d x = 0 p 2 ( x ) d x \int_{0}^{\infty} p(x)\,dx=\int_{0}^{\infty} p_2(x)\,dx .

Now we look at the relationship between I p I_p and I p 2 I_{p_2} : I p 2 = I p + d x [ e 4 σ ( ln ( p ( σ ) d y ) ln ( σ ) ) + e 4 d ( ln ( p ( d ) + d y ) ln ( d ) ) ] = I p + d x [ e 4 σ d y p ( σ ) + e 4 d d y p ( d ) ] I_{p_2}=I_p+dx[e^{-4\sigma}(\ln(p(\sigma)-dy)-\ln(\sigma))+e^{-4d}(\ln(p(d)+dy)-\ln(d))] = I_p+dx[-e^{-4\sigma}\frac{dy}{p(\sigma)}+e^{-4d}\frac{dy}{p(d)}]

Given our condition of I p I_p being maximal, we know that I p 2 I p 0 I_{p_2}-I_p\leq0 . This implies that: d y d x [ e 4 σ p ( σ ) + e 4 d p ( d ) ] 0 dy dx[-\frac{e^{-4\sigma}}{p(\sigma)}+\frac{e^{-4d}}{p(d)}]\leq0

Since the sign of d y d x dy dx is not specified, we have that: e 4 σ p ( σ ) + e 4 d p ( d ) = 0 -\frac{e^{-4\sigma}}{p(\sigma)}+\frac{e^{-4d}}{p(d)}=0 e 4 σ p ( σ ) = e 4 d p ( d ) e^{4\sigma}p(\sigma)=e^{4d}p(d)

Since the two sides are independent, we have that: e 4 σ p ( σ ) = λ = e 4 d p ( d ) e^{4\sigma}p(\sigma)=\lambda=e^{4d}p(d) p ( σ ) = λ e 4 σ p(\sigma)=\lambda e^{-4\sigma}

Now we solve for λ \lambda : 0 p ( x ) d x = 0 λ e 4 x d x = λ / 4 = 1 \int_{0}^{\infty} p(x)\,dx = \int_{0}^{\infty} \lambda e^{-4x}\,dx = \lambda/4 = 1 λ = 4 \lambda=4

Substituting back into I p I_p we get: I p = 0 e 4 x ln ( 4 e 4 x ) d x = 0 e 4 x ( ln ( 4 ) 4 x ) d x = 1 4 ( ln 4 1 ) I_p = \int_{0}^{\infty} e^{-4x}\ln(4 e^{-4x})\,dx = \int_{0}^{\infty} e^{-4x}(\ln(4) -4x)\,dx = \boxed{\frac{1}{4}(\ln{4}-1)}

Really awesome approach!

Abhishek Sinha - 5 years, 4 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...