Dear Rainer,
If X1 is random on 1:20 with probabilities proportional to
dnorm(,10,2), and X2 is random on 10:30 with probs proportional to
dnorm(,15,1), and the object is to find out the probability
distribution of X1 + X2, then a very quick way is with package distr:
library(distr)
X1 <- Discret
Berwin A Turlach wrote:
> G'day Rainer,
>
> On Tue, 15 Jan 2008 14:24:08 +0200
> Rainer M Krug <[EMAIL PROTECTED]> wrote:
>
>
>> ager <- range(age1) + range(age2)
>> ager <- ager[1]:ager[2]
>> pp1 <- c(cumsum(p1), rev(cumsum(rev(p1
>> pp2 <- c(cumsum(p2[-21]), rev(cumsum(rev(p2)))[-1])
>> p
G'day Rainer,
On Tue, 15 Jan 2008 14:24:08 +0200
Rainer M Krug <[EMAIL PROTECTED]> wrote:
> I have two processes which take with a certain probability (p1 and
> p2) x number of years to complete (age1 and age2). As soon as thge
> first process is completed, the second one begins. I want to
> calc
tp://med.kuleuven.be/biostat/
> http://www.student.kuleuven.be/~m0390867/dimitris.htm
>
>
> - Original Message - From: "Rainer M Krug" <[EMAIL PROTECTED]>
> To: "r-help" <[EMAIL PROTECTED]>
> Sent: Tuesday, January 15, 2008 1:2
PROTECTED]>
Sent: Tuesday, January 15, 2008 1:24 PM
Subject: [R] Looking for simpler solution to probabilistic question
> Hi
>
> I have two processes which take with a certain probability (p1 and
> p2) x
> number of years to complete (age1 and age2). As soon as thge first
>
Hi
I have two processes which take with a certain probability (p1 and p2) x
number of years to complete (age1 and age2). As soon as thge first
process is completed, the second one begins. I want to calculate the
time it takes for the both processes to be completed.
I have the following script
6 matches
Mail list logo