# create an example of i.i.d Bernoulli random variable

i need to create an example of identically distributed, but dependent Bernoulli random variables where $$x_1,x_2....x_n$$ i.e $$x\in{0,1}$$ such that, $$P\big(|\mu-\frac{1}{n}\sum_{i=1}^{n}x_i|\geq \frac{1}{2}\big)=1$$

where $$\mu=E[x_i]$$,

The example should show that independence is crucial for convergence of mean to the expected values. i.e $$\mu=E[x_i]$$

im a non mathematics student struglling a bit with understanding the concept.i was wondering how $$\mu$$ equals $$E[x_i]$$ and its relation to independence. a short explanation will really help.

• So, did any of the two answers help you figure it out? – Clement C. Dec 3 '19 at 19:07

Take $$(x_1,...,x_n)$$ such that $$x_1$$ is a Bernoulli r.v. with parameter $$1/2$$, and $$x_1=x_2=\dots=x_n$$ a.s. Then $$\mu=1/2$$, but $$\frac{1}{n}\sum_{i=1}^n x_i = x_1\in\{0,1\}$$ so $$\left\lvert \mu - \frac{1}{n}\sum_{i=1}^n x_i \right\rvert = 1/2$$ a.s.
• im a non mathematics student struglling a bit with understanding the concept.i was wondering how $\mu$ equals $E[x_i]$ and its relation to independence. a short explanation will really help. – Balash Dec 9 '19 at 1:57
• @Balash $\mu= \mathbb{E}[x_i]$ by definition. Since each $x_i$ is Bernoulli with parameter $1/2$, $\mathbb{E}[x_i] = 0\cdot 1/2 + 1\cdot 1/2 = 1/2$. Independence (or lack therefore) doesn't change the expectation of each fixed $x_i$. What it changes is stuff like the covariance of $x_i$ and $x_j$, for instance. – Clement C. Dec 9 '19 at 2:24
Let $$x_1$$ be chosen at random (with $$\mu=0.5$$) and $$x_{k+1}=1-x_k$$ for all other $$k$$. These are obviously dependent and satisfy the condition on $$P$$.