Carregando Bibliotecas
library(RcmdrMisc)
## Warning: package 'RcmdrMisc' was built under R version 4.2.2
## Carregando pacotes exigidos: car
## Warning: package 'car' was built under R version 4.2.2
## Carregando pacotes exigidos: carData
## Warning: package 'carData' was built under R version 4.2.2
## Carregando pacotes exigidos: sandwich
## Warning: package 'sandwich' was built under R version 4.2.2
Z ~ N(0,1) Pr(-1 < z < 2,1) = Pr(1 < z < 0) - Pr(0 <
z < 2,1) = 0,98214 - 0,84134 = 0,1408
x = seq(-3.291, 3.291, length.out=1000)
0.98214 - 0.84134
## [1] 0.1408
plotDistr(x, dnorm(x, mean=0, sd=1), cdf = FALSE,
regions = list(c(-1,0), c(0,2.1)), col = c("#7A1667", "#AC840B"),
legend = FALSE)

Pr(-0,87<z<1,54) = Pr(0,87<z<0) + Pr(0<z<1,547) =
0,3078 + 0,4382 = 0,746
pnorm(2.1) - pnorm(1)
## [1] 0.1407908
0.3078 + 0.4382
## [1] 0.746
plotDistr(x, dnorm(x, mean=0, sd=1), cdf=FALSE,
regions=list(c(-0.87,0), c(0,1.54)), col=c("#7A1667", "#AC840B"), legend=FALSE)

pnorm(1.54) - pnorm(-0.87)
## [1] 0.7460696
plotDistr(x, dnorm(x, mean=0, sd=1), cdf=FALSE,
regions=list(c(0,1.54)), col=c("#7A1667", "#AC840B"),
legend=FALSE)

#Pr(Z > 2,5) = Pr(2,5 < z < 3) = 0,0049
pnorm(1.54)
## [1] 0.9382198
0.4987 - 0.4938
## [1] 0.0049
plotDistr(x, dnorm(x, mean=0, sd=1), cdf=FALSE,
regions=list(c(2.5,3)), col=c("#7A1667", "#AC840B"),
legend=FALSE)

#X ~ N(500,300) Pr(x < 500) = Pr(-350/300 < x) = Pr(0 < x)
= 0,9986501
pnorm(3) - pnorm(2.5)
## [1] 0.004859767
plotDistr(x, dnorm(x, mean=0, sd=1), cdf=FALSE,
regions=list(c(0,3)), col=c("#7A1667", "#AC840B"),
legend=FALSE)

#Pr(400 < x < 710) = Pr(-100/300 < x < 210/300) =
Pr(-0,33 < x < 0,7) = Pr(0,3 < x < 0,7) = 0,2580 + 0,1179 =
0,3873
pnorm(3)
## [1] 0.9986501
0.2580 + 0.1293
## [1] 0.3873
plotDistr(x, dnorm(x, mean=0, sd=1), cdf=FALSE,
regions=list(c(-0.33,0), c(0,0.7)), col=c("#7A1667", "#AC840B"),
legend=FALSE)

Pr(330 < x < 450) = Pr(-170/300 < x < -50/300) =
Pr(-0,56 < x < -0,16) = -0,1487008
pnorm(0.7) - pnorm(-0.33)
## [1] 0.3873364
plotDistr(x, dnorm(x, mean=0, sd=1), cdf=FALSE,
regions=list(c(-0.56,0), c(-0.16,0)), col=c("#7A1667", "#AC840B"),
legend=FALSE)

Y ~ N(100,20) #Pr(50 < y < 70) = Pr(-50/20 < y < -30/20)
= Pr(-2,5 < x < -1,5) = Pr(2,5 < x < 1,5) = 0,06059754
pnorm(-0.56) - pnorm(-0.16)
## [1] -0.1487008
plotDistr(x, dnorm(x, mean=0, sd=1), cdf=FALSE,
regions=list(c(-2.5,0), c(-1.5,0)), col=c("#7A1667", "#AC840B"),
legend=FALSE)

#Pr(105 < y < 110) = Pr(5/20 < y < 10/20) = Pr(0,25 <
y < 0,5) = -0.09275614
pnorm(2.5) - pnorm(1.5)
## [1] 0.06059754
plotDistr(x, dnorm(x, mean=0, sd=1), cdf=FALSE,
regions=list(c(0,0.5), c(0,0.25)), col=c("#7A1667", "#AC840B"),
legend=FALSE)

#Pr(y > 75) = Pr(y > 25/20) = Pr(y > -1,25) =
0,8930003
pnorm(0.25) - pnorm(0.5)
## [1] -0.09275614
plotDistr(x, dnorm(x, mean=0, sd=1), cdf=FALSE,
regions=list(c(-1.25,3)), col=c("#7A1667", "#AC840B"),
legend=FALSE)

pnorm(3) - pnorm(-1.25)
## [1] 0.8930003