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

The histogram

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.

  • $\begingroup$ 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? $\endgroup$
    – Glen_b
    Nov 24 '14 at 3:37
  • $\begingroup$ Besides simulation, you could perhaps consider resampling unless you need to get good information well into the tails. $\endgroup$
    – Glen_b
    Nov 24 '14 at 3:38
  • $\begingroup$ @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. $\endgroup$
    – amoodie
    Nov 24 '14 at 5:18
  • $\begingroup$ 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? $\endgroup$
    – Glen_b
    Nov 24 '14 at 6:23
  • $\begingroup$ @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. $\endgroup$
    – 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:

Qdata = csvread('./missouri_data.csv',1,0);
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);

Thanks all, for the help. AM.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.