[Math] How write down joint PMF, conditinals and marginals of Bernoulli and Binomial random variables

probabilitysolution-verification

I have the following problem, where I'd like to know whether I'm doing it right and whether the notation of the joint PMF is correct.

One of two doctors, Dr. Hibbert and Dr. Nick, is called upon to perform a series of $n$ surgeries. Let $H$ be the indicator random variable for Dr. Hibbert performing the surgeries, and suppose that $E(H) = p$. Given that Dr. Hibbert is performing the surgeries, each surgery is successful with probability $a$, independently. Given that Dr. Nick is performing the surgeries, each surgery is successful with probability $b$, independently. Let $X$ be the number of successful surgeries.

(a) Find the joint PMF of H and X.

(b) Find the marginal PMF of X.

(c) Find the conditional PMF of H given X = k.

a)
$$
P(X=x, H=h) = \left( \binom{n}{x} a^x(1-a)^{n-x} \cdot p \right)^{h} +
\left( \binom{n}{x} b^x(1-b)^{n-x} \cdot (1-p) \right)^{1-h}
$$

b)
$$
P(X=x) = \sum_{h=0}^1 P(X=x, H=h) = \binom{n}{x} \left( a^x(1-a)^{n-x} \cdot p + b^x(1-b)^{n-x} \cdot (1-p) \right)
$$

c)
$$
P(H=1|X=x) = \frac{1}{1 + \frac{1-p}{p} (\frac{b}{a})^x (\frac{1-b}{1-a})^{n-x}}
$$

Best Answer

a) should read: $$ P(X=x, H=h) = \binom{n}{x} \left( a^x(1-a)^{n-x} \cdot p \right)^{h} \cdot \left(b^x(1-b)^{n-x} \cdot (1-p) \right)^{1-h} $$

b) is correct: $$ P(X=x) = \sum_{h=0}^1 P(X=x, H=h) = \binom{n}{x} \left( a^x(1-a)^{n-x} \cdot p + b^x(1-b)^{n-x} \cdot (1-p) \right) $$

c) should read: $$ P(H=1|X=x) = \frac{a^x(1-a)^{n-x} \cdot p}{a^x(1-a)^{n-x} \cdot p +b^x(1-b)^{n-x} \cdot (1-p)}$$ $$ P(H=0|X=x) = \frac{b^x(1-b)^{n-x} \cdot (1-p)}{a^x(1-a)^{n-x} \cdot p +b^x(1-b)^{n-x} \cdot (1-p)}$$