简体   繁体   English

R模拟反正态分布

[英]R simulate inverse normal distribution

I'm wondering is there any function in R that we can use to simulate a distribution opposite to the normal distribution? 我想知道R中是否有任何函数可以用来模拟与正态分布相反的分布? by opposite i mean instead of starting from a low value and gradually increasing to a peak and then gradually decreasing , i want this distribution to start from a high value then gradually decreasing to a small value and then increasing to initial value. 相反,我的意思是代替从低值开始并逐渐增加到峰值然后逐渐减小,我希望这种分布从高值开始然后逐渐减小到小值然后增加到初始值。 thanks. 谢谢。

If you are looking for a probability distribution that starts high, goes low and ends high then try beta distribution with alpha = beta = 0.5 . 如果您正在寻找从高开始,低端并结束高的概率分布,那么尝试使用alpha = beta = 0.5 beta分布。 In R: 在R:

rb <- rbeta(1000, 0.5, 0.5)
hist(rb)

It produces values between (0,1) , you might want to scale and/or shift it appropriately. 它产生的值介于(0,1)之间,你可能想要缩放和/或适当地移动它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM