The random variable $X$ has probability distribution $Bi(n, p)$
Given that: $Pr(X=1)$ = $(1-p)^{n-2}$, p < 1.
Find the possible values of $n$ and the value(s) of $p$ in terms of $n$.
What I have done so far:
Using the rule for binomial probability:
$\to$$Pr(X = 1)$ = $n\choose{1}$ $p^1 (1-p)^{n-1}$
$\to$$np(1-p)^{n-1} = (1-p)^{n-2}$
$\to$$(1-p)^{n-1}(np-(1-p)^{-1})=0$
$\to$$np-(\frac{1}{1-p}) =0$
$\to$$-np +np^2+1=0$
I need help after this step. Thanks a lot! :))
To solve for $n$: Isolate $n$, factor, then divide. \begin{align*} np^2 - np + 1 & = 0\\ np^2 - np & = -1\\ n(p^2 - p) & = -1 \end{align*} If $p = 0$, the equation is always false. If $0 < p < 1$, $p^2 < p$, so $p^2 - p \neq 0$. Therefore, we can divide by $p^2 - p$ which yields $$n = -\frac{1}{p^2 - p} = \frac{1}{p - p^2} = \frac{1}{p(1 - p)}$$ with the restriction that $n$ is a positive integer.
To solve for $p$: Apply the Quadratic Formula to the quadratic in $p$. $$p = \frac{n \pm \sqrt{n^2 - 4n}}{2n}$$ Since $p$ is a real number, we require that $n^2 - 4n \geq 0$. Since $n^2 - 4n = n(n - 4)$, $n^2 - 4n \geq 0$ if $n \geq 4$ or $n \leq 0$. Since $n$ is a nonnegative integer, $n \geq 4$ or $n = 0$. If $n = 0$, $p$ is undefined. Thus, $n \geq 4$.
You should verify that $$0 < \frac{n \pm \sqrt{n^2 - 4n}}{2n} < 1$$ whenever $n \geq 4$.
The restriction that $n$ is an integer satisfying $n \geq 4$ must also apply to the equation $$n = \frac{1}{p(1 - p)}$$
Note: After the step $$np(1 - p)^{n - 1} = (1 - p)^{n - 2}$$ you could have proceeded as follows: \begin{align*} np(1 - p)^{n - 1} - (1 - p)^{n - 2} & = 0\\ (1 - p)^{n - 2}[np(1 - p) - 1] & = 0\\ (1 - p)^{n - 2}[np - np^2 - 1] & = 0 \end{align*} Since $p < 1$, $1 - p > 0$. Thus, we can divide by $(1 - p)^{n - 2}$ to obtain $np - np^2 - 1 = 0$ or, equivalently, $np^2 - np + 1 = 0$ without introducing negative exponents or fractions.