I <- \(theta) (72*theta^2-48*theta+4)/(6*theta^2-4*theta+1)-(6*theta-4)/theta + 4*theta/(1-2*theta) + 16*theta/(3-4*theta)
Var <- \(theta) ((72*theta^2-48*theta+4)/(6*theta^2-4*theta+1)-(6*theta-4)/theta + 4*theta/(1-2*theta) + 16*theta/(3-4*theta))^(-1)
library(ggplot2)
require(gridExtra)
## Carregando pacotes exigidos: gridExtra
p1<-ggplot()+
xlim(0.05,0.45)+
geom_function(fun = I) +
labs(title = "Informação de Fisher", x = bquote(theta), y = bquote(I(theta)))
p2 <- ggplot()+
xlim(0.05,0.45)+
geom_function(fun = Var) +
labs(title = "Variância", x = bquote(theta), y = "Var")
grid.arrange(p1,p2,ncol=2)

p3 <- ggplot()+
xlim(-3,3)+
geom_function(fun = dnorm , args = list(mean = 0,sd = Var(0.32)^(1/2)))+
labs(title = bquote("Densidade de" ~ sqrt(n) ~ (hat(theta)-theta) ~ "p/" ~ theta==0.32 ) )
p4 <- ggplot()+
xlim(-3,3)+
geom_function(fun = dnorm , args = list(mean = 0,sd = Var(0.10)^(1/2)))+
labs(title = bquote("Densidade de" ~ sqrt(n) ~ (hat(theta)-theta) ~ "p/" ~ theta==0.10 ) )
grid.arrange(p3,p4,ncol=2)
