How to calculate the Confidence Interval for a Bland-Altman plot in Excel?
Code to Calculate Confidence Interval for Linear Regression (Sklearn)?
95% Confidence interval for proportion with poisson distribution
Options:
-
The skellam distribution is the distribution of the difference in Poisson variables. You should be able construct a distribution and then get the middle 95% by evaluating inverse cdf (0.025) and icdf(0.975)
https://en.m.wikipedia.org/wiki/Skellam_distribution
2) assume normality, which is pretty reasonable given the sample size. Mean is u1 - u2, and variance is u1 + u2. This is the simplest, but doesn't account for the block correlation.
3) run a Clustered bootstrap: similar to a simulation except you redraw from the sample and draw the clusters together. Then take quantiles of the difference between the two outcomes. This is the most accurate.
See cluster data block bootstrap on wikipedia. It sounds tricky, but it's literally just a couple lines of Python.
More on reddit.comCluster data describes data where many observations per unit are observed. This could be observing many firms in many states, or observing students in many classes https://en.m.wikipedia.org/wiki/Bootstrapping_(statistics)
[Q] Sample size calc vs Confidence Level Calculation for Binomial Distribution
How to interpret confidence intervals?
If you repeatedly draw samples and use each of them to find a bunch of 95% confidence intervals for the population mean, then the true population mean will be contained in about 95% of these confidence intervals. The remaining 5% of intervals will not contain the true population mean.
What is the z-score for 95% confidence interval?
The z-score for a two-sided 95% confidence interval is 1.959, which is the 97.5-th quantile of the standard normal distribution N(0,1).
What will increase the width of a confidence interval?
The width of a confidence interval increases when the margin of error increases, which happens when the:
- Significance level increases;
- Sample size decreases; or
- Sample variance increases.