Help with simplifying an expectation with integral and indicator function

TheS

New member
Joined
Dec 13, 2023
Messages
3
Could someone please please please show me where I go wrong in this problem.

We know that [imath]\theta \sim U[0,1][/imath] and [imath]b<1[/imath] and is a constant. [imath]\phi(\theta)[/imath] = PDF of [imath]\theta[/imath], and [imath]\Phi(\theta)[/imath] = CDF of [imath]\theta[/imath] (which I assume = [imath]\theta[/imath])

According to the answer:
[imath]E[-(\max \{\theta-b, 0\}-\theta)^2][/imath] should simplify to [imath]-b^2\left(1-\frac{2b}{3}\right)[/imath]

My attempt:

1. [imath]E[-(\max \{\theta-b, 0\}-\theta)^2] = -E[(\max \{\theta-b, 0\}-\theta)^2][/imath]

2. [imath]= - E\left[(\theta-b) \mathbf{1}_{\{\theta > b\}}- \theta\right]^2[/imath]

By definition of an expectation we get:

3. [imath]= - \left(\int_{0}^{1}[(\theta-b) \mathbf{1}_{\{\theta > b\}}- \theta]\phi(\theta)d\theta\right)^2[/imath]

Now, looking just at the integral within the (). I break it up and then split it by the indicator function.

4. [imath]= \int_{0}^{1}(\theta-b)\mathbf{1}_{\{\theta > b\}}\phi(\theta)d\theta - \int_{0}^{1}\theta\phi(\theta)d\theta[/imath]
[imath]= \int_{b}^{1}(\theta-b)\phi(\theta)d\theta - \int_{0}^{1}\theta\phi(\theta)d\theta[/imath]

Now I use integration by parts to simplify:

5. [imath]= \Bigg|(\theta-b)\phi(\theta)\Bigg|_{b}^{1} - \int_{b}^{1} \Phi(\theta)d\theta - \Bigg|\theta\phi(\theta)\Bigg|_{0}^{1} - \int_{0}^{1} \Phi(\theta)d\theta[/imath]

6. [imath]= (1-b) - 0 - (1 -b) - (1-0) - 1[/imath] which is very very wrong, and we cannot get to the right answer from here.

Can anyone see where I'm going wrong here?
 
Can you provide more details:
  1. What is the meaning of [imath]\theta \thicksim U[0,1][/imath] ?
  2. Which question are trying to answer?
Thank you
 
Could someone please please please show me where I go wrong in this problem.

We know that [imath]\theta \sim U[0,1][/imath] and [imath]b<1[/imath] and is a constant. [imath]\phi(\theta)[/imath] = PDF of [imath]\theta[/imath], and [imath]\Phi(\theta)[/imath] = CDF of [imath]\theta[/imath] (which I assume = [imath]\theta[/imath])

According to the answer:
[imath]E[-(\max \{\theta-b, 0\}-\theta)^2][/imath] should simplify to [imath]-b^2\left(1-\frac{2b}{3}\right)[/imath]

My attempt:

1. [imath]E[-(\max \{\theta-b, 0\}-\theta)^2] = -E[(\max \{\theta-b, 0\}-\theta)^2][/imath]

2. [imath]= - E\left[(\theta-b) \mathbf{1}_{\{\theta > b\}}- \theta\right]^2[/imath]

By definition of an expectation we get:

3. [imath]= - \left(\int_{0}^{1}[(\theta-b) \mathbf{1}_{\{\theta > b\}}- \theta]\phi(\theta)d\theta\right)^2[/imath]

Now, looking just at the integral within the (). I break it up and then split it by the indicator function.

4. [imath]= \int_{0}^{1}(\theta-b)\mathbf{1}_{\{\theta > b\}}\phi(\theta)d\theta - \int_{0}^{1}\theta\phi(\theta)d\theta[/imath]
[imath]= \int_{b}^{1}(\theta-b)\phi(\theta)d\theta - \int_{0}^{1}\theta\phi(\theta)d\theta[/imath]

Now I use integration by parts to simplify:

5. [imath]= \Bigg|(\theta-b)\phi(\theta)\Bigg|_{b}^{1} - \int_{b}^{1} \Phi(\theta)d\theta - \Bigg|\theta\phi(\theta)\Bigg|_{0}^{1} - \int_{0}^{1} \Phi(\theta)d\theta[/imath]

6. [imath]= (1-b) - 0 - (1 -b) - (1-0) - 1[/imath] which is very very wrong, and we cannot get to the right answer from here.

Can anyone see where I'm going wrong here?
From 1 to 2, \(\displaystyle E(X^2)\neq E(X)^2\).

Can you provide more details:
  1. What is the meaning of [imath]\theta \thicksim U[0,1][/imath] ?
  2. Which question are trying to answer?
Thank you
1. It's standard notation in probability to indicate the random variable [imath]\theta[/imath] is uniformly distributed over [0,1].
2. Show that [imath]E[-(\max \{\theta-b, 0\}-\theta)^2][/imath]= [imath]-b^2\left(1-\frac{2b}{3}\right)[/imath]
 
From 1 to 2, \(\displaystyle E(X^2)\neq E(X)^2\).


1. It's standard notation in probability to indicate the random variable [imath]\theta[/imath] is uniformly distributed over [0,1].
2. Show that [imath]E[-(\max \{\theta-b, 0\}-\theta)^2][/imath]= [imath]-b^2\left(1-\frac{2b}{3}\right)[/imath]
Thank you very much for that response. I'm not sure why I thought that would hold. However, I still did not work it out:

Simplifying inside of expectation first.

[math]1. -((\theta-b)\mathbf{1}\{\theta > b\}- \theta)^2 = -((\theta-b)^2\mathbf{1}\{\theta > b\} - 2(\theta-b)\mathbf{1}\{\theta > b\}\theta + \theta^2) = - (\theta-b)^2\mathbf{1}\{\theta > b\} + 2(\theta-b)\mathbf{1}\{\theta > b\}\theta - \theta^2)[/math]
Applying definition of expectation with pdf of theta=1:

[math]2. \int_{0}^{1} 2(\theta-b)\mathbf{1}\{\theta > b\}\theta - (\theta-b)^2\mathbf{1}\{\theta > b\} + \theta^2 d\theta = \int_{0}^{1} \mathbf{1}\{\theta > b\}(2(\theta-b)\theta - (\theta-b)^2d\theta + \int_{0}^{1} \theta^2 d\theta[/math]
Splitting by the indicator and since integral with limits [0,b]=0 we get:

[math]3. \int_{b}^{1} (2(\theta-b)\theta - (\theta-b)^2) d\theta + \int_{0}^{1} \theta^2 d\theta =\int_{b}^{1} 2(\theta-b)\theta d\theta - \int_{b}^{1}\theta^2 -2\theta b + b^2 d\theta + \int_{0}^{1} \theta^2 d\theta[/math]
[math]4. \Bigg|\theta^2 - 2b\theta \Bigg|_{b}^{1} - \Bigg|\theta^3/3 - \theta^2b +\theta b^2 \Bigg|_{b}^{1} + 1/3[/math]
I've tried simplifying from here twice and have gotten it wrong both times. So I presume I've made a mistake up until this point.
 
Thank you very much for that response. I'm not sure why I thought that would hold. However, I still did not work it out:

Simplifying inside of expectation first.

[math]1. -((\theta-b)\mathbf{1}\{\theta > b\}- \theta)^2 = -((\theta-b)^2\mathbf{1}\{\theta > b\} - 2(\theta-b)\mathbf{1}\{\theta > b\}\theta + \theta^2) = - (\theta-b)^2\mathbf{1}\{\theta > b\} + 2(\theta-b)\mathbf{1}\{\theta > b\}\theta - \theta^2)[/math]
Applying definition of expectation with pdf of theta=1:

[math]2. \int_{0}^{1} 2(\theta-b)\mathbf{1}\{\theta > b\}\theta - (\theta-b)^2\mathbf{1}\{\theta > b\} + \theta^2 d\theta = \int_{0}^{1} \mathbf{1}\{\theta > b\}(2(\theta-b)\theta - (\theta-b)^2d\theta + \int_{0}^{1} \theta^2 d\theta[/math]
Splitting by the indicator and since integral with limits [0,b]=0 we get:

[math]3. \int_{b}^{1} (2(\theta-b)\theta - (\theta-b)^2) d\theta + \int_{0}^{1} \theta^2 d\theta =\int_{b}^{1} 2(\theta-b)\theta d\theta - \int_{b}^{1}\theta^2 -2\theta b + b^2 d\theta + \int_{0}^{1} \theta^2 d\theta[/math]
[math]4. \Bigg|\theta^2 - 2b\theta \Bigg|_{b}^{1} - \Bigg|\theta^3/3 - \theta^2b +\theta b^2 \Bigg|_{b}^{1} + 1/3[/math]
I've tried simplifying from here twice and have gotten it wrong both times. So I presume I've made a mistake up until this point.
It looks like you're only finding the conditional expectation when [imath]\theta > b[/imath], what about when [imath]\theta < b[/imath]?
 
It took me some work, and showed that I don't remember probability theory as well as I thought :( First I computed [imath]E[\max(\theta-b, 0)][/imath], not because it is needed for the solution of the original problem, but because, on the one hand, it is simpler and, on the other hand, uses similar approach.
 
I still don't understand the notation in post \#4, but since it's been more than a week I am posting my solution here.
I ignore minus sign for now, we can switch the sign later.
[math]\mu = \left(\max(\theta-b, 0) - \theta\right)^2[/math][imath]P(\mu\geq 0) = 1[/imath], and if [imath]b\leq 0[/imath] then [imath]\mu \equiv 1[/imath] Which means that we need to find CDF of [imath]\mu[/imath] for [imath]0\leq b \leq 1[/imath] and [imath]x\geq 0[/imath].
[math]P(\mu < x) = P(-\sqrt{x} \leq \max(\theta-b, 0) - \theta \leq \sqrt{x}) =[/math][math]P(\theta-\sqrt{x} \leq \max(\theta-b, 0) \leq \theta+\sqrt{x}) =[/math][math]= P\left( \left(\theta-\sqrt{x}\leq \theta-b \vee \theta-\sqrt{x}\leq 0 \right) \wedge \left(\theta-b \leq \theta+\sqrt{x} \wedge 0 \leq \theta+\sqrt{x} \right) \right) =[/math][math]= P\left(\left(-\sqrt{x}\leq -b \vee \theta\leq \sqrt{x} \right) \wedge \left(-b \leq \sqrt{x} \wedge 0 \leq \theta+\sqrt{x} \right) \right) =[/math][math]= P\left(\left(\sqrt{x}\geq b \vee \theta\leq \sqrt{x} \right) \wedge \left(-b \leq \sqrt{x} \right) \right) =[/math][math]= P\left(\left(\sqrt{x}\geq b \vee \theta\leq \sqrt{x} \right) \right)[/math]Thus we have [imath]P(\mu <x) = 1[/imath] when [imath]x\geq b^2[/imath] and [imath]P(\mu<x) = \sqrt{x}[/imath] when [imath]x<b^2[/imath], which means [imath]P(\mu = b^2) = 1-b[/imath] and
[math]E(\mu) = b^2(1-b) + \int_0^{b^2} x\frac{1}{2\sqrt{x}} dx =b^2(1-b) + \frac{1}{2}\int_0^{b^2} \sqrt{x} dx[/math][math]=b^2(1-b) + \frac{1}{2} \left(\frac{2}{3}x^{\frac{3}{2}}|_0^{b^2}\right) =b^2(1-b) + \frac{1}{3}b^3 = b^2\left(1-\frac{2b}{3} \right)[/math]
 
Top