How do I create a population (set of positive integers) given the size, mean and standard deviation? Like, if N = 7, mean is 50 and the standard deviation is 20, can I generate a population that fits that criteria?
Asked
Active
Viewed 60 times
1 Answers
3
If $N = 7$ and the mean $\mu = \frac{\sum x}{N} = 50$, then $\sum x = 350$.
Recall that the variance of a population (not a sample) is defined as
$$\sigma^2 = \frac{\sum(x - \mu)^2}{N} = \frac{\sum x^2}{N} - \mu^2$$
Plugging in $N = 7$, $\mu = 50$, and $\sigma = 20$ gives:
$$20^2 = \frac{\sum x^2}{7} - 50^2$$
From which we get $\sum{x^2} = 20300$.
So now the problem becomes: Find 7 numbers that sum to 350 whose squares sum to 20300.
Through computer-assisted trial-and-error, I found that $[9, 42, 52, 54, 55, 57, 81]$ is one possible all-integer solution.
Dan
- 14,978
-
1Subtracting your example from $100$ would give $91, 58, 48, 46, 45, 43, 19$ as another example, but there will be many more – Henry Jul 14 '22 at 09:27