On Fri, 29 Apr 2011, Giovanni Petris wrote:

Well, but the original poster also refers to 0.2 and 0.8 as "expected min and max", in which case we are back to a joke...

Well, he is a lot better with English than I am with Mandarin. He seemed to like the truncated normal answers, so we'll let those be his answers.

It is possible to choose parameters for a normal distribution with 500 observations such that the expected value of the maximum is .8 and the expected value of the minimum is .2. Obviously, the mean would be .5, not 1, but what would the variance then have to be to provide the correct expected max and min? That's another legitimate question.

Mike


-----Original Message-----
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On 
Behalf Of Mao Jianfeng
Sent: Thursday, April 28, 2011 12:02 PM
To: r-help@r-project.org
Subject: [R] how to generate a normal distribution with mean=1, min=0.2, max=0.8

Dear all,

This is a simple probability problem. I want to know, How to generate a normal distribution with mean=1, min=0.2 and max=0.8?

I know how the generate a normal distribution of mean = 1 and sd = 1 and with 500 data point.

rnorm(n=500, m=1, sd=1)

But, I am confusing with how to generate a normal distribution with expected min and max. I expect to hear your directions.

Thanks in advance.

Best,
Jian-Feng,

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to