4
$\begingroup$

Suppose age is normally distributed with mean 20 and standard deviation 5. How do you ensure that you get only positive values when you sample age from this distribution?

I am trying to impute missing data. I am assuming that it is MAR (missing at random) since the missingness depends on gender. The missing ages come from both males and females. Thus I am sampling from two normal distributions (one for males and one for females).

$\endgroup$
4
  • $\begingroup$ Are you asking about generating (simulating) such data w/ some software? Obviously, if you take a sample of people w/ mean 20 & SD 5 you won't get anyone w/ a negative age. $\endgroup$ Commented Jul 12, 2014 at 3:26
  • $\begingroup$ @gung: yes with software. $\endgroup$
    – svmguy
    Commented Jul 12, 2014 at 3:28
  • $\begingroup$ I thought so ;-). Can you say a little more about what you're doing? What software are you using? $\endgroup$ Commented Jul 12, 2014 at 3:30
  • 1
    $\begingroup$ @gung: I am using SAS and trying to impute missing ages with data sampled from a normal distribution (i.e. int(rand('NORMAL',41.25,12.02))). $\endgroup$
    – svmguy
    Commented Jul 12, 2014 at 3:33

1 Answer 1

2
$\begingroup$

I cannot suppose age to be normal, since age can only be positive, while normal distributions are on the range $-\infty$ to $\infty$.

Since 41.25 is only 3.43 standard deviations (12.02) from 0, you will get some negatives by supposing it to be actually normal.

If you simply want some set of random numbers with mean 41.25 and standard deviation 12.02 that looks vaguely normalish, you might consider generating a gamma random variable.

Here's a histogram of a sample of 100000 ages from a gamma distribution with mean 41.25 and standard deviation 12.02:

enter image description here

The smallest age generated was about 7, while the largest was 110.

If you want a strict upper limit as well as lower limit, you might consider using a beta distribution.

It looks like in SAS you could do it something like this:

x = beta*RAND('GAMMA',alpha)

Where the shape parameter alpha can be set to $(\frac{\text{mean}}{\text{sd}})^2$ and the scale parameter beta can be set to $\frac{\text{sd}^2}{\text{mean}}$.

$\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.