Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Probability theory. quick question regarding conditionalizing the binomial dist

  1. Feb 9, 2012 #1
    so suppose we have B(n,p), where n is discretely uniformly distributed on the integers of the interval (1,5)

    Is the expected value 3p, and is the variance 3p-p^2

    I arrived at those answers by treating n as another variable, so np/5 summed over all n is 3p, and similar logic for E(x^2) yields the variance.

    Also when I use the equation E(V(Y/n)) + V(E(Y/n)) I get the same variance.

    However this will give a non-zero variance for p =1, which makes NO sense.

    Please advise.

    Thank you very much
    Last edited: Feb 9, 2012
  2. jcsd
  3. Feb 9, 2012 #2

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    If p = 1, every trial gives "success". Is there variation in the number of trials?

  4. Feb 10, 2012 #3
    I didn't think about it like that. You're right..there is variation. I suppose that would make sense.

    So in general, for the binomial given n, where n is distributed by f(n) we have the variance is:
    Sum(Sum f(n)*B(n,p)*x^2 over all x) over all n) - (Sum(Sum f(n)*B(n,p)*x over all x) over all n))^2

    Which can be simplified or evaluated much quicker using the law of total variance.

    Thanks for your help!
  5. Feb 10, 2012 #4
    Hi, I actually have one more question.
    suppose I wanted to calculate the probability that x=#successes =2.
    Do I need to conditionalize f(n) = distribution of n(# trials) such that n>=2, or do I just assume that the probabilities when n=0 and 1 are 0??
  6. Feb 10, 2012 #5

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    [tex]P\{X=2\} = \sum_{n=1}^5 f(n) P\{X=5 | n \}. [/tex]
    What do you think the values of P{X=5|n} are for n = 1 and 2?

  7. Feb 10, 2012 #6
    Well actually I think that P(X=2) is Sum C(n,2) *p^2 * (1-p)^(n-2) from n = 1 to 5, and when n equals 1, C(n,2) =0.

    But to directly answer your question,I would say the values are 0.

    Sorry for not using latex BTW. I'm on my lunch break. Just trying to learn.
    Last edited: Feb 10, 2012
  8. Feb 10, 2012 #7

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Your answer for P(X=2) is correct; the point is that you use the original f(n), and not some conditional version of it, and you let P{X=k|n} take care of the zeros or not.

    Don't worry about not using LaTeX; what you wrote is clear enough and not very complicated, so it is perfectly readable without ambiguity.

  9. Feb 10, 2012 #8
    Thank you so much Ray, you've been very helpful!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook