Skip to content
Prev 58329 / 398502 Next

How to plot PDF which is in the form of orthogonal polynomial

Have you considered "cumsum(exp(-polynomial))"? 

      Consider for example the following: 

library(polynom)
b. <- polynomial(1:5)

x <- seq(-2, 2, length=101)
b.p <- predict(b., x)

plot(x, b.p)
plot(x, exp(-b.p))

cdf <- cumsum(exp(-b.p))
plot(cdf/cdf[101])
  
      hope this helps.  spencer graves
Yong Wang wrote: