New answers tagged

0

Here, I'm going to reproduce example 3.1.1 in Su (2009) where he calculates 95% confidence intervals for the 99th quantile for the speed of light data from Michelson 1879. It basically boils down to implementing the formulas (4), (5) and (6) from Su (2009). In the following R code, I used the gld package to fit the generalized lambda distribution (FMKL). The ...


1

Jan Vanhove presented simulations showing that optional stopping based on the width of a confidence interval does not introduce biases. He simulated a situation where the null hypothesis was true, and simulated thousands of experiments that continued adding n until the confidence interval was narrower than a prespecified limit. Since the null hypothesis is ...


0

Suppose you have $n = 10$ observations in vector x in R from a normal distribution and wish to test $H_0: \mu = 0$ against $H_a: \mu \ne 0.$ at the 5% level. x [1] 7.04 1.94 -2.42 3.85 3.58 -5.70 -4.86 -3.14 4.50 4.04 summary(x); sd(x) Min. 1st Qu. Median Mean 3rd Qu. Max. -5.700 -2.960 2.760 0.883 3.993 7.040 [1] 4.491528 ...


0

Yes, but: If the confidence interval you get from the single split test is sufficiently narrow, you're done and don't need cross validation. One reason to do cross validation is that it will test all available cases in turn. This means that the confidence interval of the cross validation results will be narrower than that of the single split. The ...


1

