# Tag Info

## Hot answers tagged binomial-distribution

8

Your questions are already answered in several threads on the site, so I'll provide links to detailed explanations: There is no factor(color)1 because the categorical variable is dummy coded, so one of the categories is always dropped. Your second question is answered in Interpreting Residual and Null Deviance in GLM R. AIC stands for Akaike Information ...

7

Q1: In sector 'Coefficients:' there is no 'factor(color)1' but others. Why? Because it is included in the intercept. It's similar to a situation where you have a continuous variable - the intercept is the expected value when the variable is zero. With categorical variables we call the level which is included in the intercept the "reference level" ...

6

I completely concur with Sycorax's comment that Adrian Raftery's 1988 Biometrika paper is the canon on this topic. How to derive analytically the negative log-likelihood (and its first-order conditions)? The likelihood is the same whether or not $n$ is unknown: $$L(n|y_1,\ldots,y_I)=\prod_{i=1}^I {n \choose y_i}p^{y_i}(1-p)^{n-y_i} \propto \dfrac{(n!)^I(1-... 4 Let's begin with a general formulation of your problem. You contemplate taking a sample of a population in some way. A sample of size n will yield two counts: the number of A's and the number of B's. Let X_n represent the count of A's, so that n-X_n is the count of B's. When the sample is random, X_n will be a random variable. The event of ... 4 My favourite way to prove this is to use the equality$$2\mathrm{cov}[A,B]=\mathrm{var}[A+B]-\mathrm{var}[A]-\mathrm{var}[B]$$X_i+X_j is Binomial(n,p_1+p_2), so$$2\mathrm{cov}[X_i,X_j]=n(p_1+p_2)(1-p_1-p_2)-np_1(1-p_1)-np_2(1-p_2)$$and most of that just cancels to give the answer 3 The distribution for \theta conditional on s (and n) is \begin{equation} p(\theta|s) = \textsf{Beta}(\theta|s+1,n-s+1) . \end{equation} The problem is that we don't observe s. Instead we are given \pi = (\pi_1, \ldots, \pi_n), where \begin{equation} p(x_i|\pi_i) = \textsf{Bernoulli}(x_i|\pi_i) \end{equation} and \begin{equation} p(x|\pi) = \... 2 The posterior on N is in the first case$$\pi(N|y)\propto \pi_N(N) \frac{N!}{(N-y)!} (1-p)^y\tag{1}$$and in the second case$$\pi(N|y_1,y_2) \propto \sum_{N_1=1}^{N-1} \frac{N_1!}{(N_1-y_1)!} \frac{(N-N_1)!}{(N-N_1-y_2)!} (1-p)^y\pi_{N_1,N_2}(N_1,N-N_1)\tag{2}$$Since$$\pi_N(N) = \sum_{N_1=1}^{N-1} \pi_{N_1,N_2}(N_1,N-N_1) there is no reason to believe ...

2

Logistic regression in effect estimates the probability of an event happening based of the values of the independent variables, or more precisely the log-odds, a monotonic function of the probability. Your observations are essentially cases of the event happening or not: if there is one possibility being observed for that combination of values of the ...

2

A model is a mathematical description of a problem. In statistics this description is made in terms of probability distributions, random variables, and their functions, but there are also mathematical models outside of statistics that aren’t concerned about random variables. For example, in case of linear regression, we describe the relation between ...

1

Suppose one of your randomly chosen sub-samples had $x_1 = 2$ successes in $n_1 = 50$ trials and the other had $x_2 = 10$ successes in $n_2 = 100$ trials. A chi-squared test on a $2\times 2$ contingency table of successes and failures in the two samples would be a traditional approach to compare the two proportions of successes, but your counts are too small ...

1

We can use profiling to make our lives easier here: the idea is that maybe we can't easily solve for $\max_{n,\theta} L(n, \theta \mid y)$ but for each particular $n$ we can find the $\theta$ that maximizes $L$, and then we can optimize that over $n$. So let $L(n, \theta \mid y) = {n\choose y} \theta^y(1-\theta)^{n-y}$ be the likleihood that we're looking to ...

1

Comment. Yes. However, you'd have to be really careful how you used this criterion of getting five Tails in a row to declare a coin as biased. (More-straightforward tests look at the overall balance between Heads and Tails.) In the experiment below, I simulated 1000 tosses of a fair coin. The longest run of Tails in those 1000 tosses was of length 8. The R ...

1

If you toss $m$ coins then the number of heads follows a $X_i\sim B(1, \pi_i)$ distribution. Therefore the test statistics $X=\sum_{i=1}^m X_i$ follows a Poisson binomial distribution. If $p_0=\sum_{i=1}^m p_i$ and $\pi$ is the true sum of probabilities then you could test $H_0: \pi\leq p_0$ vs. $H_1: \pi>p_0$ (underestimation case). There are efficient ...

1

In general, a binomial test or the binom.test function is a good choice. It will answer the question, whether a thriller movie is going to be chosen more often then the given mix of other movies (action, romance, drama, comedy, horror). Let's say people like action movies most and thriller movies second best. With this approach you might find that thriller ...

Only top voted, non community-wiki answers of a minimum length are eligible