If the probability of a succesful log in is $0.8$, then what is the probability that there will be less than five succesful attempts in ten tries? 
The probability of being able to log on to a computer system from a remote terminal during a busy working day is $0.8$.
  Suppose that $10$ independent attempts are made.
  What is the probability that
  (a) less than ﬁve attempts will be successful?
  (b) all attempts will be successful?  

My attempt:
(a) I'm not sure about this one but I did, probability of success of five attempts - probability of failure so $.8^5 - .2^{10} = .32767$ (Is that right?)
(b) Each attempt's success is $.8$. Since there are $10$ attempts, probability will be $.8^{10} = .10737$.
Can someone tell me if I did these correctly? Thank you.
 A: Notice that you have $10$ independent events with probability $p =.8$ of success. If we call the number of successful attempts $X$, then $X$ follows a binomial distribution,
$$X\sim\text{Bin}(10, .8).$$
a) This ask for $P(X<5) = P(X\leq 4)$. Since each event is disjoint, we have that
\begin{align*}
P(X\leq 4)  &=P(X=0)+P(X=1)+\dotsb+P(X = 4)\\
&= \sum_{k = 0}^4\binom{10}{k}(.8)^k(1-.8)^{10-k} \\
&= 0.006369382.
\end{align*}
b) This is fine. If we frame this in terms of $X$, then
$$P(X =10) = \binom{10}{10}(.8)^{10}(1-.8)^0 = 0.1073742.$$
A: Part (b) is correct, part (a) is not.
Hint:
You must have studied the binomial distribution to get this question.
Use it to compute the probability of $0$ successes, $1$ success, ..... $4$ successes, and add up
A: This is the binomial distribution.
$X \sim B(n,p)$
The binomial distribution with parameters $n$ and $p$ is the probability distribution of the number of successes in a sequence of $n$ independent trials, each of which yields success with probability $p$. 
$a)$
$$P(X \leq 4) = \sum_{k=0}^{4} \binom{10}{k} 0.8^k(0.2)^{10-k}$$
