Last active
February 24, 2018 22:19
-
-
Save gomesfellipe/2526939d20d33ba4fb8edf967dac530b to your computer and use it in GitHub Desktop.
Intervalo de confiança para normal variância desconhecida
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fonte: http://www.leg.ufpr.br/Rpira/Rpira/node11.html | |
ic.m <- function(x, conf = 0.95){ | |
n <- length(x) | |
media <- mean(x) | |
variancia <- var(x) | |
quantis <- qt(c((1-conf)/2, 1 - (1-conf)/2), df = n-1) | |
ic <- media + quantis * sqrt(variancia/n) | |
return(ic) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment