FINDING PMF probability theory A die is tossed until first 6 occurred. Let X be Random variable that number of one in the experiment. Find the PMF of X. And E(X).
I noticed PMF of X is geometric distribution but I don't know why.
 A: The distribution of $X$ is indeed geometric, under one of the definitions of geometric distribution. 
Note that $X$ is the number of $1$s until the first $6$. In particular, for this game, anything other than $1$ or $6$ does not matter, and need not even be recorded. All that matters is $1$ or $6$. Given that anything else is irrelevant, and $1$ and $6$ are equally likely, each has probability $\frac{1}{2}$.
Thus $\Pr(X=0)=\frac{1}{2}$ (a $6$ comes before any $1$). Similarly, $\Pr(X=1)=\frac{1}{4}$ (among recorded tosses, there is a $1$ and then a $6$). In general, $\Pr(X=n)=\frac{1}{2^n}$.
Thus we have
$$E(X)=1\cdot \frac{1}{2^2}+2\cdot \frac{1}{2^3}+3\cdot\frac{1}{2^4}+\cdots.\tag{1}$$
Sums of this type have been repeatedly calculated on MSE. There are many ways to compute. One way is to note that for $|x|\lt 1$, we have
$$\frac{1}{1-x}=1+x+x^2+x^3+\cdots.$$
Differentiate. We get
$$\frac{1}{(1-x)^2}=1+2x+3x^2+\cdots.$$
Set $x=\frac{1}{2}$, and multiply through by $\frac{1}{2^2}$. We get Expression (1), which is therefore equal to $1$. We conclude that $E(X)=1$.
There are many other ways to evaluate (1). Recall that the more common geometric distribution, in which we count the number of trials until the first success, has expectation $\frac{1}{p}$, where $p$ is the probability of success on any trial. In our case, the number of $1$s and/or $6$s until the first $6$ has expectation $\frac{1}{1/2}=2$. Thus the number of failures, that is, $1$s, until the first $6$ has expectation $2-1$, that is, $1$. 
A: The geometric distribution tells you how long you need to wait in a sequence of i.i.d. Bernoulli trials (i.e. coin flips) in order to get hte first heads. Note that there are two definitions of the geometric distribution in common use - one which starts with $0$ and another which starts with $1$, so make sure you know which oen you're using. 
If $X=i$, that means the first $i-1$ trials are failures, and the $i$-th trial is a success. If we let $p$ denote the probability of success, this means the first $i-1$ trials contribute a factor of $(1-p)^{i-1}$ and the last trial (success) contributes a factor of $p$. Since they are independent trials, $P(X=i) = p (1-p)^{i-1}$. 
In this case, $p=1/6$ since a die gives a 6 with that probability.
To get $E[X]$, evaluate $E[X] = \sum_i i P(X=i) = \sum_i i p (1-p)^{i-1}$. 
