# Re: [R] Finding points with equal probability between normaldistributions

From: Dimitris Rizopoulos <dimitris.rizopoulos_at_med.kuleuven.be>
Date: Mon 07 Aug 2006 - 21:18:50 EST

if you want to base it on Normality, then you can use:

prob <- function(x){

dnorm((x - 5.2) / 2.1) / 2.1 - dnorm((x - 4.2) / 1.1) / 1.1 }

uniroot(prob, c(-3, 3))

otherwise if you want to estimate it you can use Uwe's solution.

I hope it helps.

Best,
Dimitris

Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

```Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
http://www.student.kuleuven.be/~m0390867/dimitris.htm

```
• Original Message ----- From: "Eleni Rapsomaniki" <e.rapsomaniki@mail.cryst.bbk.ac.uk> To: <r-help@stat.math.ethz.ch> Sent: Monday, August 07, 2006 12:35 PM Subject: [R] Finding points with equal probability between normaldistributions

> Dear mailing list,
>
> For two normal distributions, e.g:
>
> r1 =rnorm(20,5.2,2.1)
> r2 =rnorm(20,4.2,1.1)
> plot(density(r2), col="blue")
> lines(density(r1), col="red")
>
> Is there a way in R to compute/estimate the point(s) x where the
> density of the
> two distributions cross (ie where x has equal probability of
> belonging to
> either of the two distributions)?
>
> Many Thanks
>
> Eleni Rapsomaniki
> PhD student
> Birkbeck College, UK
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help