Introdução
Atividade referente à disciplina de estatística aplicada às ciências humanas e sociais, da turma de administração pública, 2021.2.
Atividade 07: Fazer um documento do RMarkdown com os cálculos das probabilidades do slide 7 da apresentação sobre a Normal (distribuição Normal e tabela da Normal Padrão).
calcular as seguintes probabilidades:
- P(X<0)
- P(0<X<0,11)
- P(-2,2<X<0,12)
- P(-1<X<2,1)
- P(0<X<1,83)
- P(-0,87<X<1,54)
- P(X=1,54) (favor explicar o motivo)
- P(x>2,5)
- P(x>-2)
Pacote rcmdrmisc
Chamando o pacote rcmdrmisc para utilizar o comando plotdistr.
library(RcmdrMisc) ## Carregando pacotes exigidos: car
## Carregando pacotes exigidos: carData
## Carregando pacotes exigidos: sandwich
.x <- seq(-3.291, 3.291, length.out=1000)
plotDistr(.x, dnorm(.x, mean=0, sd=1), cdf=FALSE, xlab="x", ylab="Densidade",regions=list(c(0, 4)), col=c('#0080C0', '#BEBEBE'), legend=FALSE)Calculos
P(x<0) = 0,5
P(-1 <z <1) = 0,6826
plotDistr(.x,dnorm(.x, mean=0, sd=1), cdf=FALSE, xlab="x",
ylab="Densidade", regions=list(c(-1,1)),
col=c('red'), legend=FALSE)P(-2, <z <2) = 0,9544
plotDistr(.x,dnorm(.x, mean=0, sd=1), cdf=FALSE, xlab="x",
ylab="Densidade", regions=list(c(-2,2)),
col=c('green'), legend=FALSE)P(-3, <z <3) = 0,9974
plotDistr(.x,dnorm(.x, mean=0, sd=1), cdf=FALSE, xlab="x",
ylab="Densidade", regions=list(c(-3,3)),
col=c('yellow'), legend=FALSE)P(0<x<0,11) = 0,4380
plotDistr(.x,dnorm(.x, mean=0, sd=1), cdf=FALSE, xlab="z",
ylab="Densidade", regions=list(c(0,0.11)),
col=c('red'), legend=FALSE)P(-2,2<X<0,12) = 0,9763
P(-2,2<x<0,12) = P(-2,2<x<0) + P(0<x<0,12)
P(-2,2<X<0,12) = 0,4987 + 0,4776 = 0,9763
plotDistr(.x,dnorm(.x, mean=0, sd=1), cdf=FALSE, xlab="x",
ylab="Densidade", regions=list(c(-2.2,0), c(0,0.12)),
col=c('red', 'darkgreen'), legend=FALSE)P(-1<X<2,1)= 0,82254
P(-1<X<2,1) = P(0<x<1) = 0,3413 + P(0<x<2.1) = 0,48124
P(-1<X<2,1) = 0,3413 + 0,48124 = 0,82254
plotDistr(.x,dnorm(.x, mean=0, sd=1), cdf=FALSE, xlab="x",
ylab="Densidade", regions=list(c(-1,0), c(0,2.1)),
col=c('red', '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('red', 'darkblue'), legend=FALSE)P(-0,87<X<1,54) = 0,74607
P(-0,87<X<1,54) = P(0,87<x<0)= 0,30785 + P(0<x<1.54)= 0,43822
P(-0,87<X<1,54) = 0,30785 + 0,43822 = 0,74607
plotDistr(.x,dnorm(.x, mean=0, sd=1), cdf=FALSE, xlab="x",
ylab="Densidade", regions=list(c(-0.87,0), c(0,1.54)),
col=c('red', 'darkblue'), legend=FALSE)P(X=1,54) = 0,43822
plotDistr(.x,dnorm(.x, mean=0, sd=1), cdf=FALSE, xlab="x",
ylab="Densidade", regions=list(c(0,1.54)),
col=c('red', 'darkblue'), legend=FALSE)A area acumulada que corresponde x=1,54 é 0,43822, conforme a tabela Normal Padrão.
P(x>2,5) = 0,49379
plotDistr(.x,dnorm(.x, mean=0, sd=1), cdf=FALSE, xlab="x",
ylab="Densidade", regions=list(c(0,2.5)),
col=c('red', 'darkblue'), legend=FALSE)P(x>-2) = P(x>2)= 0,47725
plotDistr(.x,dnorm(.x, mean=0, sd=1), cdf=FALSE, xlab="x",
ylab="Densidade", regions=list(c(-2,0)),
col=c('red', 'darkblue'), legend=FALSE)Por causa da simetria, pode-se dizer que equivale a P(x>2) = 0,47725.