Title: RE: Ho To Generate Sample With Given Mean and SD

First compute a random sample of any distribution type you like and label the variable X.

Second compute mean of X (Xbar) and Standard deviation of X (SDx).

Then compute Y = X / SDx + Mu - (Xbar*Sigma/SDx).

Y will have a mean of Mu and a standard deviation of Sigma and the same distribution type as X.

As for skewness and kurtosis, I have not played with them, but reversing the Expected Value computations may well give those values also.

Howard
------------------------------------------------------------
| Howard S. Kaplon          | Mathematics Department        |
|
Phone: 410-704-3087       | Towson University             |
|
   FAX: 410-704-4149       | 8000 York Road                |
|
                           | Towson, Maryland  21252       |
|
                           | United States of America      |
|
                                                           |
|
  E-mail: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>   |

------------------------------------------------------------



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 02, 2003 2:55 AM
To: [EMAIL PROTECTED]
Subject: Ho To Generate Sample With Given Mean and SD


Hi All

Is it possible to generate a sample that has a specific mean, SD (also
skewness, kurtosis)?
To be more specific, I do not want to sample from a given distribution
(like the normal distribution) that has a specific mean and SD. If
sampled from a normal distribution with a given mean and SD, of course
the mean of the sample is not the exact same as the mean of the normal
distribution.
I try to get a sample that has a previously given mean and SD (and also
if possible skewness and kurtosis).

Does anybody know the mathematical approach to this question? And, does
anybody know a software package that does this perhaps, or an algorithm
to use to program my own thing? Some vague things, like moments, are in
my head but that is perhaps not the correct path. Others asked,
expressed it this way: Sampling from a normal distribution with
restriction (restriction that the mean is exactly the given mean).

Thanks Toby




mean = (sum xi) / N

variance = (sum (xi - mu) ^ 2) / N

skewness = (sum (xi - mu) ^ 3) / (N sdev ^ 3)

kurtosis = (sum (xi - mu) ^ 4) / (N sdev ^ 4)
.
.
=================================================================
Instructions for joining and leaving this list, remarks about the
problem of INAPPROPRIATE MESSAGES, and archives are available at:
.                  http://jse.stat.ncsu.edu/                    .
=================================================================

Reply via email to