How many days will it take me to earn a certain sum of money (given a certain probability)? Suppose I want to earn $7000$. How many days will it take me to earn it, if there is an $80\%$ chance I will make $500$ on a particular day and a $20\%$ chance I will lose $1500$ on the same day?
My solution is $\displaystyle\frac{7000}{(500\times 80\%)+(-1500\times20\%)}=70$ days
Is this correct? 
PS: I trade in the stock market
 A: The situation is a little more complicated than that. In particular you don't have any certainty. Given that in average you earn $100\$$ a day, it should take you in average $70$ days to get to $7000\$$. But you can experience sensible ups and down during this period and you cannot bound the losses that you could incur. 
To make things a little more formal, you could define $$X_i = \begin{cases} 1  & \text{with probability $p = 0.8$} \\ 0 & \text{with probability $1-p = 0.2$}\end{cases}$$ a bernoulli variable that represents your winning or losing in a single day; then define $$S_n = \sum_{i=1}^n 500X_i - 1500(1-X_i) = 2000\sum_{i=1}^n X_i - 1500n$$ as your cumulative gain.
Assuming the $X_i$ independent, you get that $Y_n = \sum_{i=1}^n X_i$ has a binomial distribution $Y_n \sim Bi(p,n)$. So $S_n = 2000Y_n - 1500n$
At this point you can calculate $$P(S_n \ge 7000 ) = P(Y_n \ge \frac 72 + \frac 34 n) = \sum_{i =\left\lceil \frac 72 + \frac 34 n\right\rceil  }^n \binom{n}{i}0.8^i\cdot0.2^{n-i}$$
which is the probability of you having more than $7000\$$ on day $n$.
Now define $$\tau = \inf\{n > 0: S_n \ge 7000\}$$ which is a stopping time with respect to  $\mathcal F$, the sigma algebra generated by $S_n$: $\mathcal F = (\mathcal F_t)_{t \ge 0}$ with $\mathcal F_t = \sigma((S_n)_{n \le t})$. $\tau$ represents the first time you ever gained more than $7000\$$
The distribution of $\tau$ can give you lots of information on what your future capital will look like.
I am having a little trouble calculating the distribution of $\tau$ and calculating it's expected value though.. I'll have to think about this :-) 
A: I also have $n=70$. I have done more basic calculations to get the result. For the following I use some statements which are related to the binomial distribution. After $n$ periods there are $n \choose x$ ways of loosing $x$ times and winning $n-x$ times. The probability of loosing $x$ times and winning $(n-x)$ times is  $0.8^x\cdot 0.2^{n-x}$. 
The result after winning $x$ times and loosing $(n-x)$ times in one specific way is $x\cdot 500-(n-x)\cdot 1500$. In total the expected value is
$$E(x)=\sum_{x=0}^n {n \choose x} 0.8^x\cdot 0.2^{n-x}\cdot \left(x \cdot  500-(n-x)\cdot 1500\right)$$
$$E(x)=\sum_{x=0}^n {n \choose x} 0.8^x\cdot 0.2^{n-x}\cdot \left(2000\cdot x- 1500 \cdot n \right)$$
$$E(x)=-{1500\cdot n\underbrace{\sum_{x=0}^n {n \choose x} 0.8^x\cdot 0.2^{n-x}}_{=1}}+ 2000 \cdot \underbrace{\sum_{x=0}^n x \cdot {n \choose x} 0.8^x\cdot 0.2^{n-x} }_{=E(x)=n\cdot 0.8} $$


*

*The binomial theorem says that
$ (a+b)^n=\sum_{x=0}^{n}{{n \choose x}\cdot a^{x}\cdot b^{n-x}} $
with $a=0.8$ an $b=0.2$ the sum is just $(0.8+0.2)^n=1$

*The expectation value, $E(x)$,  of the binomial distribution is $n\cdot
   p=n\cdot 0.8$


Thus we have 
$E(x)=-1500\cdot n+2000\cdot 0.8\cdot n=7000$
$E(x)=-1500\cdot n+1600\cdot n=7000$
$E(x)=100\cdot n=7000$
$n=\frac{7000}{100}=70$
A: Yes, your solution seems alright, albeit you need some explanation. The expected profit in one days is:
$$E[x] = 500\cdot p(500) + (-1500) \cdot p(-1500) = 500 \cdot \frac 45 - 1500 \frac 15 = 100$$
So if you are expected to make $100$ dollars per day, you need $70$ days to earn $7000$ dollars.
