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.

0
votes
0answers
12 views

Bernoulli essays r [on hold]

Consider a fair coin. Let $H_n=0$ if you observe tail and $H_n=1$ is you observe face. Then $P(H_n=0)=P(H_n=1)=\frac 12$. The distribution of $S_n=H_1+\cdots+H_n$ is binomial with parameters $n$ and $...
0
votes
1answer
55 views

How to prove or disprove that $T(X_{1},X_{2}) = X_{1} + X_{2}$ is a sufficient statistic

Let $X_{1},X_{2},\ldots,X_{n}$ be random sample from a population whose distribution is given by $X\sim\text{Bernoulli}(\theta)$, $0 < \theta < 1$. a. Show that $T(x) = \displaystyle\sum_{i=1}^{...
0
votes
0answers
21 views

Bernoulli equivalent to the covariance matrix

I'm looking for a parametric model for the density of binary variables. Say, a few hundred. For continous variables I there is the Gaussian model. I can estimate mean and covariance matrix from data. ...
0
votes
0answers
13 views

Binary models with the regressor that has Bernouli distribution [closed]

I have a binary dependent variable, but my regrerssor also has Bernouli distribution. Will logit still give a consistent estimator in this case? How can I estimate? Is that right? model: y=b1+b2*x b1=...
0
votes
0answers
36 views

Bernouilli variables - bias and variance of estimator

Reading through this I work on Example 1 in 3. Consistency. $X_{1},... , X_{n} ∼ Bernoulli(p)$. The mle $\hat{p}$ has bias 0 and variance $p(1−p)/n \rightarrow 0$. Here $\hat{p} = \sum_{i} Xi/n$. ...
0
votes
0answers
33 views

Hypothesis testing on a Bernouilli variable

I have a Bernouilli variable which is $1$ with probability $p$. I need to test the hypothesis $H_0:p<\theta$ vs. $H_1:p>\theta$, where $\theta$ is a given constant. The question is to find $n$ ...
2
votes
3answers
76 views

How to infer the parameter $p = f(n)$ of different Bernoulli distributions $X_{n}$?

I have a dataset corresponding to the results of independant Bernoulli trials. Each trial is associated to a number $n \in ]1;+\infty[$ and follows a Bernoulli distribution with parameter $p=f(n)=b + ...
0
votes
0answers
22 views

Uber's Pyro less accurate than expected on toy example

Trying to understand the pyro example here: https://pyro.ai/examples/svi_part_i.html which starts with a Beta(10,10) prior, adds 10 Bernoulli likelihood datapoints with a 6,4 split. The analytic ...
0
votes
1answer
24 views

Good Estimates of the Square of Bernoulli Probability of Success?

I am trying to understand the metrics of a good estimator. For example, the Bernoulli probability of success takes the parameter p. But for X1...Xn iid Ber(p^2) how would you estimate the p^2. How ...
5
votes
1answer
250 views

Why no variance term in Bayesian logistic regression?

I've read here that ... (Bayesian linear regression) is most similar to Bayesian inference in logistic regression, but in some ways logistic regression is even simpler, because there is no ...
1
vote
1answer
17 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
138 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
9 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
60 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
13 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
450 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
32 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$ ...
3
votes
2answers
82 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
38 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 ...
2
votes
1answer
141 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
80 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
1answer
22 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
17 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
125 views

Evaluating goodness of fit for Bernoulli glm [duplicate]

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
53 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
100 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
32 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
167 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
183 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
107 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
26 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
104 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
164 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
88 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
14 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
372 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
54 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
2answers
82 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
41 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
105 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
56 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
208 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
876 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
79 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 ...