136 lines
6.2 KiB
R
136 lines
6.2 KiB
R
QuartUnif = floor((runif(20)*40+10)*100)/100
|
|
QuartUnif
|
|
summary(QuartUnif)
|
|
QuartNorm = floor((rnorm(20)*20+30)*100)/100
|
|
summary(QuartNorm)
|
|
QuartNorm = floor((rnorm(20)*10+30)*100)/100
|
|
summary(QuartNorm)
|
|
QuartUnif = floor((runif(20)*40+10)*100)/100
|
|
summary(QuartUnif)
|
|
QuartNormP1 = floor((rnorm(11)*2+40)*100)/100
|
|
QuartNormP2 = floor((rnorm(9)*2+20)*100)/100
|
|
summary(QuartNormP1)
|
|
summary(QuartNormP2)
|
|
QuartNormP1 = floor((rnorm(11)*4+40)*100)/100
|
|
QuartNormP2 = floor((rnorm(9)*2+20)*100)/100
|
|
summary(QuartNormP1)
|
|
summary(QuartNormP2)
|
|
QuartNormP2 = floor((rnorm(9)*5+20)*100)/100
|
|
summary(QuartNormP2)
|
|
Quart2Norm = c(QuartNormP1, QuartNormP2)
|
|
hist(Quart2Norm)
|
|
hist(Quart2Norm, breaks = 40)
|
|
hist(Quart2Norm, breaks = 20)
|
|
QuartNormP2 = floor((rnorm(10)*4+20)*100)/100
|
|
Quart2Norm = c(QuartNormP1, QuartNormP2)
|
|
hist(Quart2Norm, breaks = 20)
|
|
summary(Quart2Norm)
|
|
summary(QuartNorm)
|
|
summary(QuartUnif)
|
|
QuartNormP1 = floor((rnorm(11)*2+40)*100)/100
|
|
QuartNormP2 = floor((rnorm(10)*2+20)*100)/100
|
|
Quart2Norm = c(QuartNormP1, QuartNormP2)
|
|
summary(Quart2Norm)
|
|
hist(Quart2Norm)
|
|
hist(Quart2Norm, breaks = 20)
|
|
QuartUnif
|
|
Quart2Norm
|
|
QuartNormP1 = floor((rnorm(11)*2+40)*100)/100
|
|
QuartNormP2 = floor((rnorm(9)*2+20)*100)/100
|
|
Quart2Norm = c(QuartNormP1, QuartNormP2)
|
|
summary(Quart2Norm)
|
|
floor(QuartUnif)
|
|
summary(floor(QuartUnif))
|
|
factor(QuartUnif)
|
|
factor(floor(QuartUnif))
|
|
table(factor(floor(QuartUnif)))
|
|
? factor
|
|
tableUnif = table(factor(floor(QuartUnif)))
|
|
tableUnif
|
|
tableNorm = table(factor(floor(QuartNorm)))
|
|
tableNorm
|
|
table2Norm = table(factor(floor(Quart2Norm)))
|
|
table2Norm
|
|
QuartUnif
|
|
QuartUnif = floor(QuartUnif)
|
|
QuartNorm = floor(QuartNorm)
|
|
Quart2Norm = floor(Quart2Norm)
|
|
summary(QuartUnif)
|
|
summary(QuartNorm)
|
|
QuartUnif
|
|
QuartUnif[QuartUnif=36] = 38
|
|
summary(QuartUnif)
|
|
QuartUnif
|
|
boxplot(Quart2Norm)
|
|
pull = c(0.9 , 1.08, 1.1, 1.02, 0.69, 0.98, 1.2, 0.93, 0.9, 0.19, 1.39, 1.07, 0.88, 1.15, 1.08, 1.13, 1.05, 0.8, 0.99, 1.07)
|
|
length(pull)
|
|
mean(pull)
|
|
sd(pull)
|
|
sd(pull)^2
|
|
pull2 = c(0.84, 1.85, 0.54, 0.77, 0.27, 0.51, 1.48, 1.07, 1.8, 0.73, 0.31, 0.77, 1.31, 0.66, 0.8, 0.73, 0.71, 1.16, 1.35, 0.58, 0.88, 0.92, 1.27, 1.12, 1.19, 1.18, 0.67, 1.41, 0.91, 0.97)
|
|
length(pull2)
|
|
mean(pull2)
|
|
sd(pull2)
|
|
length(pull[pull[pull>0.54]<1.46])
|
|
length(pull2[pull2[pull>0.22]<1.78])
|
|
27/30*100
|
|
table2Norm
|
|
tableNorm
|
|
tableUnif
|
|
summary(QuartUnif)
|
|
length(QuartUnif)
|
|
QuartUnif
|
|
(29+33)/2
|
|
summary(QuartNorm)
|
|
Quart2Norm
|
|
hist(Quart2Norm, breaks = 24, col = "lightblue", border = "blue", xlab = "Revenus", main = "Quartier 3", xaxp = c(0, 50, 10))
|
|
hist(Quart2Norm, breaks = 24, col = "lightblue", border = "blue", xlab = "Revenus", ylab = "Effectif", main = "Quartier 3", xaxp = c(0, 50, 10))
|
|
hist(Quart2Norm, breaks = 25, col = "lightblue", border = "blue", xlab = "Revenus", ylab = "Effectif", main = "Quartier 3", xaxp = c(0, 50, 10))
|
|
hist(Quart2Norm, breaks = 30, col = "lightblue", border = "blue", xlab = "Revenus", ylab = "Effectif", main = "Quartier 3", xaxp = c(0, 50, 10))
|
|
hist(Quart2Norm, breaks =50, col = "lightblue", border = "blue", xlab = "Revenus", ylab = "Effectif", main = "Quartier 3", xaxp = c(0, 50, 10))
|
|
hist(Quart2Norm, breaks = 30, col = "lightblue", border = "blue", xlab = "Revenus", ylab = "Effectif", main = "Quartier 3", xaxp = c(19, 43, 25))
|
|
hist(Quart2Norm, breaks = 30, col = "lightblue", border = "blue", xlab = "Revenus", ylab = "Effectif", main = "Quartier 3", xaxp = c(19, 43, 24))
|
|
hist(Quart2Norm, breaks = 24, col = "lightblue", border = "blue", xlab = "Revenus", ylab = "Effectif", main = "Quartier 3", xaxp = c(19, 43, 24))
|
|
hist(Quart2Norm, breaks = 25, col = "lightblue", border = "blue", xlab = "Revenus", ylab = "Effectif", main = "Quartier 3", xaxp = c(19, 43, 24))
|
|
hist(Quart2Norm, breaks = 25, col = "lightblue", border = "blue", xlab = "Revenus", ylab = "Effectif", main = "Quartier 3", xaxp = c(15, 50, 35))
|
|
hist(Quart2Norm, breaks = 100, col = "lightblue", border = "blue", xlab = "Revenus", ylab = "Effectif", main = "Quartier 3", xaxp = c(15, 50, 35))
|
|
hist(Quart2Norm, breaks = 50, col = "lightblue", border = "blue", xlab = "Revenus", ylab = "Effectif", main = "Quartier 3", xaxp = c(15, 50, 35))
|
|
hist(Quart2Norm, breaks = seq(18,44,1), col = "lightblue", border = "blue", xlab = "Revenus", ylab = "Effectif", main = "Quartier 3", xaxp = c(15, 50, 35))
|
|
png(filename = "histQuartier3.png", width = 800, height = 500); hist(Quart2Norm, breaks = seq(18,44,1), col = "lightblue", border = "blue", xlab = "Revenus", ylab = "Effectif", main = "Quartier 3", xaxp = c(15, 50, 35)))
|
|
png(filename = "histQuartier3.png", width = 800, height = 500); hist(Quart2Norm, breaks = seq(18,44,1), col = "lightblue", border = "blue", xlab = "Revenus", ylab = "Effectif", main = "Quartier 3", xaxp = c(15, 50, 35))
|
|
histQuart3 = hist(Quart2Norm, breaks = seq(18,44,1), col = "lightblue", border = "blue", xlab = "Revenus", ylab = "Effectif", main = "Quartier 3", xaxp = c(15, 50, 35))
|
|
png(histQuart3)
|
|
png(filename = "histQuartier3.png", histQuart3)
|
|
? png
|
|
png(filename = "histQuartier3.png")
|
|
hist(Quart2Norm, breaks = seq(18,44,1), col = "lightblue", border = "blue", xlab = "Revenus", ylab = "Effectif", main = "Quartier 3", xaxp = c(15, 50, 35))
|
|
dev.off()
|
|
png(filename = "histQuartier3.png")
|
|
hist(Quart2Norm, breaks = seq(18,44,1), col = "lightblue", border = "blue", xlab = "Revenus", ylab = "Effectif", xaxp = c(15, 50, 35))
|
|
dev.off()
|
|
png(filename = "histQuartier3.png")
|
|
hist(Quart2Norm, breaks = seq(18,44,1), col = "lightblue", border = "blue", xlab = "Revenus", ylab = "Effectif", main = "", xaxp = c(15, 50, 35))
|
|
dev.off()
|
|
pdf(filename = "histQuartier3.pdf")
|
|
pdf(histQuartier3.pdf)
|
|
hist(Quart2Norm, breaks = seq(18,44,1), col = "lightblue", border = "blue", xlab = "Revenus", ylab = "Effectif", main = "", xaxp = c(15, 50, 35))
|
|
dev.off()
|
|
?pdf
|
|
pdf(file = "histQuartier3.pdf")
|
|
hist(Quart2Norm, breaks = seq(18,44,1), col = "lightblue", border = "blue", xlab = "Revenus", ylab = "Effectif", main = "", xaxp = c(15, 50, 35))
|
|
dev.off()
|
|
pull
|
|
min(pull)
|
|
lenght(pull[pull[pull>0.54]<1.46])
|
|
lenght(pull[pull[pull>0.54]<1.46]])
|
|
pull[pull[pull>0.54]<1.46]
|
|
length(pull[pull[pull>0.54]<1.46])
|
|
pull[pull>0.54]
|
|
pull[pull>0.54]<1.46
|
|
pull[pull[pull>0.54]<1.46]
|
|
pull[pull>0.54 & pull < 1.46]
|
|
length(pull[pull>0.54 & pull < 1.46])
|
|
length(pull[pull>0.54 & pull < 1.46]) / length(pull) * 100
|
|
length(pull2[pull2>0.54 & pull2 < 1.46]) / length(pull2) * 100
|
|
length(pull2[pull2>0.54 & pull2 < 1.46])
|