Posts

Is Delay a Linear System

There are two key points in this question:

Definition of linear systemMathematical expression of a delay system 
1) Any system $f(x(t))$ satisfying following two properties is a linear system:

$ f(\alpha x(t)) = \alpha f(x(t)) $$ f(x_1(t) + x_2(t)) = f(x_1(t)) + f(x_2(t)) $ 2) A pure unit system is $f(x(t)) = x(t)$, delay is just make the output delay by $d$, so delay is $f(x(t)) = x(t-d)$. 

Let's verify the first property,
$f(\alpha x(t)) = \alpha x(t-d) = \alpha f(x(t)) $
For the second property,
$ f(x_1(t) + x_2(t)) = x_1(t-d) + x_2(t-d) = f(x_1(t)) + f(x_2(t)) $
Therefore, delay is a linear system.


Coin Toss, Counts Expectation of Three Head In A Row

This a phone interview question from Morgan Stanley in 2010.

We continue toss one coin until it appears three ( $x$ ) heads in a row, then stops. Let the number of toss be $Y$. What is the expectation of  $Y$? 

Let's start with the simple case, $ x = 1 $. We have half chance to get head (H). If we get tail (T), we back to the beginning and start over again.

$$E(Y) = 1 \times 0.5 + (E(Y) + 1) \times 0.5$$ Solution: $E(Y) = 2$.

Two key points:
$E(Y)$ need involved when toss game start over.Don't forget 1 in $(E(Y) + 1)$, since there is one toss taken to get here. For $ x = 2 $,  the whole probability space are T, HT, HH. $E(Y) = 6$.
For $ x = 3 $,  the whole probability space are T, HT, HHT, HHH. $E(Y) = 14$.