Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将对数正态分布中的随机值插入线性方程。方程是:
y = 2/(9x) + 8
...并x应从分布中获取随机值
x
exp(rnorm(100, m=-2.59625, sd=0.5852539))
如何生成 的分布y?
y
我认为您提供的代码应该几乎可以满足您的描述:
x <- exp(rnorm(100, m=-2.59625, sd=0.5852539)) y <- 2 / (9*x) + 8