条件概率的问题设苹果树上开N朵花是随机事件,且服从概率分布函数P[N=n]=(1-p)p^n,p属于(0,1)区间,又假

1个回答

  • okay.I think I got it this time.

    The probability distribution actually makes sense since

    P(N=0)+P(N=1)+...=(1-p)(1+p+p^2+p^3+...)=1

    N:number of flowers

    R:number of apples

    By Bayesian rule,P(N=n|R=r) = P(R=r|N=n)*P(N=n) / P(R=r) (1)

    P[N=n]= (1-p)p^n (2)

    P(R=r|N=n)=C(n,r)a^r (1-a)^(n-r) (3) -there is no unknowns in this equation

    Now we only need to solve P(R=r).

    Notice that P(R=r) = P(R=r|N=n)*P(N=n) + P(R=r|Nn)*P(Nn) (4) - first term is also known by (2)&(3)

    And P(Nn)=1-P(N=n) = 1 - (1-p)p^n (5)

    Now we only need to solve P(R=r|Nn).Notice N>=r and n>=r.

    P(R=r|Nn) = P(R=r|N=r)+P(R=r|N=r+1)+...+P(R=r|N=n-1)+P(R=r|N=n+1)+ ...

    = -P(R=r|N=n)+P(R=r|N=r)+P(R=r|N=r+1)+...

    =-C(n,r)a^r (1-a)^(n-r) + [P(R=r|N=r)+P(R=r|N=r+1)+...] (6)

    Now we only need to solve P(R=r|N=r)+P(R=r|N=r+1)+...

    P(R=r|N=r)+P(R=r|N=r+1)+...=a^r+C(r+1,r)a^r(1-a)+.C(r+2,r)a^r(1-a)^2

    =a^r[1+C(r+1,r)(1-a)+C(r+2,r)(1-a)^2+...]

    =a^r * [1+(1-a)]^r (7) - using Taylor's expansion to get this

    Finally,plug(2)-(7) to (1) would solve the problem.

    Hope this helps!