Questions tagged [binomial-distribution]

The binomial distribution gives the frequencies of "successes" in a fixed number of independent "trials". Use this tag for questions about data that might be binomially distributed or for questions about the theory of this distribution.

Filter by
Sorted by
Tagged with
57
votes
3answers
31k views

Confidence interval for Bernoulli sampling

I have a random sample of Bernoulli random variables $X_1 ... X_N$, where $X_i$ are i.i.d. r.v. and $P(X_i = 1) = p$, and $p$ is an unknown parameter. Obviously, one can find an estimate for $p$: $\...
46
votes
2answers
15k views

Confidence interval around binomial estimate of 0 or 1

What is the best technique to calculate a confidence interval of a binomial experiment, if your estimate is that $p=0$ (or similarly $p=1$) and sample size is relatively small, for example $n=25$?
54
votes
8answers
22k views

How to tell the probability of failure if there were no failures?

I was wondering if there is a way to tell the probability of something failing (a product) if we have 100,000 products in the field for 1 year and with no failures? What is the probability that one of ...
62
votes
6answers
103k views

Test if two binomial distributions are statistically different from each other

I have three groups of data, each with a binomial distribution (i.e. each group has elements that are either success or failure). I do not have a predicted probability of success, but instead can ...
40
votes
9answers
12k views

How can I efficiently model the sum of Bernoulli random variables?

I am modeling a random variable ($Y$) which is the sum of some ~15-40k independent Bernoulli random variables ($X_i$), each with a different success probability ($p_i$). Formally, $Y=\sum X_i$ where $\...
53
votes
4answers
45k views

Logistic Regression - Error Term and its Distribution

