I am struggling with conditional probabilities. Here are a few examples that I am having trouble with.
Let X be geometric with parameter $p$, and let $B$ be the event that $X>a$. Then for $x > a$ $$P(X = x| B) = P(\{X = x\} \cap B) / P(B) = pq^{x-1}/q^a$$
So $P(\{X = x\} \cap B) = pq^{x-1}$. I understand that the condition $x > a$ essentially allows us to write $P(X = x| B) = P(X = x) / P(B)$
Let $U$ be uniform on $\{1,2,...,n\}$ and let $B$ be the event that $a<U\le b$, where $1<a<b<n$. Then for $a<r \le b$ $$P(U = r| B) = P(\{U = r\} \cap B ) / P(B)$$ $$=\frac{1/n}{(b-a)/n}$$
I don't understand how $P(\{U = r\} \cap B ) =1/n$. I don't understand how the restriction $a<r \le b$ implies $P(\{U = r\} \cap B ) =1/n$.
Let $X$ be Poisson with parameter $\lambda$, and let B be the event $X \neq 0$. Then for $x>0$ $$ P(X=x |B) = \frac{e^{- \lambda} \lambda^x}{(1-e^{-\lambda})x!}.$$
I don't understand how to to obtain this expression.
And finally...
Conditional distributions are still probability distributions. This is easily seen as follows $$\sum_x P(X=x|B ) = \sum_x P(\{X=x\} \cap B ) / P(B) = 1$$
I am not 100% clear how this equals one. My intuition says that by taking the intersection with each element we are picking the elements that sum to P(B). So $P(B)/P(B) = 1$
The basic principle here is that when $A\subseteq B$ then $A\cap B=A$.
The second principle is that we are choosing $A$ by criteria that mean that are either subsets of $B$ or else disjoint from $B$.
When $a<r<b$ then $U=r$ entails $a<U<b$.
So in that case: $~\{U=r\}\cap\{a<U<b\} = \{U=r\}$
$\qquad\begin{align}\mathsf P(\{U=r\}\cap\{a<U<b\}) &=\begin{cases}\mathsf P(\{U=r\})&:& a<r<b\\[1ex] 0 &:& \text{otherwise}\end{cases}\\[2ex]&=\begin{cases}1/n &:& a<r<b\\0 &:&\text{otherwise}\end{cases}\end{align}$
We apply the definition for conditional probability, and the pmf for Poisson distributions
$$\begin{align}\mathsf P(X=x\mid X\neq 0) &= \dfrac{\mathsf P(\{X=x\}\cap\{X\neq 0\})}{\mathsf P(\{X>0\})}\\&=\begin{cases}\dfrac{\mathsf P(X=x)}{1-\mathsf P(X=0)} &:& x\neq 0\\0&:& \text{otherwise}\end{cases}\\&=\begin{cases}\dfrac{\lambda^x\mathrm e^{-\lambda}/x!}{1-\lambda^0\mathrm e^{-\lambda}/0!}&:& x>0\\0&:&\text{otherwise}\end{cases}\\&=\begin{cases}\dfrac{\lambda^x\mathrm e^{-\lambda}}{(1-\mathrm e^{-\lambda})~ x!}&:& x>0\\0&:&\text{otherwise}\end{cases}\end{align}$$
Yes. More fully:
The atoms $\{X=x\}$ will exclusively be either subsets of $B$ or disjoint from $B$. The union of those that are subsets will thus equal $B$. While the union of those that are disjoint from $B$ will equal its complement.
So...
$$\begin{align}\sum_x \mathsf P(X=x\mid B) &= \dfrac{\mathsf P(B\cap B)+ \mathsf P(B^\complement\cap B}{\mathsf P(B)}\\&=1\end{align}$$