0
$\begingroup$

If the outcome of a data generating process is always a 0 or 1, is the variance of the sample npq? Or is this variance formula only applicable when the data generating process is as simple as 'draws from a binomial distribution?

For example, let's say I have a process that draws two random numbers between 0 and 1. If the first number is > 0.5 and the second random number is < 0.1, then the outcome is a 1, otherwise, it's a 0. So p = 0.05 and q = 0.95, so for n = 100, sample variance = 4.75.

Is 4.75 the sample variance, or does the data generating process that creates the 0s and 1s influence the sample variance?

$\endgroup$
2
  • $\begingroup$ Imagine this was true. Then you would have a standard deviation larger than two, even though you only have values 0 and 1. And with n being a million, you would get a variance of 47500 ... $\endgroup$
    – frank
    Commented Mar 24, 2022 at 8:40
  • $\begingroup$ Oh, you made me realize I asked the wrong question. What I meant to ask was about averaging the 1s and 0s, and then what is the sample variance of that average! $\endgroup$
    – Caleb
    Commented Mar 24, 2022 at 14:28

1 Answer 1

1
$\begingroup$

Your results would work only if you were to sum all the outcomes of 100 different experiments, then it would be a binomial distribution. However, if you do not sum the outcomes and treat each experiment separately, so that in the end you have count data for all the zero's and one's, then that is a Bernoulli distribution.

The variance of a Bernoulli distribution is $Var(X)=p(1-p)$. In your specific case $p=0.5 \cdot 0.1=0.05$, and so the variance is $0.05 \cdot 0.95=0.0475$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.