[Math] Expected value of n trials where probability of an event occuring is 1/n

probabilitystatistics

Say the probability of an event occurring is 1/1000, and there are 1000 trials.

What's the expected number of events that occur?

I got to an answer in a quick script by doing the above 100,000 times and averaging the results. I got 0.99895, which seems like it makes sense. How would I use math to get right to this answer? The only thing I can think of to calculate is the probability that an event never occurs, which would be 0.999^1000, but I am stuck there.

Best Answer

Give the trials the numbers $1,2,\dots,1000$.

Let $X_i$ take value $1$ if the event is occurring at the $i$-th trial and value $0$ otherwise.

$$X:=X_1+\cdots+X_{1000}$$ is the number of events that occur. This with:

$$\mathbb E(X_i)=1\times P(X_i=1)+0\times P(X_i=0)=1\times\frac{1}{1000}+0\times\frac{999}{1000}=\frac{1}{1000}$$ for each $i\in\{1,\dots.1000\}$ and:$$\mathbb E(X)=\mathbb E(X_1+\cdots+X_{1000})=\mathbb E(X_1)+\cdots+\mathbb E(X_{1000})=\frac{1}{1000}+\cdots+\frac{1}{1000}=1$$