Show that if $E\psi(x-\theta)= 0 $ then $P(X< \theta) \leq p \leq P(X \leq \theta)$ Define $$\psi(x)=\begin{cases} 1-p & x < 0 \\ 0 & x=0 \\ -p & x> 0 \end{cases}$$. I have to show that if 
$$E\psi(x-\theta)= 0 $$ then $$P(X< \theta) \leq p \leq P(X \leq \theta)$$.
Any hints will be appreciated. What I have done so far is to state 
$$E\psi(x-\theta)= \int_{-\infty}^\theta{(1-p)f(x)dx} - p \int_\theta^{\infty} {f(x)dx} = 0$$
Then what I get is that 
$$\int_{-\infty}^\theta{(1-p)f(x)dx} =  p \int_\theta^{\infty} {f(x)dx}$$
But this doesn't help much
 A: Your method assumes that $X$ is a continuous random variable, which is not stated as a condition of the problem.  It is possible to get the result in a more general case, so long as there is some non-zero probability that $X \neq \theta$.  From your stated form for $\psi$ you have:
$$\psi(X-\theta) = \mathbb{I}(X < \theta) - p \cdot \mathbb{I}(X \neq \theta).$$
Hence, taking the expected value you get the function:
$$\begin{equation} \begin{aligned}
\mu(\theta) \equiv \mathbb{E}(\psi(X-\theta)) 
&= \mathbb{P}(X < \theta) - p \cdot \mathbb{P}(X \neq \theta). \\[6pt]
\end{aligned} \end{equation}$$
Now, for the case where $\mathbb{P}(X \neq \theta)=0$ you have $\mu(\theta)=0$ for any $p \in \mathbb{R}$, so the implication you want to prove is not present in that case.  For the case where $\mathbb{P}(X \neq \theta)>0$ the expected value condition $\mu(\theta)=0$ implies that:
$$p = \frac{\mathbb{P}(X < \theta)}{1-\mathbb{P}(X = \theta)}.$$
With a bit of algebra you can obtain the required inequalities.  The first is established by:
$$\begin{equation} \begin{aligned}
p = \frac{\mathbb{P}(X < \theta)}{1-\mathbb{P}(X = \theta)} \geqslant\mathbb{P}(X < \theta). 
\end{aligned} \end{equation}$$
The second is established as:
$$\begin{equation} \begin{aligned}
p 
&= \frac{\mathbb{P}(X < \theta)}{1-\mathbb{P}(X = \theta)} \\[6pt]
&\leqslant \frac{\mathbb{P}(X < \theta) + \mathbb{P}(X = \theta) \cdot \mathbb{P}(X > \theta)}{1-\mathbb{P}(X = \theta)} \\[6pt]
&= \frac{\mathbb{P}(X < \theta) + \mathbb{P}(X = \theta) \cdot (1-\mathbb{P}(X < \theta)-\mathbb{P}(X = \theta))}{1-\mathbb{P}(X = \theta)} \\[6pt]
&= \frac{\mathbb{P}(X < \theta) + \mathbb{P}(X = \theta) - \mathbb{P}(X = \theta)\mathbb{P}(X < \theta)-\mathbb{P}(X = \theta)^2}{1-\mathbb{P}(X = \theta)} \\[6pt]
&= \frac{(\mathbb{P}(X < \theta) + \mathbb{P}(X = \theta)) \cdot (1 - \mathbb{P}(X = \theta))}{1-\mathbb{P}(X = \theta)} \\[6pt]
&= \mathbb{P}(X < \theta) + \mathbb{P}(X = \theta) \\[8pt]
&= \mathbb{P}(X \leqslant \theta). \\[6pt]
\end{aligned} \end{equation}$$
A: There are many ways to approach this problem.
The point of the following is to take you through a process of analyzing the question, performing the requisite calculations as simply and easily as possible, developing a strategy to carry out the proof, and applying that strategy.  A section of concluding remarks highlights what has been achieved by this method.
Analysis
Recall that a random variable $X$ assigns a number to each element $\omega$ of a sample space $\Omega.$
The expression $Y=\psi(X-\theta)$ is another way to assign numbers to elements of $\Omega;$ namely, for each $\omega,$ compute $\psi(X(\omega)-\theta).$
Notice that the resulting number is one of at most three values: $-p, 0,$ and $1-p.$  As you will see, we will be able to compute the probabilities of any subset of these values.
This makes $Y$ a random variable, too: and it's a discrete one.  This simplifies the calculations we might need to do.
At this point it is evident we need to accomplish two things: (1) we need to compute an expectation and (2) we will need to manipulate inequalities algebraically.  Let's take these in turn.
Preliminary calculations
The expectation of $Y$ can be found from the very definition: multiply its values by its probabilities.  Let's tabulate them:

*

*For $X \lt \theta,$ $Y=\psi(X-\theta) = 1-p.$  This has probability $\Pr(X\lt \theta).$


*For $X=\theta,$ $Y=\psi(0) = 0.$  This has probability $\Pr(X=\theta).$


*For $X \gt \theta,$ $Y = -p.$  This has probability $\Pr(X \gt \theta).$
The expectation of $Y$ is the sum of its values times their probabilities:
$$\mathbb{E}(\psi(X-\theta)) = \mathbb{E}[Y] = (1-p)\Pr(X\lt\theta) + 0\Pr(X=\theta) + (-p)\Pr(X \gt \theta).\tag{1}$$
Strategy for the proof
The simplest way to carry out the required demonstration is to show its contrapositive: that is,

if $\Pr(X \lt \theta)\gt p$ or $\Pr(X \le \theta) \lt p,$ we need to conclude that $\mathbb{E}(\psi(X-\theta))$ is not zero.

In the first case where $\Pr(X\lt \theta)\gt p,$ the additivity of mutually exclusive events and the axiom of unit measure--two of the axioms of probability--guarantee that
$$\eqalign{
\Pr(X \gt \theta) &= 1 - (\Pr(X\lt\theta) + \Pr(X=\theta)) \\
&\le 1 - \Pr(X\lt \theta)\\
& \lt 1-p.
}$$
Substituting these two inequalities into $(1)$ gives
$$\eqalign{
\mathbb{E}(\psi(X-\theta)) &= (1-p)\Pr(X\lt\theta) -p\Pr(X \gt \theta) \\
&\gt (1-p)p - p(1-p) = 0,
}$$
proving the expectation cannot be zero.  The demonstration in the second case parallels this one, QED.
Comments
Because this proof is completely elementary--it relies only on the definition of expectation and axioms of probability--it reveals how little needs to be assumed and how general the result is:

*

*It is not necessary to assume $0\lt p\lt 1:$ the assertion that was proved is true for all $p.$


*This demonstration works even when $p=0$ or $1-p=0$ (whereas other attempts might fail for these values, in case they appear in the denominators of any fractions).


*It was not necessary to assume $X$ has a density $f.$


*No higher mathematical concepts, such as integration, were needed.


*Indeed, we did not even have to use a distribution function for $X$: we worked directly with the relevant probabilities.
