上传者: 42185419
|
上传时间: 2021-10-06 21:27:48
|
文件大小: 3.3MB
|
文件类型: -
类条件概率密度分布图(程序代码)
plot(function(x) dnorm(x, mean = 5, sd = sqrt(2)),0,13,lwd=5,col="blue",xlab="昨晚睡眠时间长度x(小时)",ylab="概率密度",ylim=c(0,0.6),main="类条件概率密度")
plot(function(x) dnorm(x, mean = 6, sd = 1),3, 13,lwd=5,col="red",add=TRUE)
legend("topright", c("今天下午睡觉P(x|w1)", "没有睡P(x|w2)"),lwd=5,lty=1,inset = .02,col =c("blue","red"))