Stack Exchange Network

Stack Exchange network consists of 175 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
1answer
13 views

Normalizing two independent weights in order to produce output between 0 and 1

I have two scores, alpha and beta, ranging both between 0 and 1. I want to weight these with weight_one, weight_two in order to favour one of these scores over the other. Then, afterwards, I want to ...
7
votes
3answers
124 views

What is the $p$ in Bernoulli distribution?

In the Bayesian theory of probability, probability is our expression of knowledge about a certain thing, not a property of that thing. However, I always see people treat $p$ as a parameter that needs ...
0
votes
0answers
8 views

Can I improve an estimate of a coin-flip probability from a single trial using an imperfect oracle?

I have the following generative model: I have a unknown random variable $S\in[0,1]$ and samples $s_i \sim S$. I do not observe $s_i$ directly, but instead an imperfect oracle $q_i$, which might or ...
1
vote
1answer
26 views

Return Period and Probability

My question is simple: If I assume that the probability to be hit by a lightning strike for a person in this year was 0.5 percent would it mean that if I was able to live 200 years I would be hit by ...
4
votes
0answers
52 views

Correlated Bernoulli Trials

Suppose there are $n$ dependent Bernoulli trials, $X_{1}$,...,$X_{n}$ with $% X_{j}\in \{1,0\}$ and $\Pr (X_{j}=1)=q$ for all $j=1,...,n$. For any $% n\geqslant 2$ dependent Bernoulli trials, in the ...
0
votes
0answers
12 views

How do I update a Bernoulli prior parameter estimate after measuring additional covariates

I have a system that generates a probabilistic risk score, p0, for disease D0 from the results of an assay. The assay also generates several numeric features, f1, ..., fn, stored and available once ...
9
votes
1answer
338 views

Checking if a coin is fair

I was asked the following question by a friend. I could not help her out but I hope someone can explain it to me. I could not find any similar example.Thanks for any help and explanation. Q: Results ...
0
votes
0answers
25 views

Calculating the true error comprised of two probability distributions

Let $X$ = {0,1,2,3,4} and $Y$ = {0,1}. A probability distribution $D$ defined on $X\times Y$ such that $D_x$ = Binomial(4, 0.5) and $D_{y\mid x}$ = Bernoulli(0.5). Given the predictor: $h(x)$ = $0$ ...
0
votes
0answers
14 views

Other than linear transformations of any one Bernoulli distribution, what popular distributions only take two possible values?

I suspect that this may be a silly question, as some sort of isomorphism ought to exist between linear transformations of the Bernoulli distribution and any other distribution that can only take two ...
3
votes
2answers
80 views

What is the correct terminology for repeating groups of coin flips multiple times in a simulation?

I previously posted a question that is causing a lot of confusion because my terminology is incorrect. I decided to post this question to ensure I am starting my problem with the correct terminology. ...
1
vote
0answers
36 views

How to generate a Bernoulli distribution based on a given Bernoulli distribution? [closed]

We have a Bernoulli distribution which outputs 1 with probability C and outputs 0 with probability 1-C. C is unknown. Now we would like to generate a new Bernoulli distribution that outputs 1 with ...
1
vote
1answer
44 views

Sum of Bernoulli random variables with Gaussian noise

This relates to a question asked recently where (one of the edits of) the question asked what happens when a sum of Bernoulli random variables has some form of noise on the probability parameter. ...
1
vote
0answers
76 views

Summing Bernoulli distributions with noise [duplicate]

EDITED John is playing a game on $n$ days, each day being independent. On each day $i$, his probability of success is $p_i$. We have $\frac{1}{n} \sum_{i=1}^n p_i = p$, and typically, the standard ...
0
votes
0answers
14 views

What is the added value of a multivariate Bernoulli distribution over a multinomial distribution?

I came across the multivariate Bernoulli distribution of Dai, Ding & Wahba (2013) that has the following form (in the bivariate case): $P(X_1,X_2)=p_{11}^{x_1 x_2} p_{10}^{x_1 (1-x_2)} p_{01}^{(1-...
1
vote
0answers
16 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
67 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
49 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
81 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
42 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
31 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
97 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
24 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
101 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
78 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
24 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
91 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 ...
3
votes
2answers
127 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....
5
votes
2answers
78 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
302 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
38 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
68 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
40 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
72 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
37 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
46 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
176 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
855 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
72 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
246 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
31 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
45 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
79 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
105 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
82 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
99 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
56 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 ...