# How do you use a probability function in a simulation

1. Jan 21, 2012

### boreilly

1. The problem statement, all variables and given/known data

i need to model the wind in a computer program.

it is for a wind turbine model and I can use wind data that I have found on the internet, however I would prefer to see if I could model the wind using the weibull distribution and add on the kaimal spectrum if possible. The wind turbine model is on labview. It has an input for the wind that at the moment I can just adjust myself.

2. Relevant equations
equation found here:
http://en.wikipedia.org/wiki/Weibull_distribution

3. The attempt at a solution

Must i make a program that outputs a random number and over the course of a certain time frame(maybe 5 or 10 minutes for me or even just 1 minute for a demonstration) it ensures that certain numbers pop up more than others (eg output of 8 occurs more than 10 and 10 occurs more than 2 and so on) as per the probability distribution(it is the specific case of rayleigh distribution that I will be using. And this program just uses the forumula that I put in (eg the weibull equation from above or any other distribution that I decide to use).

Or is the equation enough to do that? Am i misunderstanding the equation? i come across a billion explanations how the distribution can be used to represent the different wind speeds over time but i cannot find out what one does.

In short, what is the next step after one picks a distribution to represent anything at all to implement it in any simulation?

EDIT:
i just found this
http://en.wikipedia.org/wiki/Random_number_generation#Generation_from_a_probability_distribution

am I on the right track