I am currently working on an exercise, and I am not sure whether I am using a right approach to solve it. The exercise is the following:
After masks are produced by the factory, they appear in a test center, where they are tested for defects. Historically, only $10\%$ of masks get a positive test result (meaning they are defective).
Let $T_1=$ number of masks tested until first positive result, $T_2=$ number of masks tested until second positive result.
Find $\mathbf{P}(T_2-T_1=k \mid T_1=n)$ and $\mathbf{E}[T_2 \mid T_1=n]$.
Would it be correct to use those formulas: $$\mathbf{P}(X=x \mid Y=y)=(\mathbf{P}(X=x \text{ and } Y=y))/\mathbf{P}(Y=y)$$ and $$\mathbf{E}(X \mid Y=y)=\sum x\mathbf{P}(X=x\mid Y=y)?$$