문제

I would like to insert random values from a lognormal distribution into a linear equation. The equation is:

y = 2/(9x) + 8

...and x shall take random values from the distribution

exp(rnorm(100, m=-2.59625, sd=0.5852539))

How do I generate the distribution of y?

올바른 솔루션이 없습니다

다른 팁

I think the code you provided should pretty much do what you're describing:

x <- exp(rnorm(100, m=-2.59625, sd=0.5852539))
y <- 2 / (9*x) + 8
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top