Binomial Distribution: Find p, given CDF

1. May 17, 2012

arup

I have a question about binomial distribution

There is a random var X follows Binomial distribution ~B(n,p), where n is known but p is UNKNOWN.

It is also known that a for known value of x, CDF(x) = Pr(X<=x) = 0.9

Is there anyway to estimate p?

To give a concrete example, if n=8, CDF(5) = 0.9, can I find p?

2. May 17, 2012

viraltux

Hi arup,

The CDF for the binomial would be
$$P(X≤x)=\sum_{k=0}^x {n\choose k}p^k(1-p)^{n-k}$$
so in your example you would have
$$0.9=\sum_{k=0}^5 {8\choose k}p^k(1-p)^{8-k}$$
which is a simple equation with p as unknown variable.

So yeah, you can find p.

3. May 17, 2012

arup

But from the equation

$$P(X≤x)=0.9 =\sum_{k=0}^x {n\choose k}p^k(1-p)^{n-k}$$
how do I solve for p? i.e., how do I express p as a function of (0.9,x,n)?
I am not sure how to do that using algebraic manipulation?

4. May 17, 2012

mathman

You have a polynomial of degree n. For n > 4 you probably need to use numerical technique.

5. May 17, 2012

arup

I see. Thank you.

I am not familiar with numerical techniques to solve polynomial f(x)

A quick look at wikipedia/wolfram shows that there are many different root finding algorithms.

Can anybody suggest what method should be used to solve the equation I noted earlier? and what tool should I use to solve this?

6. May 17, 2012

viraltux

Every tool has its merits, tell us a bit about your field of research, studies... this way we can advice you better.

7. May 17, 2012

arup

My area of research is reliability of computer architecture.

The problem that I am trying to solve is the following:

There is a data array consisting of n elements. Each of n elements can fail independently with probability p. The entire data array will fail if there are more than k failures (k < n).

Now I know probability of data array failure. i.e., Prob{less than/equal to k failures} = 0.9. I also known n (typical value may be 8). How can I find out p?

8. May 17, 2012

viraltux

I see, well, in this case probably you want to use some symbolic math package so that you can get simplified expressions for your particular problem, for example using Maxima for your problem with data n=8, and F(5)=0.9 the equation you need to solve is $$1 = 210 p^8-480 p^7+280 p^6$$ and solving it with Maxima you have $p = 0.46178460348232$

Actually there are many many different ways to calculate p but since you're into computing you might also want to implement yourself the algorithm to calculate p, if this is the case I would recommend Newton's Method for your problem http://en.wikipedia.org/wiki/Newton's_method

Last edited: May 17, 2012
9. May 17, 2012

arup

Thanks! Appreciate it.

10. May 17, 2012

viraltux

You're Welcome

11. May 22, 2012

arup

How do I use Maxima to solve the equation above?

This is what I get from Maxima:

(%i25) solve(1=210*p^8 - 480*p^7 + 280*p^6,p);
8 7 6
(%o25) [0 = 210 p - 480 p + 280 p - 1]

how do I get value of p?

12. May 22, 2012

viraltux

solve in Maxima tries to give you a symbolic solution, since Maxima didn't find any explicit solution for this equation it simply returns it back.

In this case you need some numerical method like newton or other similar to this one. Look for numerical methods in Maxima, also a very handy command in Maxima is describe(command).

Good Luck!