Re: [R] Simple estimate of a probability by simulation (sender)

2008-08-20 Thread Van Wyk, Jaap
Thank you for all the responses! It turned out that my "theory" contained an error - the answer is 0.2544, and this was confirmed with the simulation in R. My students will be impressed - and I will quote where I found the great help. Regards Jacob Jacob L van Wyk Dept of Statistics Univer

Re: [R] Simple estimate of a probability by simulation

2008-08-20 Thread davidr
] Simple estimate of a probability by simulation Jaap Van Wyk wrote: > > I would appreciate any help with the following. > Problem: Suppose A, B and C are independent U(0,1) random variables. > What is the probability that A(x^2) + Bx + C has real roots? I have > done the theor

Re: [R] Simple estimate of a probability by simulation

2008-08-20 Thread hadley wickham
On Wed, Aug 20, 2008 at 7:56 AM, Alberto Monteiro <[EMAIL PROTECTED]> wrote: > > Jaap Van Wyk wrote: >> >> I would appreciate any help with the following. >> Problem: Suppose A, B and C are independent U(0,1) random variables. >> What is the probability that A(x^2) + Bx + C has real roots? I have >

Re: [R] Simple estimate of a probability by simulation

2008-08-20 Thread N'DOYE Souleymane
Greetings, Let me present my modest proposition as function with an input and an output, it is based on the valuable solution of Alberto Monteiro. I have choosen delta superior or equal to 0 wich still provide a REAL solution : prob <- function(n){ a <- runif(n) b <- runif(n) c <- runif(n) delta

Re: [R] Simple estimate of a probability by simulation

2008-08-20 Thread Alberto Monteiro
Jaap Van Wyk wrote: > > I would appreciate any help with the following. > Problem: Suppose A, B and C are independent U(0,1) random variables. > What is the probability that A(x^2) + Bx + C has real roots? I have > done the theoretical work and obtained an answer of 1/9 = 0.. > Now I want

[R] Simple estimate of a probability by simulation

2008-08-20 Thread Van Wyk, Jaap
Hallo I would appreciate any help with the following. Problem: Suppose A, B and C are independent U(0,1) random variables. What is the probability that A(x^2) + Bx + C has real roots? I have done the theoretical work and obtained an answer of 1/9 = 0.. Now I want to show my students to get