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
62
votes
5answers
101k 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 ...
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 ...
57
votes
2answers
30k 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$: $\...
56
votes
4answers
109k 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 ...
54
votes
8answers
21k 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 ...
52
votes
4answers
44k 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 ...
46
votes
2answers
111k 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 ...
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$?
46
votes
5answers
30k 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 ...
45
votes
2answers
51k 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 ...
40
votes
9answers
11k 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 $\...
38
votes
7answers
33k 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 ...
38
votes
4answers
37k 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: ...
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. ...
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 ...
32
votes
4answers
88k 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 ...
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 ...
31
votes
4answers
2k views

Is the result of an exam a binomial?

Here is a simple statistics question I was given. I'm not really sure I understand it. X = the number of aquired points in an exam (multiple choice and a right answer is one point). Is X binomial ...
30
votes
1answer
901 views

When is binomial distribution function above/below its limiting Poisson distribution function?

Let $B(n,p,r)$ denote the binomial distribution function (DF) with parameters $n \in \mathbb N$ and $p \in (0,1)$ evaluated at $r \in \{0,1,\ldots,n\}$: \begin{equation} B(n,p,r) = \sum_{i=0}^r \binom{...
28
votes
4answers
8k 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 ...
27
votes
3answers
32k views

Negative binomial distribution vs binomial distribution

What is the difference between the negative binomial distribution and the binomial distribution? I tried reading online, and I found that the negative binomial distribution is used when data points ...
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 ...
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 ...
25
votes
2answers
36k views

What's the difference between binomial regression and logistic regression?

I've always thought of logistic regression as simply a special case of binomial regression where the link function is the logistic function (instead of, say, a probit function). From reading the ...
24
votes
2answers
4k views

Mother milk of 6 Corona-positive (COVID-19) women does not contain the virus - can we make a confidence statement about this?

I am asking this question because I believe it would be great if the statistics community could make a contribution to solving this serious puzzle until more evidence is available. The UK Royal ...
22
votes
4answers
25k 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 ...
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 ...
20
votes
3answers
15k views

How does logistic regression use the binomial distribution?

I'm trying to understand how logistic regression uses the binomial distribution. Let's say I'm studying nest success in birds. The probability of a nest being successful is 0.6. Using the binomial ...
19
votes
3answers
957 views

Analysis of Danish mask study data by Nassim Nicholas Taleb (binomial GLM with complete separation)

Recently, Nassim Nicholas Taleb made this post about the recent Danish mask study, a randomized controlled trial which concluded that the proportions of newly diagnosed coronavirus infections was not ...
17
votes
3answers
1k views

How can I model flips until N successes?

You and I decide to play a game where we take turns flipping a coin. The first player to flip 10 heads in total wins the game. Naturally, there is an argument about who should go first. Simulations ...
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 ...
17
votes
2answers
3k views

Bayesian estimation of $N$ of a binomial distribution

This question is a technical follow-up of this question. I have trouble understanding and replicating the model presented in Raftery (1988): Inference for the binomial $N$ parameter: a hierarchical ...
16
votes
2answers
32k 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 <...
15
votes
2answers
2k views

I don't understand the variance of the binomial

I feel really dumb even asking such a basic question but here goes: If I have a random variable $X$ that can take values $0$ and $1$, with $P(X=1) = p$ and $P(X=0) = 1-p$, then if I draw $n$ samples ...
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 ...
15
votes
1answer
26k 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 ...
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 ...
15
votes
4answers
2k views

How to find out if an online poker-site is fair?

Last week I had an interesting discussion with a good friend of mine. He had been playing some online poker and suggested that there is a relationship between new subscription/additional money ...
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 ...
14
votes
7answers
57k views

How to assess whether a coin tossed 900 times and comes up heads 490 times is biased?

A coin is tossed 900 times and heads appeared 490 times. Does the result support the hypothesis that the coin is unbiased?
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 ...
14
votes
2answers
6k views

Why does SAS PROC GLIMMIX give me VERY different random slopes than glmer (lme4) for a binomial glmm

I am a user more familiar with R, and have been trying to estimate random slopes (selection coefficients) for about 35 individuals over 5 years for four habitat variables. The response variable is ...
14
votes
2answers
13k views

Distribution for percentage data

I have a question about the correct distribution to use for creating a model with my data. I conducted a forest inventory with 50 plots, each plot measures 20m × 50m. For each plot, I estimated the ...
13
votes
3answers
1k views

Binomial-binomial is binomial?

Let $X\mid Y\thicksim\operatorname{Binomial}(Y,p)$, and let $Y\thicksim\operatorname{Binomial}(n,q)$. I have seen it written that: Claim: $X$ is marginally $\operatorname{Binomial}(n,pq)$. There is ...
13
votes
2answers
10k views

What is the difference between logit-transformed linear regression, logistic regression, and a logistic mixed model?

Suppose I have 10 students, who each attempt to solve 20 math problems. The problems are scored correct or incorrect (in longdata) and each student's performance can be summarized by an accuracy ...
13
votes
2answers
4k views

Why does the McNemar's test use $\chi^{2}$ and not the normal distribution?

I just noticed how the non exact McNemar's test uses the $\chi^{2}$ asymptotic distribution. But since the exact test (for the two case table) relies on the binomial distribution, how come it is not ...
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 ...
13
votes
1answer
21k views

Variance in estimating p for a binomial distribution

how can I calculate the variance of p as derived from a binomial distribution? Let's say I flip n coins and get k heads. I can estimate p as k/n, but how can I calculated the variance in that estimate?...
13
votes
4answers
13k views

Estimator for a binomial distribution

How do we define an estimator for data coming from a binomial distribution? For bernoulli I can think of an estimator estimating a parameter p, but for binomial I can't see what parameters to estimate ...
13
votes
1answer
5k views

Estimating probability of success, given a reference population

Suppose you have the following situation: You observed over time 1000 bowling players, who each played a relatively small number of games (say 1 to 20). You noted the strike percentage for each of ...

1
2 3 4 5
42