Re: [R] Overlapping areas under normal distributions

2011-06-27 Thread Uwe Ligges



On 26.06.2011 13:36, scaramouch wrote:

Hi everyone.

My problem: I've 4 distributions: A, B, C and D:

#A
mA=16.6
sA=3.0

#B
mB=18.9
sB=3.2

#C
mC=20.3
sC=2.1

#D
mD=24
sD=0.8

###Graphiques ensembles
plot(function(x) dnorm(x,mA,sA),0,40,col=orange,ylim=c(0,0.5))
plot(function(x) dnorm(x,mB,sB),0,40,add=T,col=green)
plot(function(x) dnorm(x,mC,sC),0,40,add=T,col=blue)
plot(function(x) dnorm(x,mD,sD),0,40,add=T,col=red)

Now I've a fifth distribution X
#X
mX=23
sX=0.7
plot(function(x) dnorm(x,mX,sX),0,40,add=T,col=black)

And I would like to know the area of the overlapping of the curve of X with
the curves of A, B, C and D (in %).

How can I do that?


Integrate over the differences?

Uwe Ligges




Thank you very much,
Kindly regards, Scaramouch

--
View this message in context: 
http://r.789695.n4.nabble.com/Overlapping-areas-under-normal-distributions-tp3625807p3625807.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Overlapping areas under normal distributions

2011-06-27 Thread scaramouch
Thank you for the answer, but how can i integrate the difference?
There is always an error with integrate().

Kindly regards, Scaramouch

--
View this message in context: 
http://r.789695.n4.nabble.com/Overlapping-areas-under-normal-distributions-tp3625807p3628473.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Overlapping areas under normal distributions

2011-06-27 Thread Uwe Ligges



On 27.06.2011 20:28, scaramouch wrote:

Thank you for the answer,


If you thank me and ask me a follow up, please also send a message to 
me, not only to the list.


Please also quote the original message, not all list members (and 
particularly not myself) can remember the original stuff in thousands of 
messages a week ...



 but how can i integrate the difference?

There is always an error with integrate().


Have you tried? Then show your reproducible code and probably someone 
will be kind enough to correct what you tried.


Best,
Uwe Ligges




Kindly regards, Scaramouch

--
View this message in context: 
http://r.789695.n4.nabble.com/Overlapping-areas-under-normal-distributions-tp3625807p3628473.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Overlapping areas under normal distributions

2011-06-26 Thread scaramouch
Hi everyone. 

My problem: I've 4 distributions: A, B, C and D: 

#A 
mA=16.6 
sA=3.0 

#B 
mB=18.9 
sB=3.2 

#C 
mC=20.3 
sC=2.1 

#D 
mD=24 
sD=0.8 

###Graphiques ensembles 
plot(function(x) dnorm(x,mA,sA),0,40,col=orange,ylim=c(0,0.5)) 
plot(function(x) dnorm(x,mB,sB),0,40,add=T,col=green) 
plot(function(x) dnorm(x,mC,sC),0,40,add=T,col=blue) 
plot(function(x) dnorm(x,mD,sD),0,40,add=T,col=red) 

Now I've a fifth distribution X 
#X 
mX=23 
sX=0.7 
plot(function(x) dnorm(x,mX,sX),0,40,add=T,col=black) 

And I would like to know the area of the overlapping of the curve of X with
the curves of A, B, C and D (in %). 

How can I do that? 

Thank you very much, 
Kindly regards, Scaramouch 

--
View this message in context: 
http://r.789695.n4.nabble.com/Overlapping-areas-under-normal-distributions-tp3625807p3625807.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.