0
$\begingroup$

I understand bootstrap sampling with replacement. But what i still not sure about is that how to apply this approach to sample from data that has more than one dependent variables.

For example, suppose my data collected from different routes in a small city, x= distance (in km) and y=time (in minutes) as:

Distance(x)    Time(y)
  12             15
  2              5
  4              4
 ..              ..

Now to apply bootstrap, i cannot deal with x and y separately,obliviously, as the time depend on the distance and nature of route. I was thinking to do either:

1- add a new column (z), where z= time/distance,, then in my bootstrap i pick up a random x and z; and from that i can calculate y= x * z.

2- i pick up a random row (x and y), e.g., (12,15),((4,4),(4,4). So dealing with x and y as a single variable.

In the first solution, it gives me more combination, but may generate new data. In the second, it is only generating from the data i have.

My question is what out of these is the correct way to sample from my data.

$\endgroup$
  • $\begingroup$ What parameter(s) do you seek to estimate by bootstrapping? $\endgroup$ – BruceET Jun 30 at 19:53
  • $\begingroup$ i would like to simulate routes, so estimating x and y. in other words, in my simulation i wish to generate route data (x,y) -> then i do my calculation etc. $\endgroup$ – MWH Jun 30 at 20:08
0
$\begingroup$

As i understand it, the data is a sample of coordinate pairs, so one selects coordinate pairs by bootstrap. There is no onus to doing it that way. For example, if the data were {x,y,z} coordinates you would not have to make it one dimensional to do bootstrap, just make a sample from sets of numbers with replacement.

$\endgroup$

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.