# Need direction in regards to probability based random value generation

I have a daily stream discharge data set spanning 10 years whose histogram looks like this:

I would like to use it to set the distribution for a randomly chosen discharge for a given timestep. That is, I want to generate a value for discharge for my model timestep based on the probability of that discharge existing in the dataset.

I realize this sounds like a modeling/programming question, but I'm not looking for code, just direction. I have tried researching probability density functions and fitting a curve to the histogram and then sampling, but I want to be sure I'm headed in the right direction before proceeding further. Thanks much for your time. AM.

• You may not be able to find a named distribution with a good fit. There seems to be a sharp lower bound; is this a known quantity (for whatever reason, it must always be bigger than some value $c$), or does it just work out that in the data it's always (but sometimes just) bigger than some value? – Glen_b Nov 24 '14 at 3:37
• Besides simulation, you could perhaps consider resampling unless you need to get good information well into the tails. – Glen_b Nov 24 '14 at 3:38
• @Glen_b the reason for the very sharp drop below ~600 is that this is a stream, and that is the level called 'baseflow'. i.e. the discharge of the stream is never (or VERY rarely, so rare it's never been measured as such) below the baseflow level. The value $c$ is not defined, it is theoretically transient in time, with an increasing sample size. – amoodie Nov 24 '14 at 5:18
• Thanks. If there's variation in time, why would you want a random value from the collection, rather than one that takes account of the way it varies over time? – Glen_b Nov 24 '14 at 6:23
• @Glen_b well there is a variation in time, but the idea is that it is predictable. I want to run a simulation where at each timestep a discharge is chosen at random from the distribution above. This way the sim represents the random nature of precipitation (and thus discharge) but is also reflective of the actual disharge data (in both magnitude and distribution of 'flood' events (high discharge is much rarer than low discharge)). I'm looking at inverse CDF method right now, but not having much success. – amoodie Nov 24 '14 at 14:26

I'm quickly realizing that I may be over complicating things. I think I will just randomly sample the emirical data, generating a vector based on the empirical values with length of run_time/timestep. In Matlab, as follows:

discharge_data = 0.0283168466 .* Qdata(:,2); % convert cfs column to m3/s
Q_ws(1:run_time/timestep) = 0;
for i = 1:run_time/timestep;
pull = round(rand() * numel(discharge_data)); % date to pull
Q_ws(i) = discharge_data(pull);
end

Thanks all, for the help. AM.