Home › Azimuth Project › › - Questions

It looks like you're new here. If you want to get involved, click one of these buttons!

- All Categories 2.4K
- Chat 502
- Study Groups 21
- Petri Nets 9
- Epidemiology 4
- Leaf Modeling 2
- Review Sections 9
- MIT 2020: Programming with Categories 51
- MIT 2020: Lectures 20
- MIT 2020: Exercises 25
- Baez ACT 2019: Online Course 339
- Baez ACT 2019: Lectures 79
- Baez ACT 2019: Exercises 149
- Baez ACT 2019: Chat 50
- UCR ACT Seminar 4
- General 73
- Azimuth Code Project 110
- Statistical methods 4
- Drafts 10
- Math Syntax Demos 15
- Wiki - Latest Changes 3
- Strategy 113
- Azimuth Project 1.1K
- - Spam 1
- News and Information 148
- Azimuth Blog 149
- - Conventions and Policies 21
- - Questions 43
- Azimuth Wiki 718

Options

Can I just check I'm right about something: suppose that I've got a probabilistic system $x=s(\theta,w)$ which is fundamentally defined in terms of a set of deterministic parameters $\theta$ and a stream of random bits (which we'll call a particular instance $w$) and I'd like to infer things about the distribution of $x$ (eg, mean) for various parameter values (assuming the bit streams the system encounters are uniformly distributed). For a given set of parameters $\theta_i$ you can estimate the distribution by running the system from scratch on independently generated pseudo-random sequences $w_1,\dots,w_n$ and taking the resulting $x$ values as samples from the distribution. It's very important that the $w_i$s are independent (as much as PRNG output can be).

Now, I'm right in saying that if I'm estimating the distributions of $x$ for each set of parameters in $\theta_0, \dots, \theta_m$, it doesn't matter (statistics-wise) if I reuse the same "set of independent pseudo-random sequences" for the distribution estimation of $x$ for each $\theta_i$?

## Comments

I'd guess it would be okay if you're not trying to compare the distributions (or estimators of distributions) to each other. For example, if you calculate $E[s(\theta_1,w)]$ and $E[s(\theta_2,w)]$ using the same finite sequence $w$, then the sample means might be biased in similar ways relative to the respective population means they're estimating. If that's something you're worried about, you might want to avoid it.

Personally, I never reuse random numbers. There's little reason to, in my experience. I suppose PRNG can be a computational bottleneck if the function $s(.,.)$ is very simple, but they're still not that expensive to generate.

`I'd guess it would be okay if you're not trying to compare the distributions (or estimators of distributions) to each other. For example, if you calculate $E[s(\theta_1,w)]$ and $E[s(\theta_2,w)]$ using the same finite sequence $w$, then the sample means might be biased in similar ways relative to the respective population means they're estimating. If that's something you're worried about, you might want to avoid it. Personally, I never reuse random numbers. There's little reason to, in my experience. I suppose PRNG can be a computational bottleneck if the function $s(.,.)$ is very simple, but they're still not that expensive to generate.`

Thanks Nathan. I'm basically thinking about the combination of running the Monte-Carlo simulations for different parameter values of the system at the same time on systems where there are some "control flow"-type elements that are made on a probabilistic basis. You can use different random numbers for the purely numerical stuff, but you have to use the same one for the "control flow" elements if you want to be able to keep doing simultaneous simulations.

I think I'll have a go at using differnt random numbers for the numerical elements and the same ones for the control-flow types ones and explicitly note this may lead to problems, particularly if insuffiients runs are performed.

`Thanks Nathan. I'm basically thinking about the combination of running the Monte-Carlo simulations for different parameter values of the system at the same time on systems where there are some "control flow"-type elements that are made on a probabilistic basis. You can use different random numbers for the purely numerical stuff, but you have to use the same one for the "control flow" elements if you want to be able to keep doing simultaneous simulations. I think I'll have a go at using differnt random numbers for the numerical elements and the same ones for the control-flow types ones and explicitly note this may lead to problems, particularly if insuffiients runs are performed.`

I've been doing some reading about probabilistic simulation. It turns out that there are arguments about why you might want to use the same random numbers for simulations of a system for different

parameters, but there are pro's and con's: in particular if you have the ample time for running simulations it's safer not to. I'll try and give a brief description at Method of common random numbers in Monte Carlo methods.`I've been doing some reading about probabilistic simulation. It turns out that there are arguments about why you might want to use the same random numbers for simulations of a system for different _parameters_, but there are pro's and con's: in particular if you have the ample time for running simulations it's safer not to. I'll try and give a brief description at [[Method of common random numbers in Monte Carlo methods]].`