Why does non-parametric bootstrap not return the same sample over and over again?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty{ margin-bottom:0;
}
up vote
6
down vote
favorite
Why does non-parametric bootstrap not return the same sample over and over again?
My notes write:
Assume data $X_1,...,X_n$.
Sample data with replacement to produce $X_1^{(p)},...,X_n^{(p)}$
Now since both are length $n$, then how does this not produce always the same sample? I'm missing something.
bootstrap
add a comment |
up vote
6
down vote
favorite
Why does non-parametric bootstrap not return the same sample over and over again?
My notes write:
Assume data $X_1,...,X_n$.
Sample data with replacement to produce $X_1^{(p)},...,X_n^{(p)}$
Now since both are length $n$, then how does this not produce always the same sample? I'm missing something.
bootstrap
add a comment |
up vote
6
down vote
favorite
up vote
6
down vote
favorite
Why does non-parametric bootstrap not return the same sample over and over again?
My notes write:
Assume data $X_1,...,X_n$.
Sample data with replacement to produce $X_1^{(p)},...,X_n^{(p)}$
Now since both are length $n$, then how does this not produce always the same sample? I'm missing something.
bootstrap
Why does non-parametric bootstrap not return the same sample over and over again?
My notes write:
Assume data $X_1,...,X_n$.
Sample data with replacement to produce $X_1^{(p)},...,X_n^{(p)}$
Now since both are length $n$, then how does this not produce always the same sample? I'm missing something.
bootstrap
bootstrap
asked 14 hours ago
mavavilj
1,139724
1,139724
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
12
down vote
Each member of the bootstrap sample is selected randomly with replacement from the data set. If we were to sample without replacement, then every sample would simply be a re-ordering of the same data. But, as a consequence of replacement, the bootstrap samples differ in how many times they include each data point (which may be once, multiple times, or not at all). On average, ~63% of data points appear at least once in a given bootstrap sample.
add a comment |
up vote
1
down vote
@user20160's explanation is fine. Here's an example of 10 bootstrap samples of the sequence from 1 to 5, showing that some values will be represented more than once and other values will not be represented (x <- 1:5; t(replicate(10,sort(sample(x,replace=TRUE)))))
[,1] [,2] [,3] [,4] [,5]
[1,] 2 2 4 4 5
[2,] 1 1 1 2 4
[3,] 3 3 3 5 5
[4,] 1 1 1 2 3
[5,] 1 1 2 3 3
[6,] 1 2 3 4 4
[7,] 2 2 3 4 5
[8,] 3 3 3 4 4
[9,] 1 1 2 3 5
[10,] 1 1 2 4 4
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
12
down vote
Each member of the bootstrap sample is selected randomly with replacement from the data set. If we were to sample without replacement, then every sample would simply be a re-ordering of the same data. But, as a consequence of replacement, the bootstrap samples differ in how many times they include each data point (which may be once, multiple times, or not at all). On average, ~63% of data points appear at least once in a given bootstrap sample.
add a comment |
up vote
12
down vote
Each member of the bootstrap sample is selected randomly with replacement from the data set. If we were to sample without replacement, then every sample would simply be a re-ordering of the same data. But, as a consequence of replacement, the bootstrap samples differ in how many times they include each data point (which may be once, multiple times, or not at all). On average, ~63% of data points appear at least once in a given bootstrap sample.
add a comment |
up vote
12
down vote
up vote
12
down vote
Each member of the bootstrap sample is selected randomly with replacement from the data set. If we were to sample without replacement, then every sample would simply be a re-ordering of the same data. But, as a consequence of replacement, the bootstrap samples differ in how many times they include each data point (which may be once, multiple times, or not at all). On average, ~63% of data points appear at least once in a given bootstrap sample.
Each member of the bootstrap sample is selected randomly with replacement from the data set. If we were to sample without replacement, then every sample would simply be a re-ordering of the same data. But, as a consequence of replacement, the bootstrap samples differ in how many times they include each data point (which may be once, multiple times, or not at all). On average, ~63% of data points appear at least once in a given bootstrap sample.
answered 12 hours ago
user20160
15.5k12555
15.5k12555
add a comment |
add a comment |
up vote
1
down vote
@user20160's explanation is fine. Here's an example of 10 bootstrap samples of the sequence from 1 to 5, showing that some values will be represented more than once and other values will not be represented (x <- 1:5; t(replicate(10,sort(sample(x,replace=TRUE)))))
[,1] [,2] [,3] [,4] [,5]
[1,] 2 2 4 4 5
[2,] 1 1 1 2 4
[3,] 3 3 3 5 5
[4,] 1 1 1 2 3
[5,] 1 1 2 3 3
[6,] 1 2 3 4 4
[7,] 2 2 3 4 5
[8,] 3 3 3 4 4
[9,] 1 1 2 3 5
[10,] 1 1 2 4 4
add a comment |
up vote
1
down vote
@user20160's explanation is fine. Here's an example of 10 bootstrap samples of the sequence from 1 to 5, showing that some values will be represented more than once and other values will not be represented (x <- 1:5; t(replicate(10,sort(sample(x,replace=TRUE)))))
[,1] [,2] [,3] [,4] [,5]
[1,] 2 2 4 4 5
[2,] 1 1 1 2 4
[3,] 3 3 3 5 5
[4,] 1 1 1 2 3
[5,] 1 1 2 3 3
[6,] 1 2 3 4 4
[7,] 2 2 3 4 5
[8,] 3 3 3 4 4
[9,] 1 1 2 3 5
[10,] 1 1 2 4 4
add a comment |
up vote
1
down vote
up vote
1
down vote
@user20160's explanation is fine. Here's an example of 10 bootstrap samples of the sequence from 1 to 5, showing that some values will be represented more than once and other values will not be represented (x <- 1:5; t(replicate(10,sort(sample(x,replace=TRUE)))))
[,1] [,2] [,3] [,4] [,5]
[1,] 2 2 4 4 5
[2,] 1 1 1 2 4
[3,] 3 3 3 5 5
[4,] 1 1 1 2 3
[5,] 1 1 2 3 3
[6,] 1 2 3 4 4
[7,] 2 2 3 4 5
[8,] 3 3 3 4 4
[9,] 1 1 2 3 5
[10,] 1 1 2 4 4
@user20160's explanation is fine. Here's an example of 10 bootstrap samples of the sequence from 1 to 5, showing that some values will be represented more than once and other values will not be represented (x <- 1:5; t(replicate(10,sort(sample(x,replace=TRUE)))))
[,1] [,2] [,3] [,4] [,5]
[1,] 2 2 4 4 5
[2,] 1 1 1 2 4
[3,] 3 3 3 5 5
[4,] 1 1 1 2 3
[5,] 1 1 2 3 3
[6,] 1 2 3 4 4
[7,] 2 2 3 4 5
[8,] 3 3 3 4 4
[9,] 1 1 2 3 5
[10,] 1 1 2 4 4
answered 6 hours ago
Ben Bolker
21.7k15887
21.7k15887
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f378091%2fwhy-does-non-parametric-bootstrap-not-return-the-same-sample-over-and-over-again%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown