Re: [R] binomial simulation

2007-08-16 Thread Prof Brian Ripley
p=.6; q=.95 >> > choose(N,k)*p^k*(1-p)^(N-k)*choose(k,m)*q^m*(1-q)^(k-m) >> 6.554505e-41 >> >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf >> Of Moshe Olshansky >> Sent: Wednesday, August 15, 200

Re: [R] binomial simulation

2007-08-15 Thread Moshe Olshansky
--- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Moshe Olshansky > Sent: Wednesday, August 15, 2007 2:06 AM > To: sigalit mangut-leiba; r-help > Subject: Re: [R] binomial simulation > > No wonder that you are getting overflow, since > gamma(N+1)

Re: [R] binomial simulation

2007-08-15 Thread Lucke, Joseph F
Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Moshe Olshansky Sent: Wednesday, August 15, 2007 2:06 AM To: sigalit mangut-leiba; r-help Subject: Re: [R] binomial simulation No wonder that you are getting overflow, since gamma(N+1) = n! and 200! > (200/e)^200 >

Re: [R] binomial simulation

2007-08-15 Thread Moshe Olshansky
No wonder that you are getting overflow, since gamma(N+1) = n! and 200! > (200/e)^200 > 10^370. There exists another way to compute C(N,k). Let me know if you need this and I will explain to you how this can be done. But do you really need to compute the individual probabilities? May be you need so

Re: [R] binomial simulation

2007-08-14 Thread sigalit mangut-leiba
Thank you, I'm trying to run the joint probabilty: C(N,k)*p^k*(1-p)^(N-k)*C(k,m)*q^m*(1-q)^(k-m) and get the error: Error in C(N, k) : object not interpretable as a factor so I tried the long way: gamma(N+1)/(gamma(k+1)*(gamma(N-k))) and the same with k, and got the error: 1: value out of ran

Re: [R] binomial simulation

2007-08-13 Thread Moshe Olshansky
As I understand this, P(T+ | D-)=1-P(T+ | D+)=0.05 is the probability not to detect desease for a person at ICU who has the desease. Correct? What I asked was whether it is possible to mistakenly detect the desease for a person who does not have it? Assuming that this is impossible the formula i

Re: [R] binomial simulation

2007-08-13 Thread sigalit mangut-leiba
Hi, The probability of false detection is: P(T+ | D-)=1-P(T+ | D+)=0.05. and I want to find the joint probability P(T+,D+)=P(T+|D+)*P(D+) Thank you for your reply, Sigalit. On 8/13/07, Moshe Olshansky <[EMAIL PROTECTED]> wrote: > > Hi Sigalit, > > Do you want to find the probability P(T+ = t AND

[R] binomial simulation

2007-08-11 Thread sigalit mangut-leiba
hello, I asked about this simulation a few days ago, but still i can't get what i need. I have 2 units: icu and regular. from icu I want to take 200 observations from binomial distribution, when probability for disease is: p=0.6. from regular I want to take 300 observation with the same probability