# Math Help - Conditional Probability [please check my soln]

1. ## Conditional Probability [please check my soln]

The number of flowers N appearing on an apple tree, is a random variable with distribution

$\mathbb{P}(N=n)=(1-p)p^n, (n=0,1,2,...)$ for some $p \in (0,1)$. Each flower turns into a fruit with probability $\alpha$ independently of other flowers on the tree. Given that there are $r$ apples on the tree what is the probability that there were $n$ flowers originally on the tree?

Here's my solution (I am not sure, so please correct me if I'm wrong):

Bayes' theorem says:

$\mathbb {P}(A|B) = {\mathbb{P}(A \cap B)}/{\mathbb{P}(B)}$

In this example A is the event: 'originally there were $n$ flowers on the tree'. B is the event: 'there are $r$ apples on the tree.

So in the numerator of the Bayes' formula we get:
$(1-p)p^n \alpha ^r (1 - \alpha)^{n-r}$
and for the denominator we get:
${\frac {n!}_{(n-r)! r!}} \alpha$
since there are r choose n ways in total and each has probability $\alpha$. Is this correct? Please reply.....

2. Doesn't look correct to me.

let i = number of flowers
r = number of fruits

P(B) = summation from i = r to infinity {P(r|i).P(i)}
P(A.B) = P(B|A).P(A)
P(A) = Probabiltiy there were 'n' flowers - which is straight fwd
P(B|A) = nCr $\alpha ^r (1 - \alpha)^{n-r}$
Try to put these values and simplify