Frage

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?

Keine korrekte Lösung

Andere Tipps

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
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top