Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [bernoulli-distribution]

The Bernoulli distribution is a discrete distribution parametrized by a single "success" probability. It is a special case of the binomial distribution.

1
vote
0answers
8 views

How do we perform residual analysis on binomial model with small counts?

I know that both Pearson and Deviance residuals tend to be approximately normal for Poisson and Binomial model with large counts when standardized, so we can exploit that to perform the residual ...
0
votes
0answers
17 views

Evaluating goodness of fit for Bernoulli glm

I am trying to fit a model estimating the success probability of the Bernoulli distributed random variable with the logistic link function. However, I am stuck with testing the goodness of fit of my ...
2
votes
1answer
40 views

Two approaches for finding a MLE in a binomial setting

I'm learning towards an exam in mathematical statistics and I came across the following question. I was wondering if the second approach of solving the question is legitimate. If both are correct, is ...
0
votes
0answers
41 views

Bernoulli distributed random variables - Change point Detection

I am looking for change point detector model for my Bernoulli random variable. I built my simple detector, the absolute difference between stander deviation of of all transaction history stored, and ...
1
vote
1answer
38 views

Specifying frequency parameter in the absence of occurrences

Let's say I have a process where the occurrences are independent, proportional to time. I made $n$ observations for which I only observed no occurrences. My goal is to define a frequency parameter and ...
1
vote
1answer
26 views

I want to simulate a random sample of length n from DAG of correlated Bernoulli's

Suppose I have a DAG of 4 vertices. Each vertex consists of a Bernoulli of parameter $p$. It is the following: (Z) ---> (Y) (Z) ---> (W) (X) ---> (Y) ---> (W) I hope it is clear. Anyway, I ...
2
votes
1answer
58 views

CDF and MGF of a Sum of a discrete and continuous random variable

I am currently dealing with the following exercise: Given the random variables $X \sim Be(p), Y \sim Exp(\lambda)$, and assume they are independent. Set $Z:= X + Y$. Compute the Moment Generating ...
0
votes
1answer
23 views

Bernoulli distribution/ SOME probability/conjugate prior

I would like to know what "SOME probability of seeing tail" means in the second answer here. I.e. how much is it? EDIT: I do not understand how can I see that there is SOME probability of seeing Tail ...
1
vote
1answer
64 views

The distribution of the product of a Bernoulli & an exponential random variable

Let $X$ be an exponential random variable $f(x) = c e^{-c x} \text{ if }x > 0; 0 \text{ otherwise.}$ Let $Z$ be a Bernoulli RV with $Pr(Z=1)=0.45$ and $Pr(Z=0)=0.55$. $X$ and $Z$ are independent. ...
3
votes
2answers
60 views

Can a Bernoulli distribution be approximated by a Normal distribution?

$$\sum_{i=1}^n bernoulli(p) = binomial(n,p) \approx \mathcal N(np, np(1-p)) = \sum_{i=1}^n \mathcal N(p, p(1-p))$$ Can I conclude that $\mathcal N(p, p(1-p))$ could represent an approximation of $...
0
votes
0answers
20 views

Why is my version of naive bayes not working as well as the one from sklearn?

I've implemented my own version of the bernoulli naive bayes algorithm. However, its performance is not as good as the sklearn version. Could anyone explain how I can improve my code? ...
1
vote
2answers
82 views

Prove that the sum and the absolute difference of 2 Bernoulli(0.5) random variables are not independent

Let $X$ and $Y$ be independent $Bernoulli(0.5)$ random variables. Let $W = X + Y$ and $T = |X - Y|$. Show that $W$ and $T$ are not independent. I know that I have to show that $P(W, T)$ is not equal ...
0
votes
0answers
12 views

Find joint distribution for two different cases Kruskal Wallis

I'm a bit stuck with my homework in a subject called "Non-parametric Statistics". The task is related to Kruskal-Wallis test. The task is as follows: Let's look at the comparison of 3 independent ...
-1
votes
0answers
28 views

Relation between Expectations of sum of Bernoulli variables

Let $X_1, ... X_n$ and $X_1^+, ... X_n^+$ be two finite sequences of non-independent, non identically distributed Bernoulli variables such that $E[X_i^+] \geq E[X_i]$. If we define $S = \sum_{i =1}^n ...
3
votes
2answers
107 views

Bayesian inference - iterative updating with Bernoulli distribution (solved)

Suppose I pull samples from a Bernoulli distribution $\mathcal{B}(\theta)$ I don't know the value of $\theta$, but in my case I know that $\theta$ can only have 11 discrete values, $\theta \in \{0....
0
votes
0answers
16 views

Likelihood Ratio Given Conditionals

For each person, I have at least one report indicating whether they have a disease or not. I have the actual disease status of a decent chunk of this population, and I'd like to be able to predict ...
3
votes
1answer
47 views

