# Comparison between the calculated average value and the probability q of a Bernoulli random variable

I'm using the R language to generate a sample of 32000 independent values ​​Bernoulli (q) with q = 0.1 to construct a dot plot with the respective averages calculated using the first N values ​​of the sample with N = 2, 3, ..., 32000. Is it a coincidence that the average for N max (32000) is very close to the value "q" of probability? have any statistical explanation?. closer to q. Do you have anything to do with expectation of a random variable that follows a Bernoulli-type distribution is equal to q?

-
Honestly I have nothing "to do with that fact that expectation of a random variable that follows a Bernoulli-type distribution is equal to q. :) –  user21436 Jan 29 '12 at 4:48
You're right, I read a bit more and has to do with the Law of large numbers –  franvergara66 Jan 29 '12 at 5:15
I think that was a humourous remark referring to the fact that your last sentence appears to ask whether the reader has anything to do with this. –  joriki Jan 29 '12 at 6:20
Your own comment seems to indicate that the averages you refer to in the question are averages of the sampled values themselves. Indeed we expect these to tend towards the expectation value according to the law of large numbers. Could you please clarify which part of your question remains unanswered after that comment? If none does, please either answer the question and accept your answer, or delete the question. –  joriki Jan 29 '12 at 6:27
@joriki You were right in pointing out my humour! –  user21436 Jan 29 '12 at 6:56