You could estimate $4\mu_1 - 3\mu_2$ by $\hat \Delta =4\bar X_1 - 3\bar X_2).$ Then $$E(\hat\Delta) = E(4\bar X_1 - 3\bar X_2) = 4\mu_1 - 3\mu_2,$$ $$Var(\hat\Delta) = Var(4\bar X_1 - 3\bar X_2) = 16\frac{\sigma_1^2}{n_1} + 9\frac{\sigma_2^2}{n_2},$$ and $$SD(\hat\Delta) = \sqrt{16\frac{\sigma_1^2}{n_1} + 9\frac{\sigma_2^2}{n_2}} = \sigma\sqrt{\frac{16}{n_1}...


3

In general this is impossible. Suppose you have a function $f$ for which it is claimed that for any population with a finite mean $\mu$, $f$ applied to a sample of size $n$ from that population will return a finite length interval which is a $100\alpha\%$ confidence interval for $\mu$. Let $I = f(0, ..., 0)$ be the confidence interval $f$ produces when every ...


0

You want to know the probability that someone will be in the undergraduate state under specified conditions. You also seem to have data only for year-long time periods. So a simple approach would be to treat this as a logistic regression to predict the probability of that status at the end of each year-long time period. For each individual you set an ...


1

I have three approaches. Go back to the original data and test whether the data near the two time points is significantly different. Do what you suggested by using a normal approximation to the predictions. The downside of this method is that it does not capture the correlation between the predictions at the two time points. Bootstrap the experiment so ...


0

I am answering my own question. Please correct me if I make any mistakes. Continuing with $$T=n[-\log(\hat{\beta})+\log(\beta) - 1 +\frac{\hat{\beta}}{\beta}],$$ we can write $$T=n[\log\frac{\hat{\beta}}{\beta} - 1 +\frac{\hat{\beta}}{\beta}]$$ Now, let $$h(x)=\log(x)-1+x,$$ and we see $h(x)$ achieves the minimum when $x=1$. This means $T$ is the smallest ...


1

I would say that in 98% of cases, this works fine. If you are interested in the 2% cases where it doesn't, read on. This presupposes that the 95% prediction interval is a central one, consisting of the 2.5% and the 97.5% quantile predictions. This is often an unspoken assumption, but of course, you could also have a 95% prediction interval that consists of ...


1

The prediction interval is $$ \hat{y}_{h} \pm t_{(1-\alpha / 2, n-2)} \times \sqrt{M S E \times\left(1+\frac{1}{n}+\frac{\left(x_{h}-\bar{x}\right)^{2}}{\sum\left(x_{i}-\bar{x}\right)^{2}}\right)}$$ for a simple linear regression. The mean of this quantity is $\hat{y}_h$. Thus, you can simply take the average of the prediction interval points and recover ...


1

Your bootstrapped beffect is drawn from some normal distribution: hist(beffect) qqnorm(beffect) qqline(beffect) So your question is: I have a large number of samples from a normal distribution, how to determine the quantiles of the underlying distribution. In any case, you can only estimate these quantiles, never determine them. When faced with the task to ...


1

I would recommend not paying, of course. I would also recommend changing the way that the results are reported. "There was insufficient evidence to conclude that an incentive of X was successful at reducing the average time participants got out of bed." Lastly, if the researcher wants to continue down this line of research, there are a couple of ...


1

What do the Pr(>|t|) values mean when using the summary command? $P(\beta_{Tj} \neq 0)$ for a two sided test of $H_o: E(T_1) = E(T_j)$ Using this model: $y = \beta_0 + \beta_{T2} x_{T2} + \beta_{T3} x_{T3} + \beta_{T4} x_{T4} + \epsilon$ In words, the Pr(>|t|) is the probability that the coefficient on $T_j$ is non-zero when compared to $T_1$, or it ...


1

This is a 'calibration' or (perhaps more descriptively) an 'inverse regression' problem. That should guide you to some useful theoretical treatments. Here's one of several straightforward ways to do it using the investr package that you can find from the Chemometrics R Task view. Setting up your problem in log10 space already to work around a package ...


0

It seems the sticking point of the OP is the phrase "true parameter." In the referenced posts I see a lot of references to "population mean", which may aid understanding initially, until one realizes that "true parameter" and "population mean" do not coincide. Here is an inarguable statement: The data target the ...


1

There are various styles of confidence intervals (CIs). The 95% Wald CI discussed in @Jeff's Answer (+1) sometimes have 95% coverage of the true population proportion for large $n.$ But for small $n$ the estimated standard error $\sqrt{\frac{\hat p(1-\hat p)}{n}}$ may not be sufficiently close to the true standard error $\sqrt{\frac{p(1-p)}{n}}$ to give good ...


2

You are constructing a confidence interval on a proportion. Your sample proportion is $\hat p = \frac{937}{1008} \approx .93$. The confidence interval for a proportion is: $\hat p \pm z \sqrt{\frac{\hat p(1 - \hat p)}{n}}$ $n = 1008$ and for a 95% confidence interval $z = 1.96$ So $\text{CI}_{95} \approx [.922, .938]$


2

If they overlap, there is a number $\color{blue}x$ from their intersection, i. e. $$\color{blue}x \in \theta_1 \pm z(\text{SE}_1)\\ \color{blue}x \in \theta_2 \pm z(\text{SE}_2)$$ By subtracting them, we obtain $$\color{red}0 \in (\theta_1 - \theta_2)\pm z(\text{SE}_1 + \text{SE}_2)$$ (since $\color{blue}x - \color{blue}x = \color{red}0$). Note: I used ...


3

To understand the difference between a confidence interval and a prediction interval you need to understand what each is trying to do. Imagine you have a target population you would like to learn something about. This population could be patients at a large hospital. You conduct a study in which you select 100 patients at random from this target population. ...


1

The central limit theorem applies in this situation and the normal approximation is actually good for fairly low numbers of observations (with $n=20$ you should be pretty safe). However, the midrange (maximum+minimum)/2 is a better estimate than the mean; it has a smaller variance and therefore allows for smaller confidence intervals at the same level. I ...


1

If $A,B$ independent: $P(A < B) = P(B=1|A=0) \times P(A=0) = p (1-q) = \widetilde{p}$ In fact, the event: $B=1, A=0$ is a whole new Bernoulli process $C$ with probability $\widetilde{p}$. If you want to test the null hypothesis that $\widetilde{p} \le 0.95$ then you have to perform a somewhat standard power/sample size calculation. For instance, if $\...


1

This only works if all the correlations are known and the observations from the data with known means are independent of the observations from the data with unknown means. Outside of that scenario, everything becomes more complicated and you would have to post the details of the specific scenario for any answers about that. I'm assuming you want two-sided ...


Top 50 recent answers are included