Finding MLE of $p$ where $X_1\sim\text{Bernoulli}(p)$ and $X_2\sim\text{Bernoulli}(3p)$

Let $X_1\sim\text{Bernoulli}(p)$ and $X_2\sim\text{Bernoulli}(3p)$ be independent Bernoulli random variables where $p\in[0,1/3]$. Derive the MLE of $p$. We have that $$L(p\mid \vec{x})=p^{x_1}(1-...
1
vote
0answers
12 views

Does mixture of sigmoids make sense given the theories about mixture of bernoullis?

Mixture of bernoullis is the combination of bernoulli distributions, which can be illustrated by the sampling process of K bags of D coins, here is a quick tutorial about it https://cedar.buffalo.edu/~...
0
votes
1answer
122 views

Maximum likelihood estimator for Bernoulli parameter based on standard normal

$X_i \sim Normal(\psi,1), \ \ i = 1, ..., n$ $Y_i = 1$ if $X_i \ge 0.$ $Y_i = 0$ if $X_i < 0.$ Let $\theta = P(Y_i = 1)$. What is the MLE of $\theta$? I know how to find the MLE of a Bernoulli ...
1
vote
1answer
34 views

Bernoulli / binomial trials for a process with variable probability of success

One of the conditions for a Bernoulli trial (and by extension binomial proportion confidence intervals) is that the probability of success is the same every time the experiment is conducted. In the ...
0
votes
0answers
59 views

Comparing 2 Bayesian Models with different structure

I'm a bit new to Bayesian statistics so please bear with me if this question is trivial. Let's say I have $100$ observations for $2$ Bernoulli variables $X$ and $Y$. I notice that they have the ...
0
votes
2answers
49 views

Detecting change in p of a Bernoulli process

A machine outputs either a 0 or a 1 each second. We denote this output at time $t$ as $b_t$. The probability that it outputs 1 is $p_t$ at time $t$. How do we go about studying the change in $p_t$ in $...
2
votes
0answers
31 views

Tutorial question on min number of sample size for confidence interval

I'm stuck with this question from my tutorial (and there is no worked solution), and I can't seem to get the correct answer of 411. There were 904 new Subway Restaurants franchises opened during 2002....
0
votes
1answer
44 views

Joint Posterior Distribution

I have 4 groups, each has a probability of developing gout (Bernoulli distribution), with a total of 400 individuals. I am confused how to derive and present the joint posterior distribution for each ...
0
votes
1answer
35 views

10 Trials: Each with 2% Success Rate, what is the Probability One of the Trials will be successful?

I'm looking for chance of success when within a number of trials with each trial having success rate x I learned that formula in highschool stats but I've since forgotten it. Oh what a fool am I! My ...
2
votes
0answers
37 views

How can we model a continuous coin tossing system to predict next tossing result and having a variable bias in the coin [duplicate]

Let's assume we have an unfair coin and a machine that toss it continuously. We counted the number of tandem heads. Whenever it's head we count 1, if it's head again, counter goes to two and so on. ...
0
votes
0answers
85 views

Simulating Bernoulli sample mean confidence interval in python

I'm working through exercises in my statistics textbook, and I'm getting a result I don't understand that I don't know if it's a programming problem or an understanding statistics problem. I'm trying ...
8
votes
2answers
800 views

With what probability one coin is better than the other?

Let's say we have two biased coins C1 and C2 both having different probability of turning head. We toss ...
1
vote
0answers
53 views

Detecting outliers in binary data using Mahalanobis distance

I have a binary vector $X_i$, $i=1...N$ of independent Bernoulli variables with parameters $p_i, \mu_i = p_i, \sigma_i^2 = p_i(1-p_i)$ (which is known) and I'm looking for some sort of tail bound to ...
4
votes
1answer
173 views

What is the distribution of a sum of identically distributed Bernoulli random varibles if each pair has the same correlation?

What is the distribution of a sum of $n$ Bernoulli random variables, each having success probability $p$, where each pair is correlated with correlation coefficient $\rho$? $$Y = \sum_{i=1}^n X_i$$ $$...
1
vote
0answers
28 views

Goodness of fit test for observed samples of binary strings

Consider a process that produces binary strings of varying length $n$. A typical sample would include $n\ $ I Number of strings $1\ $ I $\ 3,000,000$ $2\ $ I $\ 800,000$ $3\ $ I $\ 350,...
0
votes
0answers
38 views

Sum of independent binomially distributed variables (with different p's)?

The sum of independent variables each following binomial distributions $B(N_i,p_i)$ is also binomial if all $p_i = p$ are equal (in this case the sum follows $B(\sum_i N_i, p)$. If the $p_i$ are ...
5
votes
1answer
76 views

Upper bound for the probability $P\left[\left|\frac{Y_n}{n}-p^2\right|>\varepsilon\right]$

Let $X_1,X_2,\cdots,X_{n+1}$ be independent random variables with $$P(X_i=1)=p=1-P(X_i=0)\quad\text{ for all }i$$ Define $Y_i$ to be the number of $i$'s such that $X_i=X_{i+1}=1\,,\quad i=1,2,\...
1
vote
2answers
85 views

Tossing coin and classical ML estimate

I'm reading Bishop's Pattern recognition and came across with the next on the p.23: Suppose, for instance, that a fair-looking coin is tossed three times and lands heads each time. A classical ...
2
votes
1answer
69 views

Verification of sufficiency of a linear combination of the sample $(X_i)_{i\ge1}$ where $X_i\stackrel{\text{i.i.d}}\sim\text{Ber}(\theta)$

This question is in regards to this post where it asks if a certain statistic is sufficient for the parameter or not. My query is specifically with this problem: Let $X_1,X_2,X_3$ be i.i.d ...
0
votes
1answer
80 views

Difference between Empirical distribution and Bernoulli distribution

I've been studying binary cross entropy error for binary classification weight optimization. From my knowledge, Cross entropy itself quantifies divergence between two probability distributions with ...
0
votes
1answer
35 views

Monte Carlo simulation--Have I applied Bernoulli distribution properly? [closed]

I am trying to run a monte carlo simulation and I just wanted to make sure that I set it up properly. A salesman visits 100 different homes. Someone answers the door 80% of the time. Of that ...
0
votes
2answers
28 views

Why the variance of a proportion using multiple survey questions is the same as the proportion of only one survey question?

I am measuring the proportion of a sample that gets all successes in 10 different questions of a survey. For example, one question is "Do you smoke?" and a success for me is "No". Another question ...
5
votes
0answers
26 views

Is average stopping time a continuous function of Bernoulli parameter?

Consider an infinite sequence $X = (X_i)_{i \in \mathbb N}$ of i.i.d Bernoulli random variables with (unknown) parameter $p \in (0,1)$, and let $N$ be a stopping time on $X$. Is it always the case ...
4
votes
2answers
233 views

Can Bernoulli random variables be used to approximate more than just the normal distribution?

Most statistics students are familiar with the normal approximation of the binomial distribution. And since binomial distributions are created from sums of Bernoulli random variables, it would follow ...
0
votes
0answers
43 views

Two Bernoulli distribution (test hypothesis of p of biased coins from a sample)

I'm simplifying a research question that I have at work. Assuming I have 2 coins each with a different probability of head, let's call heads a success (p). Those ...
2
votes
2answers
86 views

Why is this a Bernoulli distribution?

In the paper I am reading, I come across $$ q(s) \propto \left( \frac{b}{c} \right)^{s}\quad s=\{0,1\}, \quad(1) $$ and the author says this is a Bernoulli distribution. ($b>0$ and $c>0$) I ...
2
votes
0answers
34 views

Better skill test for RPGs - Conditional probability given 2 independent parameters

I am trying to find a better way (theoretically, not practically speaking) to roll the dice for a skill test in RPGs. In the d20 system, the Game Master choose a Difficulty Level for the skill test, ...
0
votes
1answer
77 views

dbinom for Bernoulli trials

I have this question: "There are a 100 families each with 5 children. Given that the null probability of having a boy is $p=0.5$, what is the probability of a family having 0,1,2,3,4,5 boys" We have ...
0
votes
0answers
62 views

Convert exponential to Bernoulli

If I have a binary variable x, with distribution p(x) = exp{Cx}, how do I put this into the canonical Bernoulli form so as to get the probability p that x=1 that I ...
1
vote
0answers
21 views

power calculation for two stage binomial type model

This is a power-type calculation for a Bernoulli/binomial question in two stages. Suppose you are planning an experiment which starts with a test for an event on $N$ experimental units. The event ...
2
votes
1answer
105 views

Entropy of the beta-binomial compound distribution

I have a generative process as follows: $$ x \mid \alpha \sim \textsf{Beta}\left (\alpha,\beta \right) \\ y \mid x \sim \textsf{Bernoulli}(x). $$ How does one go about calculating the Entropy of ...
1
vote
0answers
93 views

Clarification: Bernoulli random variable with uniform distribution

Let $Z$ be a random variable which takes the value 1 when $U \le \frac 14$, $0$ otherwise, where $U$ ~ $\text{Uniform}(0,1)$. So $Z$ is a Bernoulli random variable with PMF $$p_Z(z) = \begin{cases} p,...
1
vote
2answers
255 views

Show that Bernoulli has Poisson distribution with $p\lambda$ if $\xi=k$

I have the following problem set at hand: The random variable $\xi$ has Poisson distribution with the parameter $\lambda$. If $\xi=k$ we perform $k$ Bernoulli trials with the probability of success $...