My last question's link: Reconciling different definitions of orthogonality
However, I failed to understand why they are equivalent.
If $f$ and $g$ are real, \begin{align} \int_{<T>}f(t)g(t)~dt &= 0 \tag{1} \\\\ E\left[f(t){\cdot}g(t)\right] &= 0 \tag{2} \end{align}
I made an counter-example.
\begin{align} f(t)=\begin{cases} 1 & t\in(0, 1) \\ 0 & \mbox{otherwise} \end{cases} \\\\ g(t)=\begin{cases} 1 & t\in(1, 2) \\ 0 & \mbox{otherwise} \end{cases} \end{align}
Then, $$ \int_{0}^{2} f(t)g(t) ~dt = 0 \\ \therefore f(t) \mbox{ and } g(t) \mbox{ are orthogonal.} $$
However, \begin{align} E\left[f(t){\cdot}g(t)\right] &= E\left[f(t)\right]E\left[g(t)\right] &\because f(t) \mbox{ and } g(t) \mbox { are orthogonal.}\\ &=\frac12 \cdot \frac34 \\&= \frac38 \\&\ne 0 \end{align}
What is wrong with me? Please give me some hints or intuitive or proofs. Thank you.
I understood hahaha :)
My mistake is that I regarded $t$ as random variable but it is just variable.
So,
\begin{align} E\left[{f(t)g(t)}\right] = \frac{1}{T}\int_{<T>}f(t)g(t)dt \end{align}
for example, some function $h(t) = 3t+3$.
$$E[h(t)]=\frac{1}{3}\int_0^3{3t+3}~dt=7.5$$
Anyhow, $E[f(t)g(t)]$ is just scalar value times integration of two signals.