On whether an error term exists in logistic regression (and its assumed distribution), I have read in various places that: no error term exists the error term has a binomial distribution (in ...
38
votes
7answers
34k views

Relationship between Binomial and Beta distributions

I'm more of a programmer than a statistician, so I hope this question isn't too naive. It happens in sampling program executions at random times. If I take N=10 random-time samples of the program's ...
48
votes
2answers
112k views

Interpretation of R's output for binomial regression

I'm quite new on this with binomial data tests, but needed to do one and now I´m not sure how to interpret the outcome. The y-variable, the response variable, is binomial and the explanatory factors ...
47
votes
5answers
31k views

Probability distribution for different probabilities

If I wanted to get the probability of 9 successes in 16 trials with each trial having a probability of 0.6 I could use a binomial distribution. What could I use if each of the 16 trials has a ...
12
votes
1answer
2k views

Estimating parameters for a binomial

First of all I'd like to precise that I'm not an expert of the subject. Suppose to have two random variables $X$ and $Y$ that are binomial, respectively $X\sim B(n_1,p)$ and $Y\sim B(n_2,p),$ note ...
28
votes
4answers
9k views

Generating correlated binomial random variables

I was wondering if it might be possible to generate correlated random binomial variables following a linear transformation approach? Below, I tried something simple in ...
9
votes
2answers
3k views

Risk of extinction of Schrödinger's cats

I am interested in how uncertainty can be accounted for when considering the risk of extinction of a species. Forgive me for extending a rather tired thought experiment, but at least it's familiar ...
22
votes
4answers
26k views

Using offset in binomial model to account for increased numbers of patients

Two related questions from me. I have a data frame which contains numbers of patients in one column (range 10 - 17 patients) and 0s and 1s showing whether an incident happened that day. I'm using a ...
15
votes
1answer
3k views

Prediction interval for binomial random variable

What is the formula (approximate or exact) for a prediction interval for a Binomial random variable? Assume $Y \sim \mathsf{Binom}(n, p)$, and we observe $y$ (drawn from $Y$). The $n$ is known. Our ...
6
votes
2answers
8k views

Removing intercept from GLM for multiple factorial predictors only works for first factor in model

I am running a binomial logistic regression with a logit link function in R. My response is factorial [0/1] and I have two multilevel factorial predictors - let's call them $a$ and $b$ where $a$ has 4 ...
37
votes
3answers
23k views

Logistic Regression: Bernoulli vs. Binomial Response Variables

I want to perform logistic regression with the following binomial response and with $X_1$ and $X_2$ as my predictors. I can present the same data as Bernoulli responses in the following format. The ...
31
votes
6answers
15k views

Binomial confidence interval estimation - why is it not symmetric?

I have used the following r code to estimate the confidence intervals of a binomial proportion because I understand that that substitutes for a "power calculation" when designing receiver operating ...
15
votes
1answer
27k views

Fitting a binomial GLMM (glmer) to a response variable that is a proportion or fraction

I'm hoping somebody can help with what I think is a relatively simple question, and I think I know the answer but without confirmation it has become something I just can't be certain of. I have some ...
17
votes
1answer
2k views

Non-uniform distribution of p-values when simulating binomial tests under the null hypothesis

I heard that under the null hypothesis the p-value distribution should be uniform. However, simulations of binomial test in MATLAB return very different-from-uniform distributions with mean larger ...
9
votes
2answers
3k views

Beta as distribution of proportions (or as continuous Binomial)

Beta distribution is related to binomial being also the distribution for order statistics. Probability mass function of binomial distribution is $$ f(k) = {n \choose k} p^k (1-p) ^{n-k} \tag{1} $$ ...
14
votes
5answers
11k views

Probability of a run of k successes in a sequence of n Bernoulli trials

I'm trying to find the probability of getting 8 trials in a row correct in a block of 25 trials, you have 8 total blocks (of 25 trials) to get 8 trials correct in a row. The probability of getting any ...
25
votes
4answers
41k views

Exact two sample proportions binomial test in R (and some strange p-values)

I am trying to solve the following question: Player A won 17 out of 25 games while player B won 8 out of 20 - is there a significant difference between both ratios? The thing to do in R that ...
15
votes
2answers
13k views

Overdispersion in logistic regression

I'm trying to get a handle on the concept of overdispersion in logistic regression. I've read that overdispersion is when observed variance of a response variable is greater than would be expected ...
49
votes
2answers
53k views

What is quasi-binomial distribution (in the context of GLM)?

I'm hoping someone can provide an intuitive overview of what quasibinomial distribution is and what it does. I'm particularly interested in these points: How quasibinomial differs to the binomial ...
61
votes
11answers
11k views

Brain teaser: How to generate 7 integers with equal probability using a biased coin that has a pr(head) = p?

This is a question I found on Glassdoor: How does one generate 7 integers with equal probability using a coin that has a $\mathbb{Pr}(\text{Head}) = p\in(0,1)$? Basically, you have a coin that may or ...
13
votes
1answer
20k views

Overdispersion and Underdispersion in Negative Binomial/Poisson Regression

I was performing a Poisson regression in SAS and found that the Pearson chi-squared value divided by the degrees of freedom was around 5, indicating significant overdispersion. So, I fit a negative ...
25
votes
2answers
3k views

Why does the continuity correction (say, the normal approximation to the binomial distribution) work?

I wish to better understand how the continuity correction to the binomial distribution for the normal approximation was derived. What method was used to decide we should add 1/2 (why not another ...
9
votes
1answer
2k views

For the binomial distribution, why does no unbiased estimator exist for $1/p$?

Suppose that $X$ ~ $Binomial(n,p)$ for $0 < p < 1$ Why does no unbiased estimator exist for $1/p$? My approach: We try to find the structure of $E_p(U(x))$, where $U(x)$ is any estimator of $...
22
votes
5answers
21k views

How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)?

I have a GLMM with a binomial distribution and a logit link function and I have the feeling that an important aspect of the data is not well represented in the model. To test this, I would like to ...
38
votes
4answers
38k views

ANOVA on binomial data

I am analyzing an experimental data set. The data consists of a paired vector of treatment type and a binomial outcome: ...
7
votes
2answers
11k views

How to replicate Stata's robust binomial GLM for proportion data in R?

There is an example on how to run a GLM for proportion data in Stata here The IV is the proportion of students receiving free or reduced priced meals at school. The stata model looks like this.: <...
5
votes
1answer
276 views

Distribution of successes of poisson process followed by a binomial distribution

I have been stuck with a problem for a couple of days regarding the distribution of outcomes from a two-stage process. Specifically, what is the distribution of the number of successes in a poisson ...
6
votes
2answers
986 views

Is the normal distribution a better approximation to the binomial distribution with proportions near or far from 0.5?

From the Online Stat Book: I don't understand this: The accuracy of the approximation depends on the values of N and π. A rule of thumb is that the approximation is good if both Nπ and N(1-π) ...
5
votes
2answers
388 views

The dirty coins and the three judges

All things being perfect, if we want to know if a set of coinage (all coins with the same bias) is biased, and to what degree, we would just use the outcomes and confidence intervals of the binomial ...
33
votes
4answers
90k views

Difference between binomial, negative binomial and Poisson regression

I am looking for some information about the difference between binomial, negative binomial and Poisson regression and for which situations are these regression best fitted. Are there any tests I can ...
14
votes
7answers
5k views

Intuitively understand why the Poisson distribution is the limiting case of the binomial distribution

In "Data Analysis" by D. S. Sivia, there is a derivation of the Poisson distribution, from the binomial distribution. They argue that the Poisson distribution is the limiting case of the binomial ...
6
votes
2answers
3k views

Is there a test for independence in a Bernoulli process?

I have a process with binary output. Is there a standard way to test if it is a Bernoulli process? The problem translates to checking if every trial is independent of the previous trials. I have ...
1
vote
1answer
3k views

Accounting for time in repeated measures glmm, R

I have some count data of advanced stage juvenile snails in tanks that are sampled every 4 days for 4 sample points. I want to see how much the snail development stages change with a changing dosage ...
10
votes
4answers
13k views

normal approximation to the binomial distribution: why np>5?

Nearly every text book which discusses the normal approximation to the binomial distribution mentions the rule of thumb that the approximation can be used if $np\geq5$ and $n(1-p)\geq 5$. Some books ...
8
votes
4answers
32k views

Maximum likelihood estimation of p in a Binomial sample

Assuming I need to find the ML estimator for p, p being the chance of success in a Binomial experiment $Bin(N,p)$, I would expect my density function to be: $$ f(y) = {{N}\choose{y}} p^y(1-p)^{N-y} $$...
8
votes
1answer
4k views

Testing Whether a Binomial Distribution Fits Data

I have a sample from a discrete distribution as such: Type: 0 1 2 3 4 5 Occurrences: 88 12 52 43 21 5 My task is to test whether ...
7
votes
2answers
1k views

Can multinomial distribution be simulated by a sequence of binomial draws?

I wonder if single multinomial distribution (I will use the notation from JAGS/WinBUGS, but in fact, this is principial thing rather than of particular language) ...
2
votes
2answers
1k views

What is the variance of a binomial distribution with -1 and 1?

I am struggling to see how to solve the following problem: I have n i.i.d bernoulli trials. The result can be -1 or 1. I can figure out the expected value of this = n(p-(1-p) but how do I know what ...
4
votes
1answer
273 views

Probability of getting between

...2 to 5 questions answered correctly, out of 20 of them? Each question has 5 choices. Probability of getting one right is 1/5. Probability of getting exactly 1 right is ${20 \choose 1} p^1 q^{19}$, ...
59
votes
4answers
111k views

Standard error for the mean of a sample of binomial random variables

Suppose I'm running an experiment that can have 2 outcomes, and I'm assuming that the underlying "true" distribution of the 2 outcomes is a binomial distribution with parameters $n$ and $p$: ${\rm ...
16
votes
2answers
33k views

R: glm function with family = "binomial" and "weight" specification

I am very confused with how weight works in glm with family="binomial". In my understanding, the likelihood of the <...
12
votes
6answers
2k views

Is it appropriate to treat n-point Likert scale data as n trials from a binomial process?

I've never liked how people typically analyze data from Likert scales as if error were continuous & Gaussian when there are reasonable expectations that these assumptions are violated at least at ...
35
votes
11answers
8k views

Why is generating 8 random bits uniform on (0, 255)?

I am generating 8 random bits (either a 0 or a 1) and concatenating them together to form an 8-bit number. A simple Python simulation yields a uniform distribution on the discrete set [0, 255]. I am ...
7
votes
1answer
6k views

Residual variance for glmer

I am running a glmer model and I want to determine the total variance. My data is for survival and it is coded as 0 and 1, where 1 represents that the individual survived and 0 represents that the ...
11
votes
6answers
976 views

Statistical argument for why 10,000 heads from 20,000 tosses suggests invalid data

Let's say we are repeatedly tossing a fair coin, and we know number of heads and tails should be roughly equal. When we see a result like 10 heads and 10 tails for a total of 20 tosses, we believe the ...

1
2 3 4 5
7