Questions tagged [binomial]

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
42
votes
2answers
19k 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$: $\...
50
votes
8answers
12k 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 ...
36
votes
2answers
10k 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$?
38
votes
9answers
8k 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 $\...
36
votes
2answers
83k 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 ...
35
votes
6answers
68k 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 ...
30
votes
4answers
26k 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 ...
34
votes
5answers
19k 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 ...
6
votes
2answers
2k 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 ...
13
votes
5answers
8k 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 ...
8
votes
1answer
934 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 ...
7
votes
2answers
1k 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} $$ ...
25
votes
5answers
23k 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 ...
17
votes
4answers
20k 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 ...
12
votes
1answer
2k 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 ...
30
votes
6answers
12k 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 ...
8
votes
1answer
14k 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 ...
4
votes
2answers
3k 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 ...
29
votes
2answers
31k 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 ...
15
votes
1answer
1k 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 ...
32
votes
2answers
14k 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. ...
22
votes
4answers
29k 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 ...
23
votes
2answers
2k 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 ...
18
votes
4answers
17k 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 ...
11
votes
2answers
8k 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 ...
5
votes
2answers
564 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-π) ...
25
votes
4answers
64k 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 ...
20
votes
1answer
3k 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 R and it produces some ...
32
votes
4answers
29k 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: ...
11
votes
1answer
16k 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 ...
5
votes
2answers
7k 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: http://www.ats.ucla.edu/stat/stata/faq/proportion.htm The IV is the proportion of students receiving free or reduced priced ...
6
votes
2answers
974 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) ...
5
votes
4answers
17k 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} $$...
4
votes
2answers
260 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 ...
3
votes
1answer
256 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}$, ...
42
votes
4answers
72k 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 ...
11
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 ...
4
votes
2answers
1k views

Not sure if standard error of p-values makes sense in Fisher Exact Test

I am working on implementing a Fisher Exact Test for some unemployment and wage data. The idea is to describe two populations (one receiving an assistance program (the "treatment") and one not ...
2
votes
1answer
127 views

Distribution of $n\choose x$

If $X$ follows a Binomial distribution with parameters $n$ and $p$, what can we say on the distribution of $n\choose x$ and $x\choose n$ ? ($x$ is realization of $X$).
5
votes
4answers
4k views

Disagreement between the p-value and the confidence interval in a binomial test

This is a question regarding the binomial test in R. What happens if I get a p-value < 0.05, which would generally cause me to reject the null hypothesis that the population value is equal to a ...
5
votes
2answers
595 views

Probability enemy territory captured in X turns

I am playing Warlight online (something like Risk), and my goal is to create a bot which plays against other bots. ...
3
votes
2answers
2k views

Distribution of number of Bernoulli trials to a given number of successes

Suppose you have a series of n trials, where the probability of success in each trial is p. The distribution of the number of successful trials follows a Binomial distribution with parameters (n, p)....
7
votes
1answer
405 views

Estimating $n$ and $p$ for Binomial distribution, repeated counting of partly hidden population

A brief motivation: $n$ critters live in an aquarium, where sadly they often hide in, under or behind things. When the aquarium is observed, each critter is only seen with probability $p$ (...
12
votes
2answers
5k 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 ...
5
votes
2answers
784 views

Sorting answers, given overvotes and undervotes

At many question-and-answer sites, like StackExchange, people can upvote or downvote each answer. These sites also typically try to use the votes to sort answers, so the answers that are most likely ...
8
votes
1answer
3k views

Test if two samples of binomial distributions comply with the same p

Suppose, I have done: $n_1$ independent trials with an unknown success rate $p_1$ and observed $k_1$ successes. $n_2$ independent trials with an unknown success rate $p_2$ and observed $k_2$ ...
35
votes
11answers
7k 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 ...
5
votes
2answers
3k views

Interaction suppresses the main effect? How to interpret it?

I have a simple model without interaction and it stated significant effect for all the explanatory variables (continuous variable rok and categorical variables obdobi (levels hn and nehn) and kraj: <...
11
votes
6answers
834 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 ...
7
votes
1answer
1k views

Taking into account the uncertainty of p when estimating the mean of a binomial distribution

I have a binomial distribution with parameters $N$ and $p$, and the estimate for the mean of my distribution is N$\times p$. The values of $N$ and $p$ are such that we can use the Gaussian ...