Statystyka/zajecia5/zadania.R

39 lines
944 B
R
Raw Normal View History

2021-05-05 22:06:14 +02:00
# ZAD1
load(url("http://ls.home.amu.edu.pl/data_sets/Centrala.RData"))
library(EnvStats)
epois(Centrala$Liczba,
method = "mle/mme/mvue",
ci = TRUE, ci.type = "two-sided", conf.level = 0.95,
ci.method = "exact")$interval$limits
epois(Centrala$Liczba,
method = "mle/mme/mvue",
ci = TRUE, ci.type = "two-sided", conf.level = 0.95,
ci.method = "pearson.hartley.approx")$interval$limits
epois(Centrala$Liczba,
method = "mle/mme/mvue",
ci = TRUE, ci.type = "two-sided", conf.level = 0.95,
ci.method = "normal.approx")$interval$limits
# ZAD 2
awarie <- read.table("http://ls.home.amu.edu.pl/data_sets/awarie.txt")
lambda_limits <- eexp(awarie$V1,
method = "mle/mme",
ci = TRUE, ci.type = "two-sided", conf.level = 0.95,
ci.method = "exact")$interval$limits
rev(1 / lambda_limits)
rev(1 / lambda_limits^2)
# ZAD 3