Not sure of my answers on a specific probability problem Sixty percent of the consumers' population is reputed to prefer a particular brand A of toothpaste. If a group of consumers are selected at random and interviewed, what is the probability that exactly 5people must be selected until interviewing the first consumer who prefers brand A? What is the expected number of consumers to be selected until the first one who prefers brand A is interviewed?
$Answers$
a. $P(5) = (0.6)(0.4)^4$ =$0.0514$
b. $E(x) = (5)(0.6) = 3$
Did I answer it correctly?
 A: Seems to be a geometric random variable with
$$P(X = k) = (.6)(.4)^{k-1},$$ for $k = 1,2,3,\dots.$
Then one can show that $E(X) = 1/.6 = 1.6667.$
The analytic demonstration that the infinite series
for $E(X)$ sums as claimed is not trivial, but a method is
shown in most elementary probability books and in
the link. (Commonly, the method involves differentiation--either with or without use of
moment generating functions.)
Informally, for the current example it is more
than sufficient to use R to sum the first thousand
terms, as shown below.
k = 1:1000
sum(k*.6*.4^(k-1))
[1] 1.666667

However, just from this, it seems your answer (b) is not correct.
Note: As you can see in the link, there are two
parameterizations of a geometric distribution. The one implemented in R as dgeom is not the one you're
using here.
The difference is whether the random variable
$X$ counts the number of trials until the first success (as here) or the number of trials before the first success.
A: *

*Correct. $(.4)^4$ because we want the first four to be people who don't prefer brand A, and then we want the 5th person, $.6$ chance, to prefer brand A.


*Your probability of success is $60\%$. This can be written as $\frac{6 \text{ successes}}{10 \text{ trials}}$. To find the expected value, you flip it. You need $\frac{10 \text{ trials}}{6 \text{ successes}}=5/3 \text { trial per success}$.
