Questions tagged [confidence-interval]

In statistics, a confidence interval is a measure of the precision of an estimate of an underlying parameter. In principle, if the estimate is computed several times on independent samples of data, the parameter should fall within associated confidence intervals a set proportion of the time. This proportion is known as the coverage probability, and is most commonly set to be 95%.

When estimating a vector of parameters, c(θ), based on observations of some random variables whose distribution depends on those parameters in some way, a confidence interval (for scalar θ) or confidence region (for vector c(θ)), is some set C=C(X) such that P(c(θ) ∈ C) = 1−α. To note:

  1. The confidence interval is a function of the data, X, so is itself random.
  2. The statement regarding the probability that c(θ) ∈ C should be regarded with respect to the randomness in X which controls C. Since confidence intervals are a frequentist notion, one should not think of the probability as applying to the unobserved parameter c(θ), which, to a frequentist, is not random.
  3. Often one can only compute approximate confidence intervals, which may have the nominal coverage asymptotically in the sample size.

Tag usage

Questions on should be about implementation and programming problems, not about the statistical or theoretical properties of the technique. Consider whether your question might be better suited to Cross Validated, the StackExchange site for statistics, machine learning and data analysis.

1131 questions
0
votes
1 answer

Hyperellipsoid confidence region

The R function ellipse() (package: ellipse) allows to generate the coordinates of confidence regions for two parameters. Does anyone know how to generate the coordinates of hyperellipsoid confidence regions for D>2 parameters?
essicolo
  • 803
  • 7
  • 13
-1
votes
0 answers

twostepweakiv - confidence set not computed

I am trying to use the twostepweakiv command in Stata to get weak-iv robust confidence intervals for an IV model with two endogenous regressors and two instrumental variables. I am struggling to interpret the output of the twostepweakiv…
Silvia
  • 9
  • 1
-1
votes
1 answer

What is the best way to plot confidence intervals for close curves

I have to plot a figure that contains three curves that are close to each other. When I plot the confidence intervals in each curve, I get an ugly figure that contains confidence intervals that are overlapped. Here is an example. from matplotlib…
zdm
  • 495
  • 3
  • 15
-1
votes
1 answer

R Code for confidence intervals by groups and plotting

I am looking for help with my code. I have a dataset where many people were asked to score 5 different scenerios with a range of -5 to +5. I then grouped the 2 groups to S and A as I am looking to compare these 2 groups. The data set is…
-1
votes
2 answers

Changing () to [] for confidence interval in gtsummary table

I am making my demographics table using gtsummary. I want the confidence interval in my table to appear between [] not (). For example, trial %>% select(response, grade) %>% tbl_summary(statistic = all_categorical() ~ "{p}%", …
-1
votes
1 answer

Formula to calculate standard error using 95% confidence interval

I have a column containing 95% confidence intervals as shown below. I would like to calculate standard error using the formula SE = (upper limit – lower limit)/3.92 in R studio. I would like to know how to calculate SE when the upper limit and lower…
Mahan
  • 71
  • 1
  • 6
-1
votes
1 answer

Plotting a conference interval on a poisson glm (ggplot)

I have a poisson glm and i am trying to plot 95% condidence intervals using ggplot. My issue lies when i use the geom_ribbon() argument. I think my model and CIs are all set up fine, its just the ggplot code that i cannot get to work, if anyone…
Joe
  • 795
  • 1
  • 11
-1
votes
1 answer

Creating and plotting confidence intervals

I have fitted a gaussian GLM model to my data, i now wish to create 95% CIs and fit them to my data. Im having a couple of issues with this when plotting as i cant get them to capture my data, they just seem to plot the same line as the model…
Joe
  • 795
  • 1
  • 11
-1
votes
1 answer

Creating Bootstrap Confidence Intervals - 'list' object has no attribute 'sample'?

I am trying to find bootstrap 95% confidence intervals for a small set of data, but when I try it, it says that my "list object has no attribute sample". I am not sure what list they are talking about, and how do I add that attribute? I tried doing…
-1
votes
2 answers

List out the Confident Interval have actual means of 10

I have a table of Confident Interval as the picture below, the questions asking for how many the Interval contains the actual mean of 10 and list them out. I only know how to count how many Inside <- 0 for (i in 1:100) { if ((CIs[i,1]<10) & ( 10 <…
-1
votes
1 answer

Adding confidence intervals from model predictions in mixed models in R -- ggplot2?

I have model prediction for mean ans confidence intervals from my data that I want to add on the graph. I know how to plot the data, but how can I add the model fitted mean and confidence intervals? For the latter geom_ribbon does not seem to do the…
Rspacer
  • 2,369
  • 1
  • 14
  • 40
-1
votes
1 answer

Plotting confidence interval in R

I'd like to plot, using ggplot / geom_point, a change in scores with typical error as well as confidence intervals. I'd like the confidence interval on each point to be set at .93 for upper and lower CI (which is 90% CI). I've used the following…
jg23
  • 3
  • 3
-1
votes
1 answer

Calculate variance of a proportion using a confidence interval and point estimate

I'd like to know how to compute the variance of a proportion using the point estimate and confidence interval. In this case, I'm referring to data from a 2 x 2 table: Sensitivity = 0.88 (95% CI, 0.77 to 0.95). Is it possible to estimate the variance…
mkpcr
  • 431
  • 1
  • 3
  • 13
-1
votes
1 answer

How to calculate confidence interval from multiple data?

I am sampling 159 videos, trying to do experiments and see how much sample rate affects some evaluation score. I got a pretty messy picture Each line is a single video. Y axis is the evaluation score, X axis is number of frames I skip (in other…
-1
votes
1 answer

R: Profile-likelihood based confidence intervals

I am using the function plkhci from library Bhat to construct Profile-likelihood based confidence intervals and I got this warning: Warning message: In dqstep(list(label = x$label, est = btrf(xt, x$low, x$upp), low = x$low, : oops: unable to…
yap
  • 61
  • 6