library(RcmdrMisc)  
## Carregando pacotes exigidos: car
## Carregando pacotes exigidos: carData
## Carregando pacotes exigidos: sandwich
.x <- seq(-3.291, 3.291, length.out=1000) 

#P(X<0) = P(-3<x<0) = 0,5

plotDistr(.x, dnorm(.x, mean=0, sd=1), cdf=FALSE, xlab="x",
          ylab="Densidade",regions=list(c(-3, 0)), 
          col=c("darkblue"), legend=FALSE)

#P(0<X<0,11) = 0,04380

plotDistr(.x, dnorm(.x, mean=0, sd=1), cdf=FALSE, xlab="x",
          ylab="Densidade",regions=list(c(0, 0.11)), 
          col=c("darkblue"), legend=FALSE)

#P(-2,2<X<0,12) = P(-2.2<x<0)+P(0<x<0.12) = 0.53386

plotDistr(.x, dnorm(.x, mean=0, sd=1), cdf=FALSE, xlab="x",
          ylab="Densidade",regions=list(c(-2.2, 0.12)), 
          col=c("darkblue"), legend=FALSE)

#P(-1<X<2,1) = P(-1<x<0)+P(0<x<2.1) = 0.82348

plotDistr(.x, dnorm(.x, mean=0, sd=1), cdf=FALSE, xlab="x",
          ylab="Densidade",regions=list(c(-1, 2.1)), 
          col=c("darkblue"), legend=FALSE)

#P(0<X<1,83) = 0.46638

plotDistr(.x, dnorm(.x, mean=0, sd=1), cdf=FALSE, xlab="x",
          ylab="Densidade",regions=list(c(0, 1.83)), 
          col=c("darkblue"), legend=FALSE)

#P(-0,87<X<1,54) = P(-0,87<X<0)+P(0<X<1,54) = 0.74607

plotDistr(.x, dnorm(.x, mean=0, sd=1), cdf=FALSE, xlab="x",
          ylab="Densidade",regions=list(c(-0.87, 1.54)), 
          col=c("darkblue"), legend=FALSE)

#P(X=1,54) = 0,016667. Pois se temos um universo de 30 unidades decimais positivas e 30 unidades decimais negativas, a probabilidade de ser exatamente um valor é de 1/60, logo, 0.0166667

#P(x>2,5) = P(0<x<3)- P(2,5<x<3) = 0.00052

plotDistr(.x, dnorm(.x, mean=0, sd=1), cdf=FALSE, xlab="x",
          ylab="Densidade",regions=list(c(2.5, 3)), 
          col=c("darkblue"), legend=FALSE)

#P(x>-2) = P(-3<X<3)-P(-3<x<-2) = 0.97580

plotDistr(.x, dnorm(.x, mean=0, sd=1), cdf=FALSE, xlab="x",
          ylab="Densidade",regions=list(c(-2, 3)), 
          col=c("darkblue"), legend=FALSE)