R语言绘制瑞利分布和指数分布,并为瑞利分布着不同色

从概率论和统计学角度看,Weibull Distribution是连续性的概率分布,其概率密度为:
在这里插入图片描述

其中,x是随机变量,λ>0是比例参数(scale parameter),k>0是形状参数(shape parameter)。显然,它的累积分布函数是扩展的指数分布函数,而且,Weibull distribution与很多分布都有关系。如,当k=1,它是指数分布;k=2且时,是Rayleigh distribution(瑞利分布)

library(gcookbook) # For the data set
library(tidyverse)

#基础绘图
# 这里的h没有大小顺序
h <- rweibull(100000, shape=2, scale=0.3)
ggplot(NULL,aes(x=h))+
  geom_histogram(binwidth = 0.01,fill="sienna",colour="black")+
  ggtitle("瑞利分布 \n 直方图")

在这里插入图片描述

ggplot(NULL,aes(x=h))+
  geom_histogram(binwidth = 0.01,fill="sienna",colour="white")+
  ggtitle("瑞利分布 \n 直方图")
  

在这里插入图片描述

ggplot(NULL,aes(x=h))+
  geom_histogram(binwidth = 0.01,fill="skyblue",colour="white")+
  ggtitle("瑞利分布 \n 直方图")

在这里插入图片描述

ggplot(NULL,aes(x=h))+
  geom_histogram(binwidth = 0.01,fill="slateblue",colour="white")+
  ggtitle("瑞利分布 \n 直方图")

在这里插入图片描述

ggplot(NULL,aes(x=h))+
  geom_histogram(binwidth = 0.01,fill="slategray",colour="white")+
  ggtitle("瑞利分布 \n 直方图")

在这里插入图片描述

ggplot(NULL,aes(x=h))+
  geom_histogram(binwidth = 0.01,fill="snow",colour="black")+
  ggtitle("瑞利分布 \n 直方图")

在这里插入图片描述

ggplot(NULL,aes(x=h))+
  geom_histogram(binwidth = 0.01,fill="springgreen",colour="black")+
  ggtitle("瑞利分布 \n 直方图")

在这里插入图片描述

ggplot(NULL,aes(x=h))+
  geom_histogram(binwidth = 0.01,fill="steelblue",colour="black")+
  ggtitle("瑞利分布 \n 直方图")

在这里插入图片描述

ggplot(NULL,aes(x=h))+
  geom_histogram(binwidth = 0.01,fill="steelblue",colour="white")+
  ggtitle("瑞利分布 \n 直方图")

在这里插入图片描述

ggplot(NULL,aes(x=h))+
  geom_histogram(binwidth = 0.01,fill="tan",colour="white")+
  ggtitle("瑞利分布 \n 直方图")

在这里插入图片描述

ggplot(NULL,aes(x=h))+
  geom_histogram(binwidth = 0.01,fill="thistle",colour="white")+
  ggtitle("瑞利分布 \n 直方图")

在这里插入图片描述

ggplot(NULL,aes(x=h))+
  geom_histogram(binwidth = 0.01,fill="tomato",colour="white")+
  ggtitle("瑞利分布 \n 直方图")

在这里插入图片描述

ggplot(NULL,aes(x=h))+
  geom_histogram(binwidth = 0.01,fill="turquoise",colour="white")+
  ggtitle("瑞利分布 \n 直方图")

在这里插入图片描述

ggplot(NULL,aes(x=h))+
  geom_histogram(binwidth = 0.01,fill="violet",colour="white")+
  ggtitle("瑞利分布 \n 直方图")

在这里插入图片描述

ggplot(NULL,aes(x=h))+
geom_histogram(binwidth = 0.01,fill=“wheat”,colour=“black”)+
ggtitle(“瑞利分布 \n 直方图”)
在这里插入图片描述
ggplot(NULL,aes(x=h))+
geom_histogram(binwidth = 0.01,fill=“white”,colour=“black”)+
ggtitle(“瑞利分布 \n 直方图”)
在这里插入图片描述
ggplot(NULL,aes(x=h))+
geom_histogram(binwidth = 0.01,fill=“yellow”,colour=“black”)+
ggtitle(“瑞利分布 \n 直方图”)
在这里插入图片描述

ggplot(NULL,aes(x=h))+
geom_histogram(binwidth = 0.01,fill=“yellowgreen”,colour=“black”)+
ggtitle(“瑞利分布 \n 直方图”)
在这里插入图片描述
参考文献:ggplot2绘制概率密度图

             百度文库---颜色大全:含中英文对照及色值

温布尔分布介绍

开发环境:RStudio和微信截屏工具

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值