At the moment I'm studying bootstrap and I want to do some examples to get a feeling for it. Suppose I generate the following data:

data <- rnorm(1000,1,3)
number <- min(data[data <= 0.9])

so number.min will contain the minimum number of the data in the interval $(-\infty,0.9]$ which is equal to $-8.036491$. If we know there were again 1000 generated numbers using a normal distribution with standard deviation 3. Suppose the number.min is this time $a:=-12.2385$, is it still plausible to assume that the expected value is $1$?

We denote number.min as a random variable $X$. My idea was to perform a hypothesis test. So $H_0: \mu = 1$. The problem here is we do not know the exact distribution of $X$ and I don't want to assume normal distribution. My idea was to use bootstrap. Under the assumption $H_0$, I can generate as many outcomes of $X$ as I want. So if I'm right, I'm interested in

$$P(X\in [x_l,x_u]|\mu =1)=1-\alpha$$

when choosing $\alpha=0.01$ I want to find $x_u,x_l$. If $a\in[x_l,x_u]$ I would argue that $\mu=1$ is plausible, right?

1. Question: This is theoretical nature: Is my idea correct, i.e. finding $x_l,x_u$ is this whole procedure from a statistical viewpoint ok?

Assuming this is right, we can go over and implement this. First we generate enough outcomes of $X$

 f <- function(n){
data <- rnorm(n,1,3)
number <- min(data[data <= 0.9])
data <- replicate(500,f(1000))

This leads to 500 realisations of $X$. Now we can generate our boostrap samples

bst.smpl <- boot(data,?,1000)

2. Question: the boot function needs an argument "statistics", but I don't understand which it is in my case?

Last I would just compute the confidence intervals

ci <- boot.ci(bst.smpl,conf=0.99,type="basic",index=1)

3.Question: Is there any easier way to decide if we are still using $\mu=1$?

  • $\begingroup$ I'm not entirely clear on what you are asking. Why should the minimum of your sample carry much information about the expected value? Why do you cherry-pick data <0.9? $\endgroup$ Apr 7, 2014 at 14:42
  • $\begingroup$ @StephanKolassa about your first question: Well that's just a question. I defined $X$ in this way and I would like to deduce, given an outcome if we are using a specific $\mu$. About the second one. This is basically because then $X$ has a unknown distribution $\endgroup$
    – math
    Apr 7, 2014 at 14:46
  • $\begingroup$ @StephanKolassa I designed this problem by myself to learn bootstrap. The definition of $X$ is arbitrary. My goal was to get outcomes of a unknown distribution to use the bootstrap method. $\endgroup$
    – math
    Apr 7, 2014 at 14:54
  • $\begingroup$ I'll wait for the statistics gurus to chime in, but my suspicion is that the answer to your first question is No, as in here: en.wikipedia.org/wiki/Not_even_wrong Sorry. I'm open to being convinced otherwise. $\endgroup$ Apr 7, 2014 at 14:59
  • $\begingroup$ @StephanKolassa thanks for your thoughts. Can you explain why do you think it is not true? Suppose you have a normal distributed r.v. $X$ (everything known) and you observe a value $a$. If $a$ is outside $[x_l,x_u]$, you would argue that this outcome is extremely rare. So as a decision point, it seems to be plausible $\endgroup$
    – math
    Apr 7, 2014 at 15:15


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.