Question

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?

No correct solution

OTHER TIPS

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top