Here it is by hand. You can probably create an iterative solution:
> x=seq(-10,10,length=100)
> p1=dnorm(x,0,1)
> plot(x,p1,type='n',ylab="Density",main="Overlap Measure")
>
>
> points(x,p1,type='l')
> abline(0.07,0.01)
>
> f.x <- function(x) abs(dnorm(x,0,1) - (.07 + .01*x))
>
> optimize(f.x, c(
Hi,
Let say I have a normal density X~n(0,1) and I have a line y=0.01x+0.07. the
following code generate the plots.
x=seq(-10,10,length=100)
plot(x,p1,type='n',ylab="Density",main="Overlap Measure",xaxt="n",yaxt="n")
pi=dnorm(x,0,1)
points(x,p1,type='l')
abline(0.07,0.01)
you can see that the
2 matches
Mail list logo