Say we want a set of random values that are distributed according to some distribution function f(x).(adsbygoogle = window.adsbygoogle || []).push({});

A common way to accomplish that is to find the cumulative distribution function F(x) for the distribution and then solve for x according to

F(x) = Y

x = F'(Y)

Then x will be distributed with the original distribution function, if F'(Y) is fed with random values Y ranging from 0-1.

I'm currently trying to do that with a weibull distribution

f(x) = a*b*x^{b-1}*e^{-a*b*x^b}

where F(x) should be

F(x) = e^{-a}- e^{-a*x^b}

when solving for x in F(x) I however get

x = ( - ln(e^{-a}- Y)/a)^{1/b}

When Y> e^{-a}there are no real solutions. Is there a way to get around this? Have I done something wrong?

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Simulating a continous distribution

Loading...

Similar Threads - Simulating continous distribution | Date |
---|---|

Continous limit of a multivariate normal distribution | Nov 9, 2015 |

Stochastic queue simulation | Jul 22, 2015 |

What happens if you flip an infinite heads and tails coin? | Jan 6, 2015 |

Code for Simulation of SDEs using Girsanov Theorem | Dec 10, 2014 |

G/G/1 Simulation help | Jun 22, 2014 |

**Physics Forums - The Fusion of Science and Community**