1 2 3 4 5 6 7 8 9 10 11 12 13
| install.packages("rriskDistributions")
library(rriskDistributions)
fit.perc(p=c(0.25,0.5,0.75),q=c(0.0,21.1,61.8)) #ici, on a renseigné 0.25=Q1, 0.5=Q2=médiane, et 0.75=Q3... et leurs valeurs respectives (0.0, 21.1, et 61.8)
get.norm.par(p=c(0.25,0.5,0.75),q=c(0.0,21.1,61.8))
#ici on demande les paramètres pour une distribution normale, via "gat.norm.par"...mais on aurait pu vouloir une loi log normale ("get.lnorm.par")
#représentation graphique
#create a sequence of numbers between -10 and 10 incrementing by 0.1.
x <- seq(-120, 170, by = 1)
#choose the mean as 2.5 and standard deviation as 0.5.
y <- dnorm(x, mean = 26.7, sd = 47.3)
plot(x,y) |
